Jonas Devlieghere [Tue, 15 Oct 2019 23:43:37 +0000 (23:43 +0000)]
[dsymutil] Support and relocate base address selection entries for debug_loc
Since r374600 clang emits base address selection entries. Currently
dsymutil does not support these entries and incorrectly interprets them
as location list entries.
This patch adds support for base address selection entries in dsymutil
and makes sure they are relocated correctly.
Thanks to Dave for coming up with the test case!
Differential revision: https://reviews.llvm.org/D69005
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374957
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Devlieghere [Tue, 15 Oct 2019 23:08:57 +0000 (23:08 +0000)]
[Reland][VirtualFileSystem] Support virtual working directory in the RedirectingFS
Before this patch, changing the working directory of the RedirectingFS
would just forward to its external file system. This prevented us from
having a working directory that only existed in the VFS mapping.
This patch adds support for a virtual working directory in the
RedirectingFileSystem. It now keeps track of its own WD in addition to
updating the WD of the external file system. This ensures that we can
still fall through for relative paths.
This change was originally motivated by the reproducer infrastructure in
LLDB where we want to deal transparently with relative paths.
Differential revision: https://reviews.llvm.org/D65677
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374955
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 15 Oct 2019 21:41:12 +0000 (21:41 +0000)]
[Orc] Add a method for ObjectLinkingLayer to return ownership of object buffers.
RTDyldObjectLinkingLayer allowed clients to register a NotifyEmitted function to
reclaim ownership of object buffers once they had been linked. This patch adds
similar functionality to ObjectLinkingLayer: Clients can now optionally call the
ObjectLinkingLayer::setReturnObjectBuffer method to register a function that
will be called when discarding object buffers. If set, this function will be
called to return ownership of the object regardless of whether the link
succeeded or failed.
Use cases for this function include debug dumping (it provides a way to dump
all objects linked into JIT'd code) and object re-use (e.g. storing an
object in a cache).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374951
91177308-0d34-0410-b5e6-
96231b3b80d8
DeForest Richards [Tue, 15 Oct 2019 21:27:20 +0000 (21:27 +0000)]
[Docs] Updates sidebar links and sets max-width property for div.body
Updates the sidebar links for Getting Started. Also sets max-width on div.body to 1000px.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374949
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 15 Oct 2019 21:06:57 +0000 (21:06 +0000)]
[JITLink] Switch to slab allocation for InProcessMemoryManager, re-enable test.
InProcessMemoryManager used to make separate memory allocation calls for each
permission level (RW, RX, RO), which could lead to target-out-of-range errors
if data and code were placed too far apart (this was the source of failures in
the JITLink/AArch64 testcase when it was first landed).
This patch updates InProcessMemoryManager to allocate a single slab which is
subdivided between text and data. This should guarantee that accesses remain
in-range provided that individual object files do not exceed 1Mb in size.
This patch also re-enables the JITLink/AArch64 testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374948
91177308-0d34-0410-b5e6-
96231b3b80d8
Julian Lettner [Tue, 15 Oct 2019 20:57:20 +0000 (20:57 +0000)]
[lit] Add back LitTestCase
This essentially reverts a commit [1] that removed the adaptor for
Python unittests. The code has been slightly refactored to make it more
additive: all code is contained in LitTestCase.py.
Usage sites will require a small adaption:
```
[old]
import lit.discovery
...
test_suite = lit.discovery.load_test_suite(...)
[new]
import lit.LitTestCase
...
test_suite = lit.LitTestCase.load_test_suite(...)
```
This was put back on request by Daniel Dunbar, since I wrongly assumed
that the functionality is unused. At least llbuild still uses this [2].
[1]
70ca752ccf6a8f362aea25ccd3ee2bbceca93b20
[2] https://github.com/apple/swift-llbuild/blob/master/utils/Xcode/LitXCTestAdaptor/LitTests.py#L16
Reviewed By: ddunbar
Differential Revision: https://reviews.llvm.org/D69002
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374947
91177308-0d34-0410-b5e6-
96231b3b80d8
Digger Lin [Tue, 15 Oct 2019 20:42:11 +0000 (20:42 +0000)]
[XCOFF]implement parsing relocation information for 32-bit xcoff object file
Summary:
Parsing the relocation entry information for 32-bit xcoff object file
including deal with the relocation overflow.
Reviewers: hubert.reinterpretcast, jasonliu, sfertile, xingxue.
Subscribers: hiraditya, rupprecht, seiya
Differential Revision: https://reviews.llvm.org/D67008
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374946
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Shaposhnikov [Tue, 15 Oct 2019 20:10:34 +0000 (20:10 +0000)]
[llvm-lipo] Add missing cast
Add missing cast (to correctly sum 32-bit integers).
Test plan: make check-all
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374945
91177308-0d34-0410-b5e6-
96231b3b80d8
Austin Kerbow [Tue, 15 Oct 2019 19:59:45 +0000 (19:59 +0000)]
AMDGPU: Fix infinite searches in SIFixSGPRCopies
Summary:
Two conditions could lead to infinite loops when processing PHI nodes in
SIFixSGPRCopies.
The first condition involves a REG_SEQUENCE that uses registers defined by both
a PHI and a COPY.
The second condition arises when a physical register is copied to a virtual
register which is then used in a PHI node. If the same virtual register is
copied to the same physical register, the result is an endless loop.
%0:sgpr_64 = COPY $sgpr0_sgpr1
%2 = PHI %0, %bb.0, %1, %bb.1
$sgpr0_sgpr1 = COPY %0
Reviewers: alex-t, rampitec, arsenm
Reviewed By: rampitec
Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68970
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374944
91177308-0d34-0410-b5e6-
96231b3b80d8
Digger Lin [Tue, 15 Oct 2019 19:28:11 +0000 (19:28 +0000)]
[llvm-readobj][xcoff] implement parsing overflow section header.
SUMMARY:
in the xcoff, if the number of relocation entries or line number entries is
overflow(large than or equal 65535) , there will be overflow section for it.
The interpret of overflow section is different with generic section header,
the patch implement parsing the overflow section.
Reviewers: hubert.reinterpretcast,sfertile,jasonliu
Subscribers: rupprecht, seiya
Differential Revision: https://reviews.llvm.org/D68575
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374941
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Devlieghere [Tue, 15 Oct 2019 18:37:00 +0000 (18:37 +0000)]
Revert "[VirtualFileSystem] Support virtual working directory in the RedirectingFS"
This reverts the original commit and the follow up:
Revert "[VirtualFileSystem] Support virtual working directory in the RedirectingFS"
Revert "[test] Update YAML mapping in VirtualFileSystemTest"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374935
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitry Mikulin [Tue, 15 Oct 2019 18:31:10 +0000 (18:31 +0000)]
Added support for "#pragma clang section relro=<name>"
Differential Revision: https://reviews.llvm.org/D68806
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374934
91177308-0d34-0410-b5e6-
96231b3b80d8
Thomas Lively [Tue, 15 Oct 2019 18:28:22 +0000 (18:28 +0000)]
[WebAssembly] Allow multivalue types in block signature operands
Summary:
Renames `ExprType` to the more apt `BlockType` and adds a variant for
multivalue blocks. Currently non-void blocks are only generated at the
end of functions where the block return type needs to agree with the
function return type, and that remains true for multivalue
blocks. That invariant means that the actual signature does not need
to be stored in the block signature `MachineOperand` because it can be
inferred by `WebAssemblyMCInstLower` from the return type of the
parent function. `WebAssemblyMCInstLower` continues to lower block
signature operands to immediates when possible but lowers multivalue
signatures to function type symbols. The AsmParser and Disassembler
are updated to handle multivalue block types as well.
Reviewers: aheejin, dschuff, aardappel
Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68889
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374933
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rupprecht [Tue, 15 Oct 2019 18:13:20 +0000 (18:13 +0000)]
[llvm-objdump] Use a counter for llvm-objdump -h instead of the section index.
Summary:
When listing the index in `llvm-objdump -h`, use a zero-based counter instead of the actual section index (e.g. shdr->sh_index for ELF).
While this is effectively a noop for now (except one unit test for XCOFF), the index values will change in a future patch that filters certain sections out (e.g. symbol tables). See D68669 for more context. Note: the test case in `test/tools/llvm-objdump/X86/section-index.s` already covers the case of incrementing the section index counter when sections are skipped.
Reviewers: grimar, jhenderson, espindola
Reviewed By: grimar
Subscribers: emaste, sbc100, arichardson, aheejin, arphaman, seiya, llvm-commits, MaskRay
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68848
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374931
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Devlieghere [Tue, 15 Oct 2019 18:05:44 +0000 (18:05 +0000)]
[test] Update YAML mapping in VirtualFileSystemTest
The 'bar' directory should be part of the root rather than the file
itself.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374930
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 15 Oct 2019 17:59:13 +0000 (17:59 +0000)]
[X86] combineX86ShufflesRecursively - split the getTargetShuffleInputs call from the resolveTargetShuffleAndZeroables call.
Exposes an issue in getFauxShuffleMask where the OR(SHUFFLE,SHUFFLE) decode should always resolve zero/undef elements.
Part of the fix for PR43024 where ideally we shouldn't call resolveTargetShuffleAndZeroables for Depth == 0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374928
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Tue, 15 Oct 2019 17:53:48 +0000 (17:53 +0000)]
[llvm-profdata] Reinstate tools/llvm-profdata/malformed-ptr-to-counter-array.test
I removed this test to unblock the ARM bots while looking into failures
(r374915), and am reinstating it now with a fix.
I believe the problem was that counter ptr address I used,
'\0\0\6\0\1\0\0\1', set the high bits of the pointer, not the low bits
like I wanted. On x86_64 this superficially looks like it tests r370826,
but it doesn't, as it would have been caught before r370826. However, on
ARM (or, 32-bit hosts more generally), I suspect the high bits were
cleared, and you get a 'valid' profile.
I verified that setting the *low* bits of the pointer does trigger the
new condition:
-// Note: The CounterPtr here is off-by-one. This should trigger a malformed profile error.
-RUN: printf '\0\0\6\0\1\0\0\1' >> %t.profraw
+// Note: The CounterPtr here is off-by-one.
+//
+// Octal '\11' is 9 in decimal: this should push CounterOffset to 1. As there are two counters,
+// the profile reader should error out.
+RUN: printf '\11\0\6\0\1\0\0\0' >> %t.profraw
This reverts commit
c7cf5b3e4b918c9769fd760f28485b8d943ed968.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374927
91177308-0d34-0410-b5e6-
96231b3b80d8
Digger Lin [Tue, 15 Oct 2019 17:40:41 +0000 (17:40 +0000)]
[XCOFF] Output object text section header and symbol entry for program code.
This is remaining part of rG41ca91f2995b: [AIX][XCOFF] Output XCOFF
object text section header and symbol entry for rogram code.
SUMMARY:
Original form of this patch is provided by Stefan Pintillie.
1. The patch try to output program code section header , symbol entry for
program code (PR) and Instruction into the raw text section.
2. The patch include how to alignment and layout the CSection in the text
section.
3. The patch also reorganize the code , put some codes into a function.
(XCOFFObjectWriter::writeSymbolTableEntryForControlSection)
Additional: We can not add raw data of text section test in the patch, If want
to output raw text section data,it need a function description patch first.
Reviewers: hubert.reinterpretcast, sfertile, jasonliu, xingxue.
Subscribers: wuzish, nemanjai, hiraditya, MaskRay, jsjji.
Differential Revision: https://reviews.llvm.org/D66969
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374923
91177308-0d34-0410-b5e6-
96231b3b80d8
David Zarzycki [Tue, 15 Oct 2019 17:40:12 +0000 (17:40 +0000)]
[X86] Make memcmp() use PTEST if possible and also enable AVX1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374922
91177308-0d34-0410-b5e6-
96231b3b80d8
Alina Sbirlea [Tue, 15 Oct 2019 17:25:36 +0000 (17:25 +0000)]
[NewGVN] Check that call has an access.
Check that a call has an attached MemoryAccess before calling
getClobbering on the instruction.
If no access is attached, the instruction does not access memory.
Resolves PR43441.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374920
91177308-0d34-0410-b5e6-
96231b3b80d8
Alina Sbirlea [Tue, 15 Oct 2019 17:15:19 +0000 (17:15 +0000)]
[MemorySSA] Update DomTree before applying MSSA updates.
Update on the fix in rL374850.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374918
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Devlieghere [Tue, 15 Oct 2019 17:14:24 +0000 (17:14 +0000)]
[VirtualFileSystem] Support virtual working directory in the RedirectingFS
Before this patch, changing the working directory of the RedirectingFS
would just forward to its external file system. This prevented us from
having a working directory that only existed in the VFS mapping.
This patch adds support for a virtual working directory in the
RedirectingFileSystem. It now keeps track of its own WD in addition to
updating the WD of the external file system. This ensures that we can
still fall through for relative paths.
This change was originally motivated by the reproducer infrastructure in
LLDB where we want to deal transparently with relative paths.
Differential revision: https://reviews.llvm.org/D65677
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374917
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Tue, 15 Oct 2019 17:10:44 +0000 (17:10 +0000)]
[llvm-profdata] Remove tools/llvm-profdata/malformed-ptr-to-counter-array.test
This test is still failing on the ARM bots and I need time to
investigate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374915
91177308-0d34-0410-b5e6-
96231b3b80d8
Digger Lin [Tue, 15 Oct 2019 17:09:54 +0000 (17:09 +0000)]
[AIX][XCOFF] Output XCOFF object text section header and symbol entry for program code.
SUMMARY
Original form of this patch is provided by Stefan Pintillie.
The patch try to output program code section header , symbol entry for program code (PR) and Instruction into the raw text section.
The patch include how to alignment and layout the CSection in the text section.
The patch also reorganize the code , put some codes into a function(XCOFFObjectWriter::writeSymbolTableEntryForControlSection)
Additional: We can not add raw data of text section test in the patch, If want to output raw text section data,it need a function description patch first.
Reviewers: hubert.reinterpretcast, sfertile, jasonliu, xingxue.
Subscribers: wuzish, nemanjai, hiraditya, MaskRay, jsjji.
Differential Revision: https://reviews.llvm.org/D66969
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374914
91177308-0d34-0410-b5e6-
96231b3b80d8
Stanislav Mekhanoshin [Tue, 15 Oct 2019 16:41:15 +0000 (16:41 +0000)]
[AMDGPU] Support mov dpp with 64 bit operands
We define mov/update dpp intrinsics as overloaded but do not
support i64, which is a practically useful type. Fix the
selection and lowering.
Differential Revision: https://reviews.llvm.org/D68673
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374910
91177308-0d34-0410-b5e6-
96231b3b80d8
Stanislav Mekhanoshin [Tue, 15 Oct 2019 16:17:50 +0000 (16:17 +0000)]
[AMDGPU] Allow DPP combiner to work with REG_SEQUENCE
Differential Revision: https://reviews.llvm.org/D68828
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374908
91177308-0d34-0410-b5e6-
96231b3b80d8
GN Sync Bot [Tue, 15 Oct 2019 15:33:04 +0000 (15:33 +0000)]
gn build: Merge r374903
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374904
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 15 Oct 2019 15:23:57 +0000 (15:23 +0000)]
[DAGCombiner] fold select-of-constants based on sign-bit test
Examples:
i32 X > -1 ? C1 : -1 --> (X >>s 31) | C1
i8 X < 0 ? C1 : 0 --> (X >>s 7) & C1
This is a small generalization of a fold requested in PR43650:
https://bugs.llvm.org/show_bug.cgi?id=43650
The sign-bit of the condition operand can be used as a mask for the true operand:
https://rise4fun.com/Alive/paT
Note that we already handle some of the patterns (isNegative + scalar) because
there's an over-specialized, yet over-reaching fold for that in foldSelectCCToShiftAnd().
It doesn't use any TLI hooks, so I can't easily rip out that code even though we're
duplicating part of it here. This fold is guarded by TLI.convertSelectOfConstantsToMath(),
so it should not cause problems for targets that prefer select over shift.
Also worth noting: I thought we could generalize this further to include the case where
the true operand of the select is not constant, but Alive says that may allow poison to
pass through where it does not in the original select form of the code.
Differential Revision: https://reviews.llvm.org/D68949
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374902
91177308-0d34-0410-b5e6-
96231b3b80d8
GN Sync Bot [Tue, 15 Oct 2019 14:53:40 +0000 (14:53 +0000)]
gn build: Merge r374899
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374900
91177308-0d34-0410-b5e6-
96231b3b80d8
Digger Lin [Tue, 15 Oct 2019 14:44:06 +0000 (14:44 +0000)]
revert git test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374898
91177308-0d34-0410-b5e6-
96231b3b80d8
Digger Lin [Tue, 15 Oct 2019 14:39:29 +0000 (14:39 +0000)]
a test commit access
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374897
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 15 Oct 2019 14:23:11 +0000 (14:23 +0000)]
[AsmPrinter] Fix unused variable warning in Release builds. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374894
91177308-0d34-0410-b5e6-
96231b3b80d8
Guillaume Chatelet [Tue, 15 Oct 2019 13:58:22 +0000 (13:58 +0000)]
[Alignment][NFC] Value::getPointerAlignment returns MaybeAlign
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet, jdoerfert
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68398
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374889
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Parker [Tue, 15 Oct 2019 13:12:51 +0000 (13:12 +0000)]
[ARM][MVE] validForTailPredication insts
Reverse the logic for valid tail predication instructions and create
a whitelist instead. Added other instruction groups that aren't
obviously safe:
- instructions that 'narrow' their result.
- lane moves.
- byte swapping instructions.
- interleaving loads and stores.
- cross-beat carries.
- top/bottom instructions.
- complex operations.
Hopefully we should be able to add more of these instructions to the
whitelist, once we have a more concrete idea of the transform.
Differential Revision: https://reviews.llvm.org/D67904
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374887
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 15 Oct 2019 13:12:44 +0000 (13:12 +0000)]
[InstCombine] fold a shifted bool zext to a select (2nd try)
The 1st attempt at rL374828 inserted the code
at the wrong position (outside of the constant-shift-amount
block). Trying again with an additional test to verify
const-ness.
For a constant shift amount, add the following fold.
shl (zext (i1 X)), ShAmt --> select (X, 1 << ShAmt, 0)
https://rise4fun.com/Alive/IZ9
Fixes PR42257.
Based on original patch by @zvi (Zvi Rackover)
Differential Revision: https://reviews.llvm.org/D63382
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374886
91177308-0d34-0410-b5e6-
96231b3b80d8
Guillaume Chatelet [Tue, 15 Oct 2019 12:56:24 +0000 (12:56 +0000)]
[Alignment] Migrate Attribute::getWith(Stack)Alignment
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet, jdoerfert
Reviewed By: courbet
Subscribers: arsenm, jvesely, nhaehnle, hiraditya, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D68792
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374884
91177308-0d34-0410-b5e6-
96231b3b80d8
GN Sync Bot [Tue, 15 Oct 2019 11:55:38 +0000 (11:55 +0000)]
gn build: Merge r374882
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374883
91177308-0d34-0410-b5e6-
96231b3b80d8
David Stenberg [Tue, 15 Oct 2019 11:31:21 +0000 (11:31 +0000)]
[DebugInfo] Add a DW_OP_LLVM_entry_value operation
Summary:
Internally in LLVM's metadata we use DW_OP_entry_value operations with
the same semantics as DWARF; that is, its operand specifies the number
of bytes that the entry value covers.
At the time of emitting entry values we don't know the emitted size of
the DWARF expression that the entry value will cover. Currently the size
is hardcoded to 1 in DIExpression, and other values causes the verifier
to fail. As the size is 1, that effectively means that we can only have
valid entry values for registers that can be encoded in one byte, which
are the registers with DWARF numbers 0 to 31 (as they can be encoded as
single-byte DW_OP_reg0..DW_OP_reg31 rather than a multi-byte
DW_OP_regx). It is a bit confusing, but it seems like llvm-dwarfdump
will print an operation "correctly", even if the byte size is less than
that, which may make it seem that we emit correct DWARF for registers
with DWARF numbers > 31. If you instead use readelf for such cases, it
will interpret the number of specified bytes as a DWARF expression. This
seems like a limitation in llvm-dwarfdump.
As suggested in D66746, a way forward would be to add an internal
variant of DW_OP_entry_value, DW_OP_LLVM_entry_value, whose operand
instead specifies the number of operations that the entry value covers,
and we then translate that into the byte size at the time of emission.
In this patch that internal operation is added. This patch keeps the
limitation that a entry value can only be applied to simple register
locations, but it will fix the issue with the size operand being
incorrect for DWARF numbers > 31.
Reviewers: aprantl, vsk, djtodoro, NikolaPrica
Reviewed By: aprantl
Subscribers: jyknight, fedor.sergeev, hiraditya, llvm-commits
Tags: #debug-info, #llvm
Differential Revision: https://reviews.llvm.org/D67492
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374881
91177308-0d34-0410-b5e6-
96231b3b80d8
Guillaume Chatelet [Tue, 15 Oct 2019 11:24:36 +0000 (11:24 +0000)]
[Alignment][NFC] Remove dependency on GlobalObject::setAlignment(unsigned)
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: arsenm, mehdi_amini, jvesely, nhaehnle, hiraditya, steven_wu, dexonsmith, dang, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68944
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374880
91177308-0d34-0410-b5e6-
96231b3b80d8
David Stenberg [Tue, 15 Oct 2019 11:14:35 +0000 (11:14 +0000)]
[DebugInfo] Add interface for pre-calculating the size of emitted DWARF
Summary:
DWARF's DW_OP_entry_value operation has two operands; the first is a
ULEB128 operand that specifies the size of the second operand, which is
a DWARF block. This means that we need to be able to pre-calculate and
emit the size of DWARF expressions before emitting them. There is
currently no interface for doing this in DwarfExpression, so this patch
introduces that.
When implementing this I initially thought about running through
DwarfExpression's emission two times; first with a temporary buffer to
emit the expression, in order to being able to calculate the size of
that emitted data. However, DwarfExpression is a quite complex state
machine, so I decided against that, as it seemed like the two runs could
get out of sync, resulting in incorrect size operands. Therefore I have
implemented this in a way that we only have to run DwarfExpression once.
The idea is to emit DWARF to a temporary buffer, for which it is
possible to query the size. The data in the temporary buffer can then be
emitted to DwarfExpression's main output.
In the case of DIEDwarfExpression, a temporary DIE is used. The values
are all allocated using the same BumpPtrAllocator as for all other DIEs,
and the values are then transferred to the real value list. In the case
of DebugLocDwarfExpression, the temporary buffer is implemented using a
BufferByteStreamer which emits to a buffer in the DwarfExpression
object.
Reviewers: aprantl, vsk, NikolaPrica, djtodoro
Reviewed By: aprantl
Subscribers: hiraditya, llvm-commits
Tags: #debug-info, #llvm
Differential Revision: https://reviews.llvm.org/D67768
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374879
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 15 Oct 2019 11:13:51 +0000 (11:13 +0000)]
[X86] Resolve KnownUndef/KnownZero bits into target shuffle masks in helper. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374878
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeremy Morse [Tue, 15 Oct 2019 10:46:24 +0000 (10:46 +0000)]
[DebugInfo] Remove some users of DBG_VALUEs IsIndirect field
This patch kills off a significant user of the "IsIndirect" field of
DBG_VALUE machine insts. Brought up in in PR41675, IsIndirect is
techncally redundant as it can be expressed by the DIExpression of a
DBG_VALUE inst, and it isn't helpful to have two ways of expressing
things.
Rather than setting IsIndirect, have DBG_VALUE creators add an extra deref
to the insts DIExpression. There should now be no appearences of
IsIndirect=True from isel down to LiveDebugVariables / VirtRegRewriter,
which is ensured by an assertion in LDVImpl::handleDebugValue. This means
we also get to delete the IsIndirect handling in LiveDebugVariables. Tests
can be upgraded by for example swapping the following IsIndirect=True
DBG_VALUE:
DBG_VALUE $somereg, 0, !123, !DIExpression(DW_OP_foo)
With one where the indirection is in the DIExpression, by _appending_
a deref:
DBG_VALUE $somereg, $noreg, !123, !DIExpression(DW_OP_foo, DW_OP_deref)
Which both mean the same thing.
Most of the test changes in this patch are updates of that form; also some
changes in how the textual assembly printer handles these insts.
Differential Revision: https://reviews.llvm.org/D68945
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374877
91177308-0d34-0410-b5e6-
96231b3b80d8
Djordje Todorovic [Tue, 15 Oct 2019 10:12:14 +0000 (10:12 +0000)]
[llvm-locstats] Fix 'only params' no entry value stats
Adding the missing line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374875
91177308-0d34-0410-b5e6-
96231b3b80d8
Petar Avramovic [Tue, 15 Oct 2019 09:30:08 +0000 (09:30 +0000)]
[MIPS GlobalISel] Add MSA registers to fprb. Select vector load, store
Add vector MSA register classes to fprb, they are 128 bit wide.
MSA instructions use the same registers for both integer and floating
point operations. Therefore we only need to check for vector element
size during legalization or instruction selection.
Add helper function in MipsLegalizerInfo and switch to legalIf
LegalizeRuleSet to keep legalization rules compact since they depend
on MipsSubtarget and presence of MSA.
fprb is assigned to all vector operands.
Move selectLoadStoreOpCode to MipsInstructionSelector in order to
reduce number of arguments.
Differential Revision: https://reviews.llvm.org/D68867
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374872
91177308-0d34-0410-b5e6-
96231b3b80d8
David Stenberg [Tue, 15 Oct 2019 09:21:09 +0000 (09:21 +0000)]
Change Comments SmallVector to std::vector in DebugLocStream [NFC]
This changes the 32-element SmallVector to a std::vector. When building
a RelWithDebInfo clang-8 binary, the average size of the vector was
~10000, so it does not seem very beneficial or practical to use a small
vector for that.
The DWARFBytes SmallVector grows in the same way as Comments, so perhaps
that also should be changed to a purely dynamically allocated structure,
but that requires some more code changes, so I let that remain as a
SmallVector for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374871
91177308-0d34-0410-b5e6-
96231b3b80d8
Petar Avramovic [Tue, 15 Oct 2019 09:18:42 +0000 (09:18 +0000)]
[MIPS GlobalISel] Refactor MipsRegisterBankInfo [NFC]
Check if size of operand LLT matches sizes of available register banks
before inspecting the opcode in order to reduce number of checks.
Factor commonly used pieces of code into functions.
Differential Revision: https://reviews.llvm.org/D68866
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374870
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Tue, 15 Oct 2019 08:31:52 +0000 (08:31 +0000)]
[LLDB] [Windows] Initial support for ARM64 register contexts
Differential Revision: https://reviews.llvm.org/D67954
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374866
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Tue, 15 Oct 2019 08:29:56 +0000 (08:29 +0000)]
[Demangle] Add a few more options to the microsoft demangler
This corresponds to commonly used options to UnDecorateSymbolName
within llvm.
Add them as hidden options in llvm-undname. MS undname.exe takes
numeric flags, corresponding to the UNDNAME_* constants, but instead
of hardcoding in mappings for those numbers, just add textual
options instead, as it the use of them here is primarily intended
for testing.
Differential Revision: https://reviews.llvm.org/D68917
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374865
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 15 Oct 2019 06:10:11 +0000 (06:10 +0000)]
[X86] Don't check for VBROADCAST_LOAD being a user of the source of a VBROADCAST when trying to share broadcasts.
The only things VBROADCAST_LOAD uses is an address and a chain
node. It has no vector inputs.
So if its a user of the source of another broadcast that could
only mean one of two things. The other broadcast is broadcasting
the address of the broadcast_load. Or the source is a load and
the use we're seeing is the chain result from that load. Neither
of these cases make sense to combine here.
This issue was reported post-commit r373871. Test case has not
been reduced yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374862
91177308-0d34-0410-b5e6-
96231b3b80d8
David L. Jones [Tue, 15 Oct 2019 04:32:07 +0000 (04:32 +0000)]
Revert [SROA] Reuse existing lifetime markers if possible
This reverts r374692 (git commit
92694eba933ef4ea0b1b6377809ff266df37d61b)
Reproducer sent to commit thread on llvm-commits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374859
91177308-0d34-0410-b5e6-
96231b3b80d8
Shiva Chen [Tue, 15 Oct 2019 02:04:29 +0000 (02:04 +0000)]
[RISCV] Support fast calling convention
LLVM may annotate the function with fastcc if there has only one caller
and there're no other caller out of the module and the function is not
naked or contain variable arguments.
The fastcc functions could pass the arguments by the caller saved registers.
Differential Revision: https://reviews.llvm.org/D68559
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374857
91177308-0d34-0410-b5e6-
96231b3b80d8
Thomas Lively [Tue, 15 Oct 2019 01:11:51 +0000 (01:11 +0000)]
[WebAssembly] Trapping fptoint builtins and intrinsics
Summary:
The WebAssembly backend lowers fptoint instructions to a code sequence
that checks for overflow to avoid traps because fptoint is supposed to
be speculatable. These new builtins and intrinsics give users a way to
depend on the trapping semantics of the underlying instructions and
avoid the extra code generated normally.
Patch by coffee and tlively.
Reviewers: aheejin
Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D68902
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374856
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 14 Oct 2019 23:55:39 +0000 (23:55 +0000)]
Revert [InstCombine] fold a shifted bool zext to a select
This reverts r374828 (git commit
1f40f15d54aac06421448b6de131231d2d78bc75) due to bot breakage
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374851
91177308-0d34-0410-b5e6-
96231b3b80d8
Alina Sbirlea [Mon, 14 Oct 2019 23:52:39 +0000 (23:52 +0000)]
[MemorySSA] Update for partial unswitch.
Update MSSA for blocks cloned when doing partial unswitching.
Enable additional testing with MSSA.
Resolves PR43641.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374850
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 14 Oct 2019 23:48:24 +0000 (23:48 +0000)]
[X86] Teach X86MCodeEmitter to properly encode zmm16-zmm31 as index register to vgatherpf/vscatterpf.
We need to encode bit 4 into the EVEX.V' bit. We do this right
for regular gather/scatter which use either MRMSrcMem or MRMDestMem
formats. The prefetches use MRM*m formats.
Fixes an issue recently added to PR36202.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374849
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 14 Oct 2019 23:48:12 +0000 (23:48 +0000)]
[X86] Add encoding tests for avx512pf vgatherpf/vscatterpf instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374848
91177308-0d34-0410-b5e6-
96231b3b80d8
Julian Lettner [Mon, 14 Oct 2019 23:43:18 +0000 (23:43 +0000)]
[lit] Add argument check: --timeout must be non-negative integer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374847
91177308-0d34-0410-b5e6-
96231b3b80d8
Jorge Gorbe Moya [Mon, 14 Oct 2019 23:25:25 +0000 (23:25 +0000)]
Revert "Dead Virtual Function Elimination"
This reverts commit
9f6a873268e1ad9855873d9d8007086c0d01cf4f.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374844
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 14 Oct 2019 22:56:07 +0000 (22:56 +0000)]
In the new pass manager use PTO.LoopUnrolling to determine when and how
we will unroll loops. Also comment a few occasions where we need to
know whether or not we're forcing the unwinder or not.
The default before and after this patch is for LoopUnroll to be enabled,
and for it to use a cost model to determine whether to unroll the loop
(`OnlyWhenForced = false`). Before this patch, disabling loop unroll
would not run the LoopUnroll pass. After this patch, the LoopUnroll pass
is being run, but it restricts unrolling to only the loops marked by a
pragma (`OnlyWhenForced = true`).
In addition, this patch disables the UnrollAndJam pass when disabling unrolling.
Testcase is in clang because it's controlling how the loop optimizer
is being set up and there's no other way to trigger the behavior.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374838
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Mon, 14 Oct 2019 22:42:35 +0000 (22:42 +0000)]
[Tests] Add a SCEV analysis test for llvm.widenable.condition
Mostly because we don't appear to have one and a prototype patch I just saw would have broken the example committed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374835
91177308-0d34-0410-b5e6-
96231b3b80d8
Jian Cai [Mon, 14 Oct 2019 22:22:26 +0000 (22:22 +0000)]
[ARM][AsmParser] handles offset expression in parentheses
Summary:
Integrated assembler does not accept offset expressions surrounded by
parenthesis. Handle this case for GAS compability.
https://bugs.llvm.org/show_bug.cgi?id=43631
Subscribers: kristof.beyls, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68764
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374832
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 14 Oct 2019 22:12:45 +0000 (22:12 +0000)]
DebugInfo: Remove unnecessary/mistaken inclusion of Bitcode/BitcodeAnalyzer.h
Introduced in r374582, Michael Spencer pointed out this broke the
modules build due to a missing tblgen dependency on
llvm/IR/Attributes.inc.
Michael fixed the dependency in r374827.
So this removes the inclusion and the new dependency (effectively
reverting r374827 and including the alternative fix of removing rather
than supporting the new dependency).
Thanks for the quick fix/notice, Michael!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374831
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Tereshin [Mon, 14 Oct 2019 22:01:58 +0000 (22:01 +0000)]
[update_mir_test_checks] Handle MI flags properly
previously we would generate literal check lines w/ no reg-exps for
vregs as MI flags (nsw, ninf, etc.) won't be recognized as a part of MI.
Fixing that. Includes updating the MIR tests that suffered from the
problem.
Reviewed By: bogner
Differential Revision: https://reviews.llvm.org/D68905
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374829
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 14 Oct 2019 21:56:40 +0000 (21:56 +0000)]
[InstCombine] fold a shifted bool zext to a select
For a constant shift amount, add the following fold.
shl (zext (i1 X)), ShAmt --> select (X, 1 << ShAmt, 0)
https://rise4fun.com/Alive/IZ9
Fixes PR42257.
Based on original patch by @zvi (Zvi Rackover)
Differential Revision: https://reviews.llvm.org/D63382
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374828
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Mon, 14 Oct 2019 21:53:51 +0000 (21:53 +0000)]
[Modules Build] Add missing dependency.
A previous commit made libLLVMDebugInfoDWARF depend on the LLVM_Bitcode module which depends on the LLVM_intrinsic_gen module which depends on "llvm/IR/Attributes.inc" which is a generated header not depended on by libLLVMDebugInfo. Add that dependency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374827
91177308-0d34-0410-b5e6-
96231b3b80d8
Julian Lettner [Mon, 14 Oct 2019 21:23:40 +0000 (21:23 +0000)]
[lit] Create Run object later and only when it is needed
Reviewed By: rnk
Differential Revision: https://reviews.llvm.org/D68843
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374823
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 14 Oct 2019 20:28:03 +0000 (20:28 +0000)]
[InstCombine] add tests for select/shift transforms; NFC
A transform proposal for the shift form is in D63382.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374818
91177308-0d34-0410-b5e6-
96231b3b80d8
Jan Korous [Mon, 14 Oct 2019 20:15:01 +0000 (20:15 +0000)]
[clang-scan-deps] Support for clang --analyze in clang-scan-deps
The goal is to have 100% fidelity in clang-scan-deps behavior when
--analyze is present in compilation command.
At the same time I don't want to break clang-tidy which expects
__static_analyzer__ macro defined as built-in.
I introduce new cc1 options (-setup-static-analyzer) that controls
the macro definition and is conditionally set in driver.
Differential Revision: https://reviews.llvm.org/D68093
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374815
91177308-0d34-0410-b5e6-
96231b3b80d8
Joel E. Denny [Mon, 14 Oct 2019 19:59:30 +0000 (19:59 +0000)]
[lit] Extend internal diff to support -U
When using lit's internal shell, RUN lines like the following
accidentally execute an external `diff` instead of lit's internal
`diff`:
```
# RUN: program | diff -U1 file -
```
Such cases exist now, in `clang/test/Analysis` for example. We are
preparing patches to ensure lit's internal `diff` is called in such
cases, which will then fail because lit's internal `diff` doesn't
recognize `-U` as a command-line option. This patch adds `-U`
support.
Reviewed By: rnk
Differential Revision: https://reviews.llvm.org/D68668
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374814
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Mon, 14 Oct 2019 19:49:40 +0000 (19:49 +0000)]
[Tests] Add a test demonstrating a miscompile in the off-by-default loop-pred transform
Credit goes to Evgeny Brevnov for figuring out the problematic case.
Fuzzing probably also found it (lots of failures), but due to some silly infrastructure problems I hadn't gotten to the results before Evgeny hand reduced it from a benchmark.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374812
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Mon, 14 Oct 2019 19:46:34 +0000 (19:46 +0000)]
[LoopIdiom] BCmp: loop exit count must not be wider than size_t that `bcmp` takes
As reported by Joerg Sonnenberger in IRC, for 32-bit systems,
where pointer and size_t are 32-bit, if you use 64-bit-wide variable
in the loop, you could end up with loop exit count being of the type
wider than the size_t. Now, i'm not sure if we can produce `bcmp`
from that (just truncate?), but we certainly should not assert/miscompile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374811
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron McInally [Mon, 14 Oct 2019 19:17:31 +0000 (19:17 +0000)]
[ASan] Fix IRTests/InstructionsTest.UnaryOperator
Fix ASan regression from r374782.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374808
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Mon, 14 Oct 2019 19:10:39 +0000 (19:10 +0000)]
[Tests] Add a few more tests for idioms with FP induction variables
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374807
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Mon, 14 Oct 2019 18:37:31 +0000 (18:37 +0000)]
[ThinLTO] Fix printing of NoInline function summary flag
Summary:
The guard for printing function flags in the summary was not checking
the NoInline flag.
Reviewers: wmi
Subscribers: mehdi_amini, inglorion, hiraditya, steven_wu, dexonsmith, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68948
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374802
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 14 Oct 2019 18:30:31 +0000 (18:30 +0000)]
AMDGPU: Fix redundant setting of m0 for atomic load/store
Atomic load/store would have their setting of m0 handled twice, which
happened to be optimized out later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374801
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 14 Oct 2019 18:30:29 +0000 (18:30 +0000)]
AMDGPU: Remove unnecessary IR from test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374800
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Mon, 14 Oct 2019 17:52:31 +0000 (17:52 +0000)]
Fix copy-pasto in r374759
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374796
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rupprecht [Mon, 14 Oct 2019 17:47:17 +0000 (17:47 +0000)]
[llvm-objdump] Adjust spacing and field width for --section-headers
Summary:
- Expand the "Name" column past 13 characters when any of the section names are longer. Current behavior is a staggard output instead of a nice table if a single name is longer.
- Only print the required number of hex chars for addresses (i.e. 8 characters for 32-bit, 16 characters for 64-bit)
- Fix trailing spaces
Reviewers: grimar, jhenderson, espindola
Reviewed By: grimar
Subscribers: emaste, sbc100, arichardson, aheejin, seiya, llvm-commits, MaskRay
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68730
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374795
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Berg [Mon, 14 Oct 2019 17:39:32 +0000 (17:39 +0000)]
Add FMF to vector ops for phi
Summary: Small amendment to handle vector cases for D67564.
Reviewers: spatel, eli.friedman, hfinkel, cameron.mcinally, arsenm, jmolloy, bogner
Reviewed By: cameron.mcinally, bogner
Subscribers: llvm-commits, efriedma, reames, bogner, wdng
Differential Revision: https://reviews.llvm.org/D68748
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374794
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rupprecht [Mon, 14 Oct 2019 17:29:15 +0000 (17:29 +0000)]
Reapply: [llvm-size] Tidy up error messages (PR42970)
Clean up some formatting inconsistencies in the error messages and correctly exit with non-zero in all error cases.
Originally submitted as r374771 and then reverted as r374780, this patch fixes the libObject test case in Object/macho-invalid.test.
Patch by Alex Cameron
Differential Revision: https://reviews.llvm.org/D68906
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374793
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Mon, 14 Oct 2019 17:20:22 +0000 (17:20 +0000)]
[llvm-profdata] Weaken "malformed-ptr-to-counter-array.test" to appease arm bots
There are a number arm bots failing after r374617 landed, and I'm not
sure why. It looks a bit like the error message llvm-profdata is
expected to print to stderr isn't flushed.
Weaken the test in an attempt to appease the arm bots: if this doesn't
work, that means that llvm-profdata is actually *not failing*, and that
will be a clear indication that some logic error is actually happening.
http://lab.llvm.org:8011/builders/clang-cmake-armv7-global-isel/builds/5604/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374792
91177308-0d34-0410-b5e6-
96231b3b80d8
Artem Belevich [Mon, 14 Oct 2019 16:53:34 +0000 (16:53 +0000)]
[NVPTX] Restructure shfl instrinsics and add variants that return a predicate.
Also, amend constraints for non-sync variants that are no longer
available on sm_70+ with PTX6.4+.
Differential Revision: https://reviews.llvm.org/D68892
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374790
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 14 Oct 2019 16:46:21 +0000 (16:46 +0000)]
BitsInit::resolveReferences - silence static analyzer null dereference warning. NFCI.
The static analyzer is warning about a potential null dereference, assert to check that the loop has set the cached pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374789
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 14 Oct 2019 16:46:11 +0000 (16:46 +0000)]
XCOFFObjectWriter - silence static analyzer dyn_cast<> null dereference warning. NFCI.
The static analyzer is warning about a potential null dereference, but we should be able to use cast<> directly and if not assert will fire for us.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374788
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 14 Oct 2019 16:30:17 +0000 (16:30 +0000)]
[CostModel][X86] Add CTLZ scalar costs
Add specific scalar costs for CTLZ instructions, we can't discriminate between CTLZ and CTLZ_ZERO_UNDEF so we have to assume the worst. Given how BSR is often a microcoded nightmare on some older targets we might still be underestimating it.
For targets supporting LZCNT (Intel Haswell+ or AMD Fam10+), we provide overrides that assume 1cy costs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374786
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Mon, 14 Oct 2019 16:15:14 +0000 (16:15 +0000)]
Reapply r374743 with a fix for the ocaml binding
Add a pass to lower is.constant and objectsize intrinsics
This pass lowers is.constant and objectsize intrinsics not simplified by
earlier constant folding, i.e. if the object given is not constant or if
not using the optimized pass chain. The result is recursively simplified
and constant conditionals are pruned, so that dead blocks are removed
even for -O0. This allows inline asm blocks with operand constraints to
work all the time.
The new pass replaces the existing lowering in the codegen-prepare pass
and fallbacks in SDAG/GlobalISEL and FastISel. The latter now assert
on the intrinsics.
Differential Revision: https://reviews.llvm.org/D65280
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374784
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 14 Oct 2019 15:53:55 +0000 (15:53 +0000)]
[x86] adjust select to sra tests; NFC
Avoid demanded-bits-based specializations (that may not be ideal,
but that's another problem).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374783
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron McInally [Mon, 14 Oct 2019 15:35:01 +0000 (15:35 +0000)]
[IRBuilder] Update IRBuilder::CreateFNeg(...) to return a UnaryOperator
Reapply r374240 with fix for Ocaml test, namely Bindings/OCaml/core.ml.
Differential Revision: https://reviews.llvm.org/D61675
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374782
91177308-0d34-0410-b5e6-
96231b3b80d8
David Green [Mon, 14 Oct 2019 15:19:33 +0000 (15:19 +0000)]
[ARM] Selection for MVE VMOVN
The adds both VMOVNt and VMOVNb instruction selection from the appropriate
shuffles. We detect shuffle masks of the form:
0, N, 2, N+2, 4, N+4, ...
or
0, N+1, 2, N+3, 4, N+5, ...
ISel will also try the opposite patterns, with inputs reversed. These are
selected to VMOVNt and VMOVNb respectively.
Differential Revision: https://reviews.llvm.org/D68283
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374781
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Mon, 14 Oct 2019 14:44:26 +0000 (14:44 +0000)]
Revert r374771 "[llvm-size] Tidy up error messages (PR42970)"
This reverts commit
83e52f5e1150018329b8907bb014c77ac382d611.
Makes Object/macho-invalid.test fail everywhere, e.g. here:
http://lab.llvm.org:8011/builders/llvm-hexagon-elf/builds/23669/steps/test-llvm/logs/FAIL%3A%20LLVM%3A%3Amacho-invalid.test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374780
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 14 Oct 2019 14:43:06 +0000 (14:43 +0000)]
[x86] add tests for possible select to sra transforms; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374779
91177308-0d34-0410-b5e6-
96231b3b80d8
David Green [Mon, 14 Oct 2019 14:29:26 +0000 (14:29 +0000)]
[ARM] Add some VMOVN tests. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374777
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 14 Oct 2019 14:07:43 +0000 (14:07 +0000)]
[CostModel][X86] Add CTPOP scalar costs (PR43656)
Add specific scalar costs for ctpop instructions, these are based on the llvm-mca's SLM throughput numbers (the oldest model we have).
For targets supporting POPCNT, we provide overrides that assume 1cy costs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374775
91177308-0d34-0410-b5e6-
96231b3b80d8
Guillaume Chatelet [Mon, 14 Oct 2019 13:14:34 +0000 (13:14 +0000)]
[Alignment][NFC] Move and type functions from MathExtras to Alignment
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68942
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374773
91177308-0d34-0410-b5e6-
96231b3b80d8
Sander de Smalen [Mon, 14 Oct 2019 13:11:34 +0000 (13:11 +0000)]
[AArch64] Stackframe accesses to SVE objects.
Materialize accesses to SVE frame objects from SP or FP, whichever is
available and beneficial.
This patch still assumes the objects are pre-allocated. The automatic
layout of SVE objects within the stackframe will be added in a separate
patch.
Reviewers: greened, cameron.mcinally, efriedma, rengolin, thegameg, rovka
Reviewed By: cameron.mcinally
Differential Revision: https://reviews.llvm.org/D67749
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374772
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Mon, 14 Oct 2019 12:51:47 +0000 (12:51 +0000)]
[llvm-size] Tidy up error messages (PR42970)
Clean up some formatting inconsistencies in the error messages and correctly exit with non-zero in all error cases.
Differential Revision: https://reviews.llvm.org/D68906
Patch by Alex Cameron
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374771
91177308-0d34-0410-b5e6-
96231b3b80d8
David Stenberg [Mon, 14 Oct 2019 12:49:58 +0000 (12:49 +0000)]
[DebugInfo] Fix truncation of call site immediates
Summary:
This addresses a bug in collectCallSiteParameters() where call site
immediates would be truncated from int64_t to unsigned.
This fixes PR43525.
Reviewers: djtodoro, NikolaPrica, aprantl, vsk
Reviewed By: aprantl
Subscribers: hiraditya, llvm-commits
Tags: #debug-info, #llvm
Differential Revision: https://reviews.llvm.org/D68869
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374770
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Mon, 14 Oct 2019 12:22:48 +0000 (12:22 +0000)]
Revert "Add a pass to lower is.constant and objectsize intrinsics"
This reverts commit r374743. It broke the build with Ocaml enabled:
http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/19218
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374768
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Timofeev [Mon, 14 Oct 2019 12:01:10 +0000 (12:01 +0000)]
[AMDGPU] Come back patch for the 'Assign register class for cross block values according to the divergence.'
Detailed description:
After https://reviews.llvm.org/D59990 submit several issues were discovered.
Changes in common code were preserved but AMDGPU specific part was reverted to keep the backend working correctly.
Discovered issues were addressed in the following commits:
https://reviews.llvm.org/D67662
https://reviews.llvm.org/D67101
https://reviews.llvm.org/D63953
https://reviews.llvm.org/D63731
This change brings back AMDGPU specific changes.
Reviewed by: rampitec, arsenm
Differential Revision: https://reviews.llvm.org/D68635
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374767
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Campos [Mon, 14 Oct 2019 11:12:23 +0000 (11:12 +0000)]
Fixing typo in llvm/IR/Intrinsics.td
Fixing typo in comment line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374766
91177308-0d34-0410-b5e6-
96231b3b80d8