Yaxun Liu [Mon, 6 Nov 2017 14:32:33 +0000 (14:32 +0000)]
[AMDGPU] Change alloca addr space of r600 to 5 for amdgiz environment
Differential Revision: https://reviews.llvm.org/D39657
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317479
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Paulsson [Mon, 6 Nov 2017 13:10:31 +0000 (13:10 +0000)]
[SystemZ] implement hasDivRemOp()
SystemZ can do division and remainder in a single instruction for scalar
integer types, which are now reflected by returning true in this hook for
those cases.
Review: Ulrich Weigand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317477
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaxun Liu [Mon, 6 Nov 2017 13:01:33 +0000 (13:01 +0000)]
[AMDGPU] Fix assertion due to assuming pointer in default addr space is 32 bit
The backend assumes pointer in default addr space is 32 bit, which is not
true for the new addr space mapping and causes assertion for unresolved
functions.
This patch fixes that.
Differential Revision: https://reviews.llvm.org/D39643
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317476
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Mon, 6 Nov 2017 12:59:53 +0000 (12:59 +0000)]
[mips] Add movep for microMIPS32R6 and fix microMIPS32r3 version
Previously, the 'movep' instruction was defined for microMIPS32r3 and
shared that definition with microMIPS32R6. 'movep' was re-encoded for
microMIPS32r6, so this patch provides the correct encoding.
Secondly, correct the encoding of the 'rs' and 'rt' operands which have
an instruction specific encoding for the registers those operands accept.
Finally, correct the decoding of the 'dst_regs' operand which was extracting
the relevant field from the instruction, but was actually extracting the
field from the alreadly extracted field.
Reviewers: atanasyan
Differential Revision: https://reviews.llvm.org/D39495
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317475
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Devlieghere [Mon, 6 Nov 2017 11:47:24 +0000 (11:47 +0000)]
[docs] Update code block for compatibility with Sphinx 1.5.1
It is currently not possible to build the documentation with cmake and
the same version of Sphinx (1.5.1) used to generate the public facing
documentation on llvm.org. When code blocks cannot be parsed by
Pygments, it generates a warning which is treated as an error.
In addition to being annoying and confusing for developers, this
needlessly increases the bar for newcomers that want to get involved.
This patch removes the language specifier from the affected block. The
result is the same as when parsing fails: the block are not highlighted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317472
91177308-0d34-0410-b5e6-
96231b3b80d8
Mohammed Agabaria [Mon, 6 Nov 2017 10:56:20 +0000 (10:56 +0000)]
[LV][X86] update the cost of interleaving mem. access of floats
Recommit:
This patch contains update of the costs of interleaved loads of v8f32 of stride 3 and 8.
fixed the location of the lit test it works with make check-all.
Differential Revision: https://reviews.llvm.org/D39403
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317471
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Mon, 6 Nov 2017 10:50:04 +0000 (10:50 +0000)]
[mips] Fix PR35140
Mark all symbols involved with TLS relocations as being TLS symbols.
This resolves PR35140.
Thanks to Alex Crichton for reporting the issue!
Reviewers: atanasyan
Differential Revision: https://reviews.llvm.org/D39591
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317470
91177308-0d34-0410-b5e6-
96231b3b80d8
Raphael Isemann [Mon, 6 Nov 2017 09:51:39 +0000 (09:51 +0000)]
Fixed dead links in WritingAnLLVMPass.rst
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317467
91177308-0d34-0410-b5e6-
96231b3b80d8
Uriel Korach [Mon, 6 Nov 2017 09:22:38 +0000 (09:22 +0000)]
[X86][AVX512] Improve lowering of AVX512 test intrinsics
Added TESTM and TESTNM to the list of instructions that already zeroing unused upper bits
and does not need the redundant shift left and shift right instructions afterwards.
Added a pattern for TESTM and TESTNM in iselLowering, so now icmp(neq,and(X,Y), 0) goes folds into TESTM
and icmp(eq,and(X,Y), 0) goes folds into TESTNM
This commit is a preparation for lowering the test and testn X86 intrinsics to IR.
Differential Revision: https://reviews.llvm.org/D38732
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317465
91177308-0d34-0410-b5e6-
96231b3b80d8
Uriel Korach [Mon, 6 Nov 2017 08:32:45 +0000 (08:32 +0000)]
[X86] Replace duplicate function call with variable. NFC
Change from:
if (N->getOperand(0).getValueType() == MVT::v8i32 ||
N->getOperand(0).getValueType() == MVT::v8f32)
to:
EVT OpVT = N->getOperand(0).getValueType();
if (OpVT == MVT::v8i32 || OpVT == MVT::v8f32)
Change-Id: I5a105f8710b73a828e6cfcd55fac2eae6153ce25
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317464
91177308-0d34-0410-b5e6-
96231b3b80d8
Zvi Rackover [Mon, 6 Nov 2017 08:25:46 +0000 (08:25 +0000)]
X86 ISel: Basic support for variable-index vector permutations
Summary:
Try to lower a BUILD_VECTOR composed of extract-extract chains that can be
reasoned to be a permutation of a vector by indices in a non-constant vector.
We saw this pattern created by ISPC, which resolts to creating it due to the
requirement that shufflevector's mask operand be a *constant* vector.
I didn't check this but we could possibly use this pattern for lowering the X86 permute
C-instrinsics instead of llvm.x86 instrinsics.
This change can be followed by more improvements:
1. Handle vectors with undef elements.
2. Utilize pshufb and zero-mask-blending to support more effiecient
construction of vectors with constant-0 elements.
3. Use smaller-element vectors of same width, and "interpolate" the indices,
when no native operation available.
Reviewers: RKSimon, craig.topper
Reviewed By: RKSimon
Subscribers: chandlerc, DavidKreitzer
Differential Revision: https://reviews.llvm.org/D39126
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317463
91177308-0d34-0410-b5e6-
96231b3b80d8
Jina Nahias [Mon, 6 Nov 2017 07:48:58 +0000 (07:48 +0000)]
Revert "adding a pattern for broadcastm"
This reverts commit r317457.
Change-Id: If07f1fca1e3453d16c1dac906e87768661384e91
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317462
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Mon, 6 Nov 2017 07:36:17 +0000 (07:36 +0000)]
[test] Add test files that were missed from SVN r317459
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317461
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Mon, 6 Nov 2017 07:20:58 +0000 (07:20 +0000)]
[ObjectYAML] Map relocation types for COFF ARMNT and ARM64
Differential Revision: https://reviews.llvm.org/D39668
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317459
91177308-0d34-0410-b5e6-
96231b3b80d8
Jina Nahias [Mon, 6 Nov 2017 07:09:24 +0000 (07:09 +0000)]
[x86][AVX512] Lowering Broadcastm intrinsics to LLVM IR
This patch, together with a matching clang patch (https://reviews.llvm.org/D38683), implements the lowering of X86 broadcastm intrinsics to IR.
Differential Revision: https://reviews.llvm.org/D38684
Change-Id: I709ac0b34641095397e994c8ff7e15d1315b3540
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317458
91177308-0d34-0410-b5e6-
96231b3b80d8
Jina Nahias [Mon, 6 Nov 2017 07:09:09 +0000 (07:09 +0000)]
adding a pattern for broadcastm
Change-Id: I6551fb13879e098aed74de410e29815cf37d9ab5
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317457
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 6 Nov 2017 05:48:26 +0000 (05:48 +0000)]
[X86] Use EVEX encoded intrinsics for legacy FMA intrinsics when possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317454
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 6 Nov 2017 05:48:25 +0000 (05:48 +0000)]
[X86] Add scalar FMA ISD nodes without rounding mode. NFC
Next step is to use them for the legacy FMA scalar intrinsics as well. This will enable the legacy intrinsics to use EVEX encoded opcodes and the extended registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317453
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 6 Nov 2017 05:48:24 +0000 (05:48 +0000)]
[X86] Add avx512vl command line to fma-instrinsics-x86.ll
Some of these demonstrate a missed EVEX to VEX compression because we aren't prefering EVEX instructions during isel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317452
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 6 Nov 2017 05:48:23 +0000 (05:48 +0000)]
[X86] Simplify command lines on the fma-instrinsics-x86.ll test and add -show-mc-encoding.
Use feature names instead of CPU names.
A future commit will add avx512vl command lines to demonstrate missed use of EVEX instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317451
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 6 Nov 2017 04:04:01 +0000 (04:04 +0000)]
[X86] Use EVEX encoded instructions for legacy scalar sqrt intrinsics.
Fixes PR35161.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317445
91177308-0d34-0410-b5e6-
96231b3b80d8
David L. Jones [Mon, 6 Nov 2017 00:32:01 +0000 (00:32 +0000)]
[PassManager, SimplifyCFG] Revert r316908 and r316869.
These cause Clang to crash with a segfault. See PR35210 for details.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317444
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 5 Nov 2017 21:14:06 +0000 (21:14 +0000)]
[X86] Add missing predicate to a pattern. NFC
Other patterns had higher priority so this wasn't noticed. But we shouldn't be dependent on pattern order.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317442
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 5 Nov 2017 21:14:05 +0000 (21:14 +0000)]
[X86] Remove some more RCP and RSQRT patterns from InstrAVX512.td that I missed in r317413.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317441
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 5 Nov 2017 21:14:04 +0000 (21:14 +0000)]
[X86] Fix outdated comment. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317440
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 5 Nov 2017 19:48:24 +0000 (19:48 +0000)]
[X86][SSE] Tests for integer min/max horizontal reductions
Matching patterns that vectorizers should have created for us.
The experimental intrinsics should probably be added as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317439
91177308-0d34-0410-b5e6-
96231b3b80d8
Dorit Nuzman [Sun, 5 Nov 2017 16:53:15 +0000 (16:53 +0000)]
[LV/LAA] Avoid specializing a loop for stride=1 when this predicate implies a
single-iteration loop
This fixes PR34681. Avoid adding the "Stride == 1" predicate when we know that
Stride >= Trip-Count. Such a predicate will effectively optimize a single
or zero iteration loop, as Trip-Count <= Stride == 1.
Differential Revision: https://reviews.llvm.org/D38785
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317438
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 5 Nov 2017 16:11:01 +0000 (16:11 +0000)]
[SLPVectorizer] minimize tests and auto-generate full checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317437
91177308-0d34-0410-b5e6-
96231b3b80d8
Mohammed Agabaria [Sun, 5 Nov 2017 09:36:54 +0000 (09:36 +0000)]
[REVERT][LV][X86] update the cost of interleaving mem. access of floats
reverted my changes will be committed later after fixing the failure
This patch contains update of the costs of interleaved loads of v8f32 of stride 3 and 8.
Differential Revision: https://reviews.llvm.org/D39403
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317433
91177308-0d34-0410-b5e6-
96231b3b80d8
Mohammed Agabaria [Sun, 5 Nov 2017 09:06:23 +0000 (09:06 +0000)]
[LV][X86] update the cost of interleaving mem. access of floats
This patch contains update of the costs of interleaved loads of v8f32 of stride 3 and 8.
Differential Revision: https://reviews.llvm.org/D39403
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317432
91177308-0d34-0410-b5e6-
96231b3b80d8
Serguei Katkov [Sun, 5 Nov 2017 07:59:02 +0000 (07:59 +0000)]
[CGP] Fix the bug found by asan.
Try to fix the asan failure introduced by r317429.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317431
91177308-0d34-0410-b5e6-
96231b3b80d8
Serguei Katkov [Sun, 5 Nov 2017 05:51:44 +0000 (05:51 +0000)]
[CGP] Extends the scope of optimizeMemoryInst optimization. NFC
Commit tests for previous commit.
Reviewers: efriedma, dberlin, mkazantsev, reames, john.brawn
Reviewed By: john.brawn
Subscribers: javed.absar, john.brawn, dneilson, llvm-commits
Differential Revision: https://reviews.llvm.org/D36073
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317430
91177308-0d34-0410-b5e6-
96231b3b80d8
Serguei Katkov [Sun, 5 Nov 2017 05:50:33 +0000 (05:50 +0000)]
[CGP] Extends the scope of optimizeMemoryInst optimization
This is an implementation of PR26223.
Currently optimizeMemoryInst optimization tries to fold address computation
if all possible way to get compute the address are of the form
baseGV + base + scale * Index + offset
where scale and offset are constants and baseGV, base and Index are exactly
the same instructions if defined.
The patch extends this optimization to allow different bases. In this case
it tries to find/build a Phi node merging all possible bases and use this Phi node
as a base for sunk address computation. Also it supports Select instruction on
the way.
The main motivation for this scope extension is GCRelocateInst.
If there is a relocation of derived pointer it will be represented as relocation of base + offset.
Also there will be a Phi node merging address computation for relocated derived pointer
and derived pointer itself. If we have a Phi node merging original base and relocated base
and can fold the address computation of derived pointer then we can potentially reduce
the code size and Phi node for derived pointer. The later can have a positive impact to
register allocator.
Reviewers: efriedma, dberlin, mkazantsev, reames, john.brawn
Reviewed By: john.brawn
Subscribers: javed.absar, john.brawn, dneilson, llvm-commits
Differential Revision: https://reviews.llvm.org/D36073
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317429
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 4 Nov 2017 21:18:06 +0000 (21:18 +0000)]
[X86][AVX] Regenerate test. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317424
91177308-0d34-0410-b5e6-
96231b3b80d8
Harlan Haskins [Sat, 4 Nov 2017 20:31:20 +0000 (20:31 +0000)]
Use code voice for DIBuilder in LLVM C API
(This is a test commit)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317422
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Sat, 4 Nov 2017 20:07:16 +0000 (20:07 +0000)]
Move the llvm-tblgen project into the Tablegenning folder on IDEs like Visual Studio rather than leave it in the root directory. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317420
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Sat, 4 Nov 2017 19:59:14 +0000 (19:59 +0000)]
Move the srpm, ocaml_make_directory, llvm_vcsrevision_h, and llvm-headers projects into the Misc folder on IDEs like Visual Studio rather than leave them in the root directory. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317416
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Sat, 4 Nov 2017 19:48:17 +0000 (19:48 +0000)]
Move the LLVMCFIVerify project into the Libraries folder on IDEs like Visual Studio rather than leave it in the root directory. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317415
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Sat, 4 Nov 2017 19:39:14 +0000 (19:39 +0000)]
Move these CMake projects into the Tests folder on IDEs like Visual Studio rather than leave it in the root directory. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317414
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 4 Nov 2017 18:26:41 +0000 (18:26 +0000)]
[X86] Don't use RCP14 and RSQRT14 for reciprocal estimations or for legacy SSE rcp/rsqrt intrinsics when AVX512 features are enabled.
Summary:
AVX512 added RCP14 and RSQRT instructions which improve accuracy over the legacy RCP and RSQRT instruction, but not enough accuracy to remove the need for a Newton Raphson refinement.
Currently we use these new instructions for the legacy packed SSE instrinics, but not the scalar instrinsics. And we use it for fast math optimization of division and reciprocal sqrt.
I think switching the legacy instrinsics maybe surprising to the user since it changes the answer based on which processor you're using regardless of any fastmath settings. It's also weird that we did something different between scalar and packed.
As far at the reciprocal estimation, I think it creates unnecessary deltas in our output behavior (and prevents EVEX->VEX). A little playing around with gcc and icc and godbolt suggest they don't change which instructions they use here.
This patch adds new X86ISD nodes for the RCP14/RSQRT14 and uses those for the new intrinsics. Leaving the old intrinsics to use the old instructions.
Going forward I think our focus should be on
-Supporting 512-bit vectors, which will have to use the RCP14/RSQRT14.
-Using RSQRT28/RCP28 to remove the Newton Raphson step on processors with AVX512ER
-Supporting double precision.
Reviewers: zvi, DavidKreitzer, RKSimon
Reviewed By: RKSimon
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D39583
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317413
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 4 Nov 2017 18:26:39 +0000 (18:26 +0000)]
[X86] Regenerate a couple more tests that I missed in r317410.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317412
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 4 Nov 2017 18:10:03 +0000 (18:10 +0000)]
[X86] Teach EVEX->VEX pass to turn SHUFI32X4/SHUFF32X4/SHUFI64X/SHUFF64X2 into VPERM2F128/VPERM2I128.
This recovers some of the tests that were changed by r317403.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317410
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaxun Liu [Sat, 4 Nov 2017 17:37:43 +0000 (17:37 +0000)]
[AMDGPU] Remove hardcoded address space value from AMDGPULibFunc
AMDGPULibFunc hardcodes address space values of the old address space mapping,
which causes invalid addrspacecast instructions and undefined functions in
APPSDK sample MonteCarloAsianDP.
This patch fixes that.
Differential Revision: https://reviews.llvm.org/D39616
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317409
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Fertile [Sat, 4 Nov 2017 17:04:39 +0000 (17:04 +0000)]
[LTO][ThinLTO] Use the linker resolutions to mark global values as dso_local.
Now that we have a way to mark GlobalValues as local we can use the symbol
resolutions that the linker plugin provides as part of lto/thinlto link
step to refine the compilers view on what symbols will end up being local.
Originally commited as r317374, but reverted in r317395 to update some missed
tests.
Differential Revision: https://reviews.llvm.org/D35702
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317408
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 4 Nov 2017 06:55:55 +0000 (06:55 +0000)]
llvm/test/lit.cfg.py: Don't set the feature "llvm-64-bits" if -m32 is specified.
FIXME: LLVM_BUILD_32_BITS should modify host_triple.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317404
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 4 Nov 2017 06:44:47 +0000 (06:44 +0000)]
[X86] Teach shuffle lowering to use 256-bit SHUF128 when possible.
This allows masked operations to be used and allows the register allocator to use YMM16-31 if necessary.
As a follow up I'll look into teaching EVEX->VEX how to turn this back into PERM2X128 if any of the additional features don't work out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317403
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 4 Nov 2017 06:03:29 +0000 (06:03 +0000)]
CMake: Let LLVM_BUILD_32_BITS aware of large file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317402
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 4 Nov 2017 06:00:11 +0000 (06:00 +0000)]
llvm/test/Object/archive-SYM64-write.test: Delete large temp files. They are 8GiB total.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317401
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Fertile [Sat, 4 Nov 2017 01:54:20 +0000 (01:54 +0000)]
Revert "[LTO][ThinLTO] Use the linker resolutions to mark global values ..."
Changes more tests then expected on one of the build bots.
reverting to investigate.
This reverts https://llvm.org/svn/llvm-project/llvm/trunk@317374
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317395
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Sat, 4 Nov 2017 00:44:01 +0000 (00:44 +0000)]
[CallSiteSplitting] clang-format my last commit. NFCI.
Thanks to Rui for pointing out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317393
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Fri, 3 Nov 2017 23:03:38 +0000 (23:03 +0000)]
[CallSiteSplitting] Silence GCC's -Wparentheses. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317385
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 3 Nov 2017 22:48:13 +0000 (22:48 +0000)]
[X86] Give unary PERMI priority over SHUF128 in lowerV8I64VectorShuffle to make it possible to fold a load.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317382
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 3 Nov 2017 22:32:11 +0000 (22:32 +0000)]
Move TargetFrameLowering.h to CodeGen where it's implemented
This header already includes a CodeGen header and is implemented in
lib/CodeGen, so move the header there to match.
This fixes a link error with modular codegeneration builds - where a
header and its implementation are circularly dependent and so need to be
in the same library, not split between two like this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317379
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Fri, 3 Nov 2017 21:55:03 +0000 (21:55 +0000)]
Invoke salvageDebugInfo from CodeGenPrepare's SinkCast()
This preserves the debug info for the cast operation in the original location.
rdar://problem/
33460652
Reapplied r317340 with the test moved into an ARM-specific directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317375
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Fertile [Fri, 3 Nov 2017 21:45:55 +0000 (21:45 +0000)]
[LTO][ThinLTO] Use the linker resolutions to mark global values as dso_local.
Now that we have a way to mark GlobalValues as local we can use the symbol
resolutions that the linker plugin provides as part of lto/thinlto link
step to refine the compilers view on what symbols will end up being local.
Differential Revision: https://reviews.llvm.org/D35702
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317374
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Fri, 3 Nov 2017 21:32:44 +0000 (21:32 +0000)]
Fix a crash in llvm-objdump when printing a bad x86_64 relocation in a Mach-O
file with a bad section number.
rdar://
35207539
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317373
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Fri, 3 Nov 2017 21:30:06 +0000 (21:30 +0000)]
Revert r317046, "Object: Move some code from ELF.h into ELF.cpp."
This change resulted in a measured 1.5-2% perf regression linking
chrome.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317371
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 3 Nov 2017 21:08:13 +0000 (21:08 +0000)]
[SimplifyCFG] When merging conditional stores, don't count the store we're merging against the PHINodeFoldingThreshold
Merging conditional stores tries to check to see if the code is if convertible after the store is moved. But the store hasn't been moved yet so its being counted against the threshold.
The patch adds 1 to the threshold comparison to make sure we don't count the store. I've adjusted a test to use a lower threshold to ensure we still do that conversion with the lower threshold.
Differential Revision: https://reviews.llvm.org/D39570
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317368
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 3 Nov 2017 20:57:10 +0000 (20:57 +0000)]
GCOV: Move GCOV from IR & Support into ProfileData to fix layering
This class was split between libIR and libSupport, which breaks under
modular code generation. Move it into the one library that uses it,
ProfileData, to resolve this issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317366
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 3 Nov 2017 20:57:09 +0000 (20:57 +0000)]
llvm-objdump: Fix unused-lambda-capture warning by removing unused lambda capture
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317365
91177308-0d34-0410-b5e6-
96231b3b80d8
Mitch Phillips [Fri, 3 Nov 2017 20:54:26 +0000 (20:54 +0000)]
[cfi-verify] Add blacklist parsing for result filtering.
Adds blacklist parsing behaviour for filtering results into four categories:
- Expected Protected: Things that are not in the blacklist and are protected.
- Unexpected Protected: Things that are in the blacklist and are protected.
- Expected Unprotected: Things that are in the blacklist and are unprotected.
- Unexpected Unprotected: Things that are not in the blacklist and are unprotected.
now can optionally be invoked with a second command line argument, which specifies the blacklist file that the binary was built with.
Current statistics for chromium:
Reviewers: vlad.tsyrklevich
Subscribers: mgorny, llvm-commits, pcc, kcc
Differential Revision: https://reviews.llvm.org/D39525
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317364
91177308-0d34-0410-b5e6-
96231b3b80d8
Jun Bum Lim [Fri, 3 Nov 2017 20:41:16 +0000 (20:41 +0000)]
Recommit r317351 : Add CallSiteSplitting pass
This recommit r317351 after fixing a buildbot failure.
Original commit message:
Summary:
This change add a pass which tries to split a call-site to pass
more constrained arguments if its argument is predicated in the control flow
so that we can expose better context to the later passes (e.g, inliner, jump
threading, or IPA-CP based function cloning, etc.).
As of now we support two cases :
1) If a call site is dominated by an OR condition and if any of its arguments
are predicated on this OR condition, try to split the condition with more
constrained arguments. For example, in the code below, we try to split the
call site since we can predicate the argument (ptr) based on the OR condition.
Split from :
if (!ptr || c)
callee(ptr);
to :
if (!ptr)
callee(null ptr) // set the known constant value
else if (c)
callee(nonnull ptr) // set non-null attribute in the argument
2) We can also split a call-site based on constant incoming values of a PHI
For example,
from :
BB0:
%c = icmp eq i32 %i1, %i2
br i1 %c, label %BB2, label %BB1
BB1:
br label %BB2
BB2:
%p = phi i32 [ 0, %BB0 ], [ 1, %BB1 ]
call void @bar(i32 %p)
to
BB0:
%c = icmp eq i32 %i1, %i2
br i1 %c, label %BB2-split0, label %BB1
BB1:
br label %BB2-split1
BB2-split0:
call void @bar(i32 0)
br label %BB2
BB2-split1:
call void @bar(i32 1)
br label %BB2
BB2:
%p = phi i32 [ 0, %BB2-split0 ], [ 1, %BB2-split1 ]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317362
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 3 Nov 2017 20:24:19 +0000 (20:24 +0000)]
Modularize: Include some required headers
DenseMaps require the definition of a type to be available when using a
pointer to that type as a key to know how many bits are available for
tombstone/etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317360
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Fri, 3 Nov 2017 20:09:10 +0000 (20:09 +0000)]
[llvm-ar] Support an options string that start with a dash
Some projects call $AR like "$AR -crs output input1 input2".
Differential Revision: https://reviews.llvm.org/D39538
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317358
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Fri, 3 Nov 2017 20:05:51 +0000 (20:05 +0000)]
Correcting some CRLFs that snuck in with my previous commit; NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317357
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Fri, 3 Nov 2017 20:01:25 +0000 (20:01 +0000)]
Add llvm::for_each as a range-based extensions to <algorithm> and make use of it in some cases where it is a more clear alternative to std::for_each.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317356
91177308-0d34-0410-b5e6-
96231b3b80d8
Mitch Phillips [Fri, 3 Nov 2017 20:00:05 +0000 (20:00 +0000)]
[cfi-verify] Add an interesting unit test where undef search length changes result.
Add an interesting unit test, found by changing --search-length-undef from the default. Program handles it correctly but good for ensuring correctness on further changes :)
Reviewers: pcc
Subscribers: mgorny, llvm-commits, kcc, vlad.tsyrklevich
Differential Revision: https://reviews.llvm.org/D38658
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317355
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 3 Nov 2017 19:37:41 +0000 (19:37 +0000)]
[X86] Promote athlon, athlon-xp, k8, and k8-sse3 to types instead of subtypes in getHostCPUName. NFCI
This removes the athlon type and simplifies the string decoding. We only really need these type/subtype breaks where we need to match libgcc/compiler-rt and these CPUs aren't part of that.
I'm looking into moving some of this information to a .def file to share with clang's __builtin_cpu_is handling. And while these CPUs aren't part of that the less lines I have to deal with in the .def file the better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317354
91177308-0d34-0410-b5e6-
96231b3b80d8
Jun Bum Lim [Fri, 3 Nov 2017 19:17:11 +0000 (19:17 +0000)]
Revert "Add CallSiteSplitting pass"
Revert due to Buildbot failure.
This reverts commit r317351.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317353
91177308-0d34-0410-b5e6-
96231b3b80d8
Jake Ehrlich [Fri, 3 Nov 2017 19:15:06 +0000 (19:15 +0000)]
Reland "Add support for writing 64-bit symbol tables for archives when offsets become too large for 32-bit"
Tests were failing because some bots were running out of address
space and memory. Additionally the test was very slow. These issues
were solved by changing the test to take advantage of sparse filse and
restricting the test to run only on 64-bit systems.
This should fix https://bugs.llvm.org//show_bug.cgi?id=34189
This change makes it so that if writing a K_GNU style archive, you need
to output a > 32-bit offset it should output in K_GNU64 style instead.
Differential Revision: https://reviews.llvm.org/D36812
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317352
91177308-0d34-0410-b5e6-
96231b3b80d8
Jun Bum Lim [Fri, 3 Nov 2017 19:01:57 +0000 (19:01 +0000)]
Add CallSiteSplitting pass
Summary:
This change add a pass which tries to split a call-site to pass
more constrained arguments if its argument is predicated in the control flow
so that we can expose better context to the later passes (e.g, inliner, jump
threading, or IPA-CP based function cloning, etc.).
As of now we support two cases :
1) If a call site is dominated by an OR condition and if any of its arguments
are predicated on this OR condition, try to split the condition with more
constrained arguments. For example, in the code below, we try to split the
call site since we can predicate the argument (ptr) based on the OR condition.
Split from :
if (!ptr || c)
callee(ptr);
to :
if (!ptr)
callee(null ptr) // set the known constant value
else if (c)
callee(nonnull ptr) // set non-null attribute in the argument
2) We can also split a call-site based on constant incoming values of a PHI
For example,
from :
BB0:
%c = icmp eq i32 %i1, %i2
br i1 %c, label %BB2, label %BB1
BB1:
br label %BB2
BB2:
%p = phi i32 [ 0, %BB0 ], [ 1, %BB1 ]
call void @bar(i32 %p)
to
BB0:
%c = icmp eq i32 %i1, %i2
br i1 %c, label %BB2-split0, label %BB1
BB1:
br label %BB2-split1
BB2-split0:
call void @bar(i32 0)
br label %BB2
BB2-split1:
call void @bar(i32 1)
br label %BB2
BB2:
%p = phi i32 [ 0, %BB2-split0 ], [ 1, %BB2-split1 ]
Reviewers: davidxl, huntergr, chandlerc, mcrosier, eraman, davide
Reviewed By: davidxl
Subscribers: sdesmalen, ashutosh.nema, fhahn, mssimpso, aemerson, mgorny, mehdi_amini, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D39137
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317351
91177308-0d34-0410-b5e6-
96231b3b80d8
Jake Ehrlich [Fri, 3 Nov 2017 18:58:41 +0000 (18:58 +0000)]
[llvm-objcopy] Add support for dwarf fission
This change adds support for dwarf fission.
Differential Revision: https://reviews.llvm.org/D39207
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317350
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Fri, 3 Nov 2017 18:56:36 +0000 (18:56 +0000)]
[AArch64] Fix the number of iterations for the Newton series
The number of iterations was incorrectly determined for DP FP vector types
and the tests were insufficient to flag this issue.
Differential revision: https://reviews.llvm.org/D39507
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317349
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeny Stupachenko [Fri, 3 Nov 2017 18:50:03 +0000 (18:50 +0000)]
The patch fixes PR35131
Summary:
Fix a misprint which led to false CTLZ recognition.
Reviewers: craig.topper
Differential Revision: https://reviews.llvm.org/D39585
From: Evgeny Stupachenko <evstupac@gmail.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317348
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Fri, 3 Nov 2017 18:26:36 +0000 (18:26 +0000)]
Revert "Invoke salvageDebugInfo from CodeGenPrepare's SinkCast()"
This reverts commit 317342 while investigating bot breakage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317345
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 3 Nov 2017 18:02:46 +0000 (18:02 +0000)]
[CodeGen] Remove unnecessary semicolons to fix a warning. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317342
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 3 Nov 2017 18:02:44 +0000 (18:02 +0000)]
[X86] Initialize Type and Subtype in getHostCPUName to 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317341
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Fri, 3 Nov 2017 18:00:02 +0000 (18:00 +0000)]
Invoke salvageDebugInfo from CodeGenPrepare's SinkCast()
This preserves the debug info for the cast operation in the original location.
rdar://problem/
33460652
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317340
91177308-0d34-0410-b5e6-
96231b3b80d8
Jun Bum Lim [Fri, 3 Nov 2017 16:24:53 +0000 (16:24 +0000)]
[LICM] sink through non-trivially replicable PHI
Summary:
The current LICM allows sinking an instruction only when it is exposed to exit
blocks through a trivially replacable PHI of which all incoming values are the
same instruction. This change enhance LICM to sink a sinkable instruction
through non-trivially replacable PHIs by spliting predecessors of loop
exits.
Reviewers: hfinkel, majnemer, davidxl, bmakam, mcrosier, danielcdh, efriedma, jtony
Reviewed By: efriedma
Subscribers: nemanjai, dberlin, llvm-commits
Differential Revision: https://reviews.llvm.org/D37163
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317335
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Bataev [Fri, 3 Nov 2017 16:17:13 +0000 (16:17 +0000)]
[SLP] Test for PR23510, NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317334
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Fri, 3 Nov 2017 15:35:13 +0000 (15:35 +0000)]
[mips] Match 'ins' and its' variants with C++ code
Change the ISel matching of 'ins', 'dins[mu]' from tablegen code to
C++ code. This resolves an issue where ISel would select 'dins' instead
of 'dinsm' when the instructions size and position were individually in
range but their sum was out of range according to the ISA specification.
Reviewers: atanasyan
Differential Revision: https://reviews.llvm.org/D39117
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317331
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew V. Tischenko [Fri, 3 Nov 2017 15:25:13 +0000 (15:25 +0000)]
Fix for Bug 34475 - LOCK/REP/REPNE prefixes emitted as instruction on their own.
Differential Revision: https://reviews.llvm.org/D39546
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317330
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Thomas [Fri, 3 Nov 2017 14:25:39 +0000 (14:25 +0000)]
[LoopPredication] NFC: Refactored code to separate out functions being reused
Summary:
Refactored the code to separate out common functions that are being
reused.
This is to reduce the changes for changes coming up wrt loop
predication with reverse loops.
This refactoring is what we have in our downstream code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317324
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikael Holmen [Fri, 3 Nov 2017 14:15:08 +0000 (14:15 +0000)]
[ADCE] Use MapVector for BlockInfo to make iteration order deterministic
Summary:
Also added a reserve() method to MapVector since we want to use that from
ADCE.
DenseMap does not provide deterministic iteration order so with that
we will handle the members of BlockInfo in random order, eventually
leading to random order of the blocks in the predecessor lists.
Without this change, I get the same predecessor order in about 90% of the
time when I compile a certain reproducer and in 10% I get a different one.
No idea how to make a proper test case for this.
Reviewers: kuhar, david2050
Reviewed By: kuhar
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D39593
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317323
91177308-0d34-0410-b5e6-
96231b3b80d8
Clement Courbet [Fri, 3 Nov 2017 12:12:27 +0000 (12:12 +0000)]
re-land [ExpandMemCmp] Split ExpandMemCmp from CodeGen into its own pass."
Fix undefined references: ExpandMemCmp belongs to CodeGen/, not Scalar/.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317318
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 3 Nov 2017 11:33:48 +0000 (11:33 +0000)]
[X86][SSE] Add PACKUS support to combineVectorTruncation
Similar to the existing code to lower to PACKSS, we can use PACKUS if the input vector's leading zero bits extend all the way to the packed/truncated value.
We have to account for pre-SSE41 targets not supporting PACKUSDW
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317315
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Fri, 3 Nov 2017 11:29:00 +0000 (11:29 +0000)]
[PartialInliner] Skip call sites where inlining fails.
Summary:
InlineFunction can fail, for example when trying to inline vararg
fuctions. In those cases, we do not want to bump partial inlining
counters or set AnyInlined to true, because this could leave an unused
function hanging around.
Reviewers: davidxl, davide, gyiu
Reviewed By: davide
Subscribers: llvm-commits, eraman
Differential Revision: https://reviews.llvm.org/D39581
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317314
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Fri, 3 Nov 2017 10:30:19 +0000 (10:30 +0000)]
[globalisel][tablegen] Skip src child predicates
The GlobalISel TableGen backend didn't check for predicates on the
source children. This caused it to generate code for ARM patterns such
as SMLABB or similar, but without properly checking for the sext_16_node
part of the operands. This in turn meant that we would select SMLABB
instead of MLA for simple sequences such as s32 + s32 * s32, which is
wrong (we want a MLA on the full operands, not just their bottom 16
bits).
This patch forces TableGen to skip patterns with predicates on the src
children, so it doesn't generate code for SMLABB and other similar ARM
instructions at all anymore. AArch64 and X86 are not affected.
Differential Revision: https://reviews.llvm.org/D39554
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317313
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Fri, 3 Nov 2017 10:30:12 +0000 (10:30 +0000)]
[ARM GlobalISel] Move the check for Thumb higher up
We're currently bailing out for Thumb targets while lowering formal
parameters, but there used to be some other checks before it, which
could've caused some functions (e.g. those without formal parameters) to
sneak through unnoticed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317312
91177308-0d34-0410-b5e6-
96231b3b80d8
Ivan A. Kosarev [Fri, 3 Nov 2017 10:26:25 +0000 (10:26 +0000)]
[Analysis] Refine matching and merging of TBAA tags
This patch combines the code that matches and merges TBAA access
tags. The aim is to simplify future changes and making sure that
these operations produce consistent results.
Differential Revision: https://reviews.llvm.org/D39463
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317311
91177308-0d34-0410-b5e6-
96231b3b80d8
Francis Visoiu Mistrih [Fri, 3 Nov 2017 09:46:36 +0000 (09:46 +0000)]
[PEI] Simplify handling of targets with no phys regs. NFC
Make doSpillCalleeSavedRegs a member function, instead of passing most of the
members of PEI as arguments.
Differential Review: https://reviews.llvm.org/D35642
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317309
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Fri, 3 Nov 2017 07:33:20 +0000 (07:33 +0000)]
[AArch64] Use dwarf exception handling on MinGW
Ideally we should probably produce WinEH here as well, but until
then, we can use dwarf exceptions, without any further changes
required in clang, libunwind or libcxxabi.
Differential Revision: https://reviews.llvm.org/D39535
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317304
91177308-0d34-0410-b5e6-
96231b3b80d8
Max Kazantsev [Fri, 3 Nov 2017 07:30:45 +0000 (07:30 +0000)]
[NFC] Get rid of hard-coded value ID in test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317303
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Fri, 3 Nov 2017 07:18:21 +0000 (07:18 +0000)]
[llvm-nm] Don't error out on multiple occurrances of the -g/--external-only flag
GNU binutils nm doesn't error out on this, and some projects' build
systems can end up doing that in some cases. Allowing that seems like
a better target than trying to avoid user projects passing multiple
-g parameters to $NM.
Differential Revision: https://reviews.llvm.org/D39539
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317301
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Fri, 3 Nov 2017 07:18:14 +0000 (07:18 +0000)]
[llvm-nm] Print 'I' for import table data in COFF
The character gets uppercased into 'I' when it's a global symbol.
In GNU binutils, nm prints 'I' for symbols classified by
bfd_is_ind_section - which probably isn't exactly/only import
tables.
When building for win32, (some incarnations of?) libtool has got
rules that try to inspect linked libraries, and in order to
be sure that it is linking to a DLL import library as opposed to
a static library, it expects to find the string " I " in the output
of $NM when run on such an import library.
GNU binutils nm also flags all of the .idata$X chunks as 'i' (while
this patch only makes it set on .idata$2 and .idata$6) and also
flags __imp__function as 'I'.
Differential Revision: https://reviews.llvm.org/D39540
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317300
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 3 Nov 2017 06:48:02 +0000 (06:48 +0000)]
[X86] Remove PALIGNR/VALIGN handling from combineBitcastForMaskedOp and move to isel patterns instead. Prefer 128-bit VALIGND/VALIGNQ over PALIGNR during lowering when possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317299
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 3 Nov 2017 05:19:34 +0000 (05:19 +0000)]
[TableGen] Add an extra blank line to DAGISel output file to separate functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317298
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Fri, 3 Nov 2017 01:01:28 +0000 (01:01 +0000)]
[LSR] Clarify a comment. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317295
91177308-0d34-0410-b5e6-
96231b3b80d8
Sriraman Tallam [Fri, 3 Nov 2017 00:10:19 +0000 (00:10 +0000)]
Avoid PLT for external calls when attribute nonlazybind is used.
Differential Revision: https://reviews.llvm.org/D39065
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317292
91177308-0d34-0410-b5e6-
96231b3b80d8
Jake Ehrlich [Thu, 2 Nov 2017 23:45:51 +0000 (23:45 +0000)]
Reland "Add feature to determine if host architecture is 64-bit in llvm-lit"
A member of config was removed in this patch which resulted in errors I
didn't expect. Removing config.host_arch will take more work some I'm
readding that field.
Differential Revision: https://reviews.llvm.org/D39465
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317289
91177308-0d34-0410-b5e6-
96231b3b80d8