OSDN Git Service
Mehdi Amini [Sat, 2 Apr 2016 05:08:18 +0000 (05:08 +0000)]
Revert "ThinLTO: add module caching handling."
This reverts commit r265214, unintentionally commited.
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265216
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Sat, 2 Apr 2016 05:07:53 +0000 (05:07 +0000)]
Create a typedef GlobalValue::GUID for uint64_t and RAUW (NFC)
Summary: This should make the code more readable, especially all the map declarations.
Reviewers: tejohnson
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D18721
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265215
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Sat, 2 Apr 2016 05:07:08 +0000 (05:07 +0000)]
ThinLTO: add module caching handling.
Reviewers: tejohnson
Subscribers: llvm-commits, joker.eph
Differential Revision: http://reviews.llvm.org/D18494
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265214
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Sat, 2 Apr 2016 03:59:58 +0000 (03:59 +0000)]
80 lines column after renaming "shouldDiscardValueNames" (NFC)
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265212
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Sat, 2 Apr 2016 03:46:17 +0000 (03:46 +0000)]
Rename Context::discardValueNames() to shouldDiscardValueNames() (NFC)
Suggested by Sean Silva.
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265211
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Sat, 2 Apr 2016 03:28:26 +0000 (03:28 +0000)]
Add Cache Pruning support
Incremental LTO will usea cache to store object files.
This patch handles the pruning part of the cache, exposing
a few knobs:
- Pruning interval: the implementation keeps a "timestamp" file in the
directory and will scan it only after a given interval since the
last modification of the timestamp file. This is for performance
purpose, we don't want to scan continuously the folder.
- Entry expiration: this is the time after which a file that hasn't
been used is remove from the cache.
- Maximum size: expressed in percentage of the available disk space,
it helps to avoid that we blow up the disk space.
http://reviews.llvm.org/D18422
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265209
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Sat, 2 Apr 2016 01:03:41 +0000 (01:03 +0000)]
Fix -Wpedantic warning about extra semi-colon
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265204
91177308-0d34-0410-b5e6-
96231b3b80d8
Rong Xu [Fri, 1 Apr 2016 23:16:44 +0000 (23:16 +0000)]
[PGO] Use a helper function to find all indirect call-sites
Use a helper function to find all the direct-calls-sites in a function.
Also split the code into a separated file as this will be use by
indirect-call-promotion transformation.
Differential Revision: http://reviews.llvm.org/D18704
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265199
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 1 Apr 2016 23:14:52 +0000 (23:14 +0000)]
AArch64: avoid clobbering SP for dead MOVimm pseudos.
We were producing ORR, which actually defines a GPR32sp rather than a GPR32.
Should fix PR23209.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265198
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Fri, 1 Apr 2016 22:21:51 +0000 (22:21 +0000)]
Make DIASession work if msdia*.dll isn't registered.
This fixes various symbolization test failures for me when I build with a
hermetic VS2015 without having run the 2015 installer.
http://reviews.llvm.org/D18707
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265193
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Fri, 1 Apr 2016 22:18:43 +0000 (22:18 +0000)]
Add missing emissionKind flags to the DICompileUnits of several old testcases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265192
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Fri, 1 Apr 2016 21:53:50 +0000 (21:53 +0000)]
ThinLTO: special handling for LinkOnce functions
These function can be dropped by the compiler if they are no longer
referenced in the current module. However there is a change that
another module is still referencing them because of the import.
Multiple solutions can be used:
- Always import LinkOnce when a caller is imported. This ensure that
every module with a call to a LinkOnce has the definition and will
be able to emit it if it emits the call.
- Turn the LinkOnce into Weak, so that it is always emitted.
- Turn all LinkOnce into available_externally and come back after all
modules are codegen'ed to emit only one copy of the linkonce, when
there is still a reference to it.
This patch implement the second option, with am optimization that
only *one* module will turn the LinkOnce into Weak, while the others
will turn it into available_externally, so that there is exactly one
copy emitted for the whole compilation.
http://reviews.llvm.org/D18346
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265190
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Fri, 1 Apr 2016 21:41:15 +0000 (21:41 +0000)]
Swift Calling Convention: add swifterror attribute.
A ``swifterror`` attribute can be applied to a function parameter or an
AllocaInst.
This commit does not include any target-specific change. The target-specific
optimization will come as a follow-up patch.
Differential Revision: http://reviews.llvm.org/D18092
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265189
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 1 Apr 2016 21:30:48 +0000 (21:30 +0000)]
[X86][SSE] Regenerated vector float tests - fabs / floor(etc.) / fneg / float2double
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265186
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 1 Apr 2016 21:06:17 +0000 (21:06 +0000)]
[X86][SSE] Vector i64 load tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265185
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 1 Apr 2016 21:00:00 +0000 (21:00 +0000)]
[X86][SSE] Regenerated comparison mask and float immediate tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265184
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 1 Apr 2016 20:55:19 +0000 (20:55 +0000)]
[X86][SSE] Regenerated the vec_extract tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265183
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 1 Apr 2016 20:40:49 +0000 (20:40 +0000)]
Update owners to reflect recent changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265182
91177308-0d34-0410-b5e6-
96231b3b80d8
Rong Xu [Fri, 1 Apr 2016 20:15:04 +0000 (20:15 +0000)]
Fix buildbot lldb-amd64-ninja-netbsd7 failure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265180
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 1 Apr 2016 19:42:23 +0000 (19:42 +0000)]
[X86][SSE] Regenerated the vec_insert tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265179
91177308-0d34-0410-b5e6-
96231b3b80d8
James Y Knight [Fri, 1 Apr 2016 19:33:19 +0000 (19:33 +0000)]
Remove useless check for ThreadModel==Single in ARMISelLowering. NFC.
ThreadModel::Single is already handled already by ARMPassConfig adding
LowerAtomicPass to the pass list, which lowers all atomics to non-atomic
ops and deletes fences.
So by the time we get to ISel, there's no atomic fences left, so they
don't need special handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265178
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Fri, 1 Apr 2016 18:46:50 +0000 (18:46 +0000)]
LowerBitSets: Move declarations to separate namespace.
Should fix modules build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265176
91177308-0d34-0410-b5e6-
96231b3b80d8
Mike Aizatsky [Fri, 1 Apr 2016 18:38:58 +0000 (18:38 +0000)]
[libfuzzer] adding license headers to cpp files
Differential Revision: http://reviews.llvm.org/D18705
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265174
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 1 Apr 2016 18:30:29 +0000 (18:30 +0000)]
[X86][SSE] Regenerated vec_partial tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265173
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 1 Apr 2016 18:29:25 +0000 (18:29 +0000)]
[x86] add an SSE2 + fast-unaligned accesses run for memset nonzero tests
Was there really no other way to splat a byte in SSE2?
punpcklbw {{.*#+}} xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
pshuflw {{.*#+}} xmm0 = xmm0[0,0,0,0,4,5,6,7]
pshufd {{.*#+}} xmm0 = xmm0[0,0,1,1]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265172
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 1 Apr 2016 18:28:23 +0000 (18:28 +0000)]
[X86][SSE] Regenerated vec_logical tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265171
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 1 Apr 2016 18:27:37 +0000 (18:27 +0000)]
AMDGPU: Implement {BUFFER,FLAT}_ATOMIC_CMPSWAP{,_X2}
Summary:
Implement BUFFER_ATOMIC_CMPSWAP{,_X2} instructions on all GCN targets, and FLAT_ATOMIC_CMPSWAP{,_X2} on CI+.
32-bit instruction variants tested manually on Kabini and Bonaire. Tests and parts of code provided by Jan Veselý.
Patch by: Vedran Miletić
Reviewers: arsenm, tstellarAMD, nhaehnle
Subscribers: jvesely, scchan, kanarayan, arsenm
Differential Revision: http://reviews.llvm.org/D17280
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265170
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 1 Apr 2016 18:18:40 +0000 (18:18 +0000)]
[X86][SSE] Regenerated vector sdiv to shifts tests
Added SSE + AVX1 tests as well as AVX2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265169
91177308-0d34-0410-b5e6-
96231b3b80d8
Mike Aizatsky [Fri, 1 Apr 2016 18:13:19 +0000 (18:13 +0000)]
[sancov] save entry block from pruning (it is always full dominator)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265168
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 1 Apr 2016 18:11:30 +0000 (18:11 +0000)]
[x86] add an SSE1 run for these tests
Note however that this is identical to the existing SSE2 run.
What we really want is yet another run for an SSE2 machine that
also has fast unaligned 16-byte accesses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265167
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 1 Apr 2016 17:55:02 +0000 (17:55 +0000)]
[X86][SSE] Regenerated vec_setcc tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265164
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 1 Apr 2016 17:40:25 +0000 (17:40 +0000)]
[X86][SSE] Regenerated the vec_set tests.
Replaced lots of dodgy greps with actual codegen
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265163
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 1 Apr 2016 17:36:45 +0000 (17:36 +0000)]
[x86] avoid intermediate splat for non-zero memsets (PR27100)
Follow-up to http://reviews.llvm.org/D18566 and http://reviews.llvm.org/D18676 -
where we noticed that an intermediate splat was being generated for memsets of
non-zero chars.
That was because we told getMemsetStores() to use a 32-bit vector element type,
and it happily obliged by producing that constant using an integer multiply.
The 16-byte test that was added in D18566 is now equivalent for AVX1 and AVX2
(no splats, just a vector load), but we have PR27141 to track that splat difference.
Note that the SSE1 path is not changed in this patch. That can be a follow-up.
This patch should resolve PR27100.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265161
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 1 Apr 2016 17:34:38 +0000 (17:34 +0000)]
[AArch64] Fix a typo. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265160
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Fri, 1 Apr 2016 17:28:17 +0000 (17:28 +0000)]
[InstCombine] Don't sink an instr after a catchswitch
A catchswitch is a terminator, instructions cannot be inserted after it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265158
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Fri, 1 Apr 2016 17:28:15 +0000 (17:28 +0000)]
[SLPVectorizer] Don't insert an extractelement before a catchswitch
A catchswitch cannot be preceded by another instruction in the same
basic block (other than a PHI node).
Instead, insert the extract element right after the materialization of
the vectorized value. This isn't optimal but is a reasonable compromise
given the constraints of WinEH.
This fixes PR27163.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265157
91177308-0d34-0410-b5e6-
96231b3b80d8
Rong Xu [Fri, 1 Apr 2016 16:43:30 +0000 (16:43 +0000)]
[PGO] Refactor PGOFuncName meta data code to be used in clang
Refactor the code that gets and creates PGOFuncName meta data so that it can be
used in clang's value profile annotation.
Differential Revision: http://reviews.llvm.org/D18623
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265149
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 1 Apr 2016 16:27:14 +0000 (16:27 +0000)]
[x86] avoid intermediate splat for non-zero memsets (PR27100)
Follow-up to D18566 - where we noticed that an intermediate splat was being
generated for memsets of non-zero chars.
That was because we told getMemsetStores() to use a 32-bit vector element type,
and it happily obliged by producing that constant using an integer multiply.
The tests that were added in the last patch are now equivalent for AVX1 and AVX2
(no splats, just a vector load), but we have PR27141 to track that splat difference.
In the new tests, the splat via shuffling looks ok to me, but there might be some
room for improvement depending on uarch there.
Note that the SSE1/2 paths are not changed in this patch. That can be a follow-up.
This patch should resolve PR27100.
Differential Revision: http://reviews.llvm.org/D18676
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265148
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 1 Apr 2016 15:51:51 +0000 (15:51 +0000)]
[ADT] Make StringMap's tombstone aligned.
This avoids undefined behavior when casting pointers to it. Also make
sure that we don't cast to a derived StringMapEntry before checking for
tombstone, as that may have different alignment requirements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265145
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Fri, 1 Apr 2016 15:45:33 +0000 (15:45 +0000)]
[PGOProfile] Rename a test to make it more reusable, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265144
91177308-0d34-0410-b5e6-
96231b3b80d8
Valery Pykhtin [Fri, 1 Apr 2016 13:13:12 +0000 (13:13 +0000)]
[AMDGPU] fix MADAK/MADMK instructions operand namings to match encoding fields.
$vsrc1 -> $src1, $k -> $imm
Differential Revision: http://reviews.llvm.org/D18659
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265141
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Fri, 1 Apr 2016 12:25:44 +0000 (12:25 +0000)]
[x86] Remove redundant call to setTargetDAGCombine for BUILD_VECTOR node type.
Since revision 235394, we no longer perform target specific combines on
build_vector nodes. No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265138
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 1 Apr 2016 11:57:51 +0000 (11:57 +0000)]
[X86][AVX512] Regenerated intrinsics tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265135
91177308-0d34-0410-b5e6-
96231b3b80d8
Sagar Thakur [Fri, 1 Apr 2016 11:55:33 +0000 (11:55 +0000)]
[MIPS][LLVM-MC] Fix JR encoding for MIPSR6 ISA
Summary: The assembler was picking the wrong JR variant because the pre-R6 one was still enabled at R6.
Author: nitesh.jain
Reviewers: vkalintiris, dsanders
Subscribers: dsanders, llvm-commits, mohit.bhakkad, sagar, bhushan, jaydeep
Differential: D18387
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265134
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 1 Apr 2016 11:49:59 +0000 (11:49 +0000)]
[ThinLTO] Fix uninitialized flags.
Found by msan. Patch by Adrian Kuegel!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265133
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrey Turetskiy [Fri, 1 Apr 2016 10:16:15 +0000 (10:16 +0000)]
[X86] Introduce Lakemont CPU.
Add a new Intel MCU CPU Lakemont, which doesn't support X87.
Differential Revision: http://reviews.llvm.org/D18650
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265128
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Fri, 1 Apr 2016 09:40:47 +0000 (09:40 +0000)]
Fix for pr24346: arm asm label calculation error in sub
Some ARM instructions encode 32-bit immediates as a 8-bit integer (0-255)
and a 4-bit rotation (0-30, even) in its least significant 12 bits. The
original fixup, FK_Data_4, patches the instruction by the value bit-to-bit,
regardless of the encoding. For example, assuming the label L1 and L2 are
0x0 and 0x104 respectively, the following instruction:
add r0, r0, #(L2 - L1) ; expects 0x104, i.e., 260
would be assembled to the following, which adds 1 to r0, instead of 260:
e2800104 add r0, r0, #4, 2 ; equivalently 1
The new fixup kind fixup_arm_mod_imm takes care of the encoding:
e2800f41 add r0, r0, #260
Patch by Ting-Yuan Huang!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265122
91177308-0d34-0410-b5e6-
96231b3b80d8
Oliver Stannard [Fri, 1 Apr 2016 09:14:50 +0000 (09:14 +0000)]
[AArch64] Better errors for out-of-range fixups
When a fixup that can be resolved by the assembler is out of range, we should
report an error in the source, rather than crashing.
Differential Revision: http://reviews.llvm.org/D18402
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265120
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Fri, 1 Apr 2016 08:22:59 +0000 (08:22 +0000)]
ThinLTO: move ObjCARCContractPass in the CodeGen pipeline
This is to be coherent with Full LTO.
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265118
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeroen Ketema [Fri, 1 Apr 2016 07:56:17 +0000 (07:56 +0000)]
[OCaml] Use LLVMCreateMessage with constant strings when calling llvm_raise
The llvm_string_of_message function, called by llvm_raise, calls
LLVMDisposeMessage, which expects the message to be dynamically
allocated; it fails freeing the message otherwise. So always
dynamically allocate with LLVMCreateMessage.
Differential Revision: http://reviews.llvm.org/D18675
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265116
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeroen Ketema [Fri, 1 Apr 2016 07:54:24 +0000 (07:54 +0000)]
[OCaml] Reinstate data_layout
Expose LLVMCreateTargetMachineData as data_layout.
As r263530 did for go. From that commit: "LLVMGetTargetDataLayout was
removed from the C API, and then TargetMachine.TargetData was removed.
Later, LLVMCreateTargetMachineData was added to the C API"
Differential Revision: http://reviews.llvm.org/D18677
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265115
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Fri, 1 Apr 2016 06:47:02 +0000 (06:47 +0000)]
Add a libLTO API to stop/restart ThinLTO between optimizations and CodeGen
This allows the linker to instruct ThinLTO to perform only the
optimization part or only the codegen part of the process.
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265113
91177308-0d34-0410-b5e6-
96231b3b80d8
Chuang-Yu Cheng [Fri, 1 Apr 2016 06:44:32 +0000 (06:44 +0000)]
[PPC64] Bug fix: when enabling sibling-call-opt and shrink-wrapping, the tail call branch instruction might disappear
Bug Pattern:
# BB#0: # %entry
cmpldi 3, 0
beq- 0, .LBB0_2
# BB#1: # %exit
lwz 4, 0(3)
#TC_RETURNd8 LVComputationKind 0
.LBB0_2: # %cond.false
mflr 0
std 0, 16(1)
stdu 1, -96(1)
.Ltmp0:
.cfi_def_cfa_offset 96
.Ltmp1:
.cfi_offset lr, 16
bl __assert_fail
nop
The branch instruction for tail call return is not generated, because the
shrink-wrapping pass choosing a new Restore Point: %cond.false, so %exit
block is not sent to emitEpilogue, that's why the branch is not generated.
Thanks Kit's opinions!
Reviewers: nemanjai hfinkel tjablin kbarton
http://reviews.llvm.org/D17606
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265112
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Fri, 1 Apr 2016 05:33:11 +0000 (05:33 +0000)]
Add a module Hash in the bitcode and the combined index, implementing a kind of "build-id"
This is intended to be used for ThinLTO incremental build.
Differential Revision: http://reviews.llvm.org/D18213
This is a recommit of r265095 after fixing the Windows issues.
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265111
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Fri, 1 Apr 2016 05:19:14 +0000 (05:19 +0000)]
Fix MSVC warning "comparison of integers of different signs" (NFC)
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265110
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Fri, 1 Apr 2016 05:12:24 +0000 (05:12 +0000)]
Fix S390 big endian detection
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265109
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Fri, 1 Apr 2016 05:12:18 +0000 (05:12 +0000)]
Const correctness in raw_sha1_ostream (NFC)
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265108
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Fri, 1 Apr 2016 04:30:16 +0000 (04:30 +0000)]
Add support for computing SHA1 in LLVM
Provide a class to generate a SHA1 from a sequence of bytes, and
a convenience raw_ostream adaptor.
This will be used to provide a "build-id" by hashing the Module
block when writing bitcode. ThinLTO will use this information for
incremental build.
Reapply r265094 which was reverted in r265102 because it broke
MSVC bots (constexpr is not supported).
http://reviews.llvm.org/D16325
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265107
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Fri, 1 Apr 2016 03:54:03 +0000 (03:54 +0000)]
Improve CHECK-NOT robustness of dllexport tests
This changes some dllexport tests, to verify that some symbols that
should not be exported are not, in a way that improves the robustness
of CHECK-SAME interaction with CHECK-NOT.
We plan to enable dllimport/dllexport support for the PS4, and these
changes are for points we noticed in our internal testing.
Patch by Warren Ristow!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265106
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Fri, 1 Apr 2016 03:45:08 +0000 (03:45 +0000)]
Use range-based for loops. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265105
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Fri, 1 Apr 2016 03:03:21 +0000 (03:03 +0000)]
Revert "Add support for computing SHA1 in LLVM"
This reverts commit r265096, r265095, and r265094.
Windows build is broken, and the validation does not pass.
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265102
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Fri, 1 Apr 2016 02:51:30 +0000 (02:51 +0000)]
Don't insert stackrestore on deoptimizing returns
They're not necessary (since the stack pointer is trivially restored on
return), and the way LLVM inserts the stackrestore calls breaks the
IR (we get a stackrestore between the deoptimize call and the return).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265101
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Fri, 1 Apr 2016 02:51:26 +0000 (02:51 +0000)]
Don't insert lifetime end markers on deoptimizing returns
They're not necessary (since the lifetime of the alloca is trivially
over due to the return), and the way LLVM inserts the lifetime.end
markers breaks the IR (we get a lifetime end marker between the
deoptimize call and the return).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265100
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Fri, 1 Apr 2016 02:51:21 +0000 (02:51 +0000)]
Don't use an i64 return type with webkit_jscc
Re-enable an assertion enabled by Justin Lebar in rL265092. rL265092
was breaking test/CodeGen/X86/deopt-intrinsic.ll because webkit_jscc
does not like non-i64 return types. Change the test case to not do
that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265099
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Fri, 1 Apr 2016 02:49:17 +0000 (02:49 +0000)]
AArch64ISelLowering: Remove unused variables/arguments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265098
91177308-0d34-0410-b5e6-
96231b3b80d8
Chuang-Yu Cheng [Fri, 1 Apr 2016 02:05:29 +0000 (02:05 +0000)]
Fix Sub-register Rewriting in Aggressive Anti-Dependence Breaker
Previously, HandleLastUse would delete RegRef information for sub-registers
if they were dead even if their corresponding super-register were still live.
If the super-register were later renamed, then the definitions of the
sub-register would not be updated appropriately. This patch alters the
behavior so that RegInfo information for sub-registers is only deleted when
the sub-register and super-register are both dead.
This resolves PR26775. This is the mirror image of Hal's r227311 commit.
Author: Tom Jablin (tjablin)
Reviewers: kbarton uweigand nemanjai hfinkel
http://reviews.llvm.org/D18448
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265097
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Fri, 1 Apr 2016 01:37:52 +0000 (01:37 +0000)]
Add missing test for the "Module hash in bitcode" added in r265095
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265096
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Fri, 1 Apr 2016 01:30:06 +0000 (01:30 +0000)]
Add a module Hash in the bitcode and the combined index, implementing a kind of "build-id"
This is intended to be used for ThinLTO incremental build.
Differential Revision: http://reviews.llvm.org/D18213
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265095
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Fri, 1 Apr 2016 01:29:54 +0000 (01:29 +0000)]
Add support for computing SHA1 in LLVM
Provide a class to generate a SHA1 from a sequence of bytes, and
a convenience raw_ostream adaptor.
This will be used to provide a "build-id" by hashing the Module
block when writing bitcode. ThinLTO will use this information for
incremental build.
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265094
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Fri, 1 Apr 2016 01:23:23 +0000 (01:23 +0000)]
Revert "Protect some assertions with NDEBUG rather than DEBUG()."
This reverts r265092, because it breaks CodeGen/X86/deopt-intrinsic.ll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265093
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Fri, 1 Apr 2016 01:09:12 +0000 (01:09 +0000)]
Protect some assertions with NDEBUG rather than DEBUG().
DEBUG() only runs if you pass -debug, but these assertions are generally
useful.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265092
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Fri, 1 Apr 2016 01:09:10 +0000 (01:09 +0000)]
[NVPTX] Add a truncate DAG node to some calls.
Summary:
Previously, we were running afoul of the assertion
EVT(CLI.Ins[i].VT) == InVals[i].getValueType() && "LowerCall emitted a value with the wrong type!"
in SelectionDAGBuilder.cpp when running the NVPTX/i8-param.ll test.
This is because our backend (for some reason) treats small return values
as i32, but it wasn't ever truncating the i32 back down to the expected
width in the DAG.
Unclear to me whether this fixes any actual bugs -- in this test, at
least, the generated code is unchanged.
Reviewers: jingyue
Subscribers: llvm-commits, tra, jholewinski
Differential Revision: http://reviews.llvm.org/D17872
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265091
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Fri, 1 Apr 2016 01:09:07 +0000 (01:09 +0000)]
[NVPTX] Read __CUDA_FTZ from module flags in NVVMReflect.
Summary:
Previously the NVVMReflect pass would read its configuration from
command-line flags or a static configuration given to the pass at
instantiation time.
This doesn't quite work for clang's use-case. It needs to pass a value
for __CUDA_FTZ down on a per-module basis. We use a module flag for
this, so the NVVMReflect pass needs to be updated to read said flag.
Reviewers: tra, rnk
Subscribers: cfe-commits, jholewinski
Differential Revision: http://reviews.llvm.org/D18672
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265090
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Fri, 1 Apr 2016 01:09:05 +0000 (01:09 +0000)]
[NVPTX] Annotate some instructions as hasSideEffects = 0.
Summary:
Tablegen tries to infer this from the selection DAG patterns defined for
the instructions, but it can't always.
An instructive example is CLZr64. CLZr32 is correctly inferred to have
no side-effects, but the selection DAG pattern for CLZr64 is slightly
more complicated, and in particular the ctlz DAG node is not at the root
of the pattern. Thus tablegen can't infer that CLZr64 has no
side-effects.
Reviewers: jholewinski
Subscribers: jholewinski, tra, llvm-commits
Differential Revision: http://reviews.llvm.org/D17472
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265089
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Lebar [Fri, 1 Apr 2016 01:09:03 +0000 (01:09 +0000)]
[ifcnv] Add brief comment explaining what ifcnv is.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265088
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Fri, 1 Apr 2016 00:52:05 +0000 (00:52 +0000)]
Fix Windows build (typo in disk_space() implementation)
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265087
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 1 Apr 2016 00:34:39 +0000 (00:34 +0000)]
[LoopVectorize] Don't unconditionally print vectorization diagnostics
when compiling with LTO.
r244523 a new class DiagnosticInfoOptimizationRemarkAnalysisAliasing for
optimization analysis remarks related to pointer aliasing without
guarding it in isDiagnosticEnabled in LLVMContext.cpp. This caused the
diagnostic message to be printed unconditionally when compiling with
LTO.
This commit cleans up isDiagnosticEnabled and makes sure all the
vectorization optimization remarks are guarded.
rdar://problem/
25382153
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265084
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Fri, 1 Apr 2016 00:18:08 +0000 (00:18 +0000)]
Add disk_space() to llvm::fs
Summary: Adapted from Boost::filesystem.
(This is a reapply by reverting commit r265080 and fixing the WinAPI part)
Differential Revision: http://reviews.llvm.org/D18467
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265082
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Fri, 1 Apr 2016 00:16:49 +0000 (00:16 +0000)]
testcase gardening: update the emissionKind enum to the new syntax. (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265081
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Fri, 1 Apr 2016 00:13:31 +0000 (00:13 +0000)]
Revert "Add disk_space() to llvm::fs"
This reverts commit r265074 and r265068.
Breaks windows build
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265080
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Fri, 1 Apr 2016 00:00:27 +0000 (00:00 +0000)]
Fix a captialization error in r265077.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265079
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Thu, 31 Mar 2016 23:56:58 +0000 (23:56 +0000)]
Move the DebugEmissionKind enum from DIBuilder into DICompileUnit.
This mostly cosmetic patch moves the DebugEmissionKind enum from DIBuilder
into DICompileUnit. DIBuilder is not the right place for this enum to live
in — a metadata consumer should not have to include DIBuilder.h.
I also added a Verifier check that checks that the emission kind of a
DICompileUnit is actually legal.
http://reviews.llvm.org/D18612
<rdar://problem/
25427165>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265077
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 31 Mar 2016 23:55:16 +0000 (23:55 +0000)]
Follow-up to r265036: I got these iterators mixed up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265076
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Thu, 31 Mar 2016 23:27:37 +0000 (23:27 +0000)]
clang-format the large enum definitions in LLVMBitCodes.h
Suggestion from Duncan in a review thread.
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265075
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Thu, 31 Mar 2016 23:14:45 +0000 (23:14 +0000)]
Use const ref instead of value for Twine in the disk_space() API
Thanks Rui for noticing!
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265074
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Thu, 31 Mar 2016 23:08:55 +0000 (23:08 +0000)]
lit: python3 compatibility fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265070
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 31 Mar 2016 23:07:50 +0000 (23:07 +0000)]
Create thin archive in GNU format to fix test on OS X.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265069
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Thu, 31 Mar 2016 23:05:26 +0000 (23:05 +0000)]
Add disk_space() to llvm::fs
Summary: Adapted from Boost::filesystem.
(This is a reapply by reverting commit r265062 and fixing the WinAPI part)
Differential Revision: http://reviews.llvm.org/D18467
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265068
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Shen [Thu, 31 Mar 2016 22:32:10 +0000 (22:32 +0000)]
Move asm-printer-topological-order.ll to PowerPC backend
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265067
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 31 Mar 2016 22:08:57 +0000 (22:08 +0000)]
Object: Add function for moving thin archive object buffer vector out of Archive.
Differential Revision: http://reviews.llvm.org/D18664
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265066
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 31 Mar 2016 22:08:31 +0000 (22:08 +0000)]
Object: Correctly read thin archives containing absolute paths.
Differential Revision: http://reviews.llvm.org/D18666
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265065
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Shen [Thu, 31 Mar 2016 22:08:19 +0000 (22:08 +0000)]
[AsmPrinter] Print aliases in topological order
Print aliases in topological order, that is, for any alias a = b,
b must be printed before a. This is because on some targets (e.g. PowerPC)
linker expects aliases in such an order to generate correct TOC information.
GCC also prints aliases in topological order.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265064
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 31 Mar 2016 21:55:58 +0000 (21:55 +0000)]
Fix PR26940 where compiles times regressed massively.
Patch by Jonas Paulsson. Original description:
Bugfix in buildSchedGraph() to make -dag-maps-huge-region work properly
I found that the reduction of the maps did in fact never happen in this
test case. This was because *all* the stores / loads were made with
addresses from arguments and they thus became "unknown" stores / loads.
Fixed by removing continue statements and making sure that the test for
reduction always takes place.
Differential Revision: http://reviews.llvm.org/D18673
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265063
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Thu, 31 Mar 2016 21:55:35 +0000 (21:55 +0000)]
Revert "Add disk_space() to llvm::fs"
Breaks windows bot.
This reverts commit r265050.
This reverts commit r265055.
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265062
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Thu, 31 Mar 2016 21:55:11 +0000 (21:55 +0000)]
Preserve blockaddress use edges in the module splitter.
"blockaddress" can not apply to an external function. All
blockaddress constant uses must belong to the same module as the
definition of the target function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265061
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 31 Mar 2016 21:29:57 +0000 (21:29 +0000)]
[NVPTX] Infer __nvvm_reflect as nounwind, readnone
This patch simply mirrors the attributes we give to @llvm.nvvm.reflect
to the __nvvm_reflect libdevice call. This shaves about 30% of the code
in libdevice away because of CSE opportunities. It's also helps us
figure out that libdevice implementations of transcendental functions
don't have side-effects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265060
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 31 Mar 2016 21:13:49 +0000 (21:13 +0000)]
Wdocumentation parameter fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265055
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 31 Mar 2016 21:00:48 +0000 (21:00 +0000)]
fix typo; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265054
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 31 Mar 2016 20:57:36 +0000 (20:57 +0000)]
Fixed signed/unsigned warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265052
91177308-0d34-0410-b5e6-
96231b3b80d8
Jun Bum Lim [Thu, 31 Mar 2016 20:53:47 +0000 (20:53 +0000)]
[AArch64] Allow loads with imp-def to be handled in getMemOpBaseRegImmOfsWidth()
Summary:
This change will allow loads with imp-def to be clustered in machine-scheduler pass.
areMemAccessesTriviallyDisjoint() can also handle loads with imp-def.
Reviewers: mcrosier, jmolloy, t.p.northover
Subscribers: aemerson, rengolin, mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D18665
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265051
91177308-0d34-0410-b5e6-
96231b3b80d8