OSDN Git Service
Roman Tereshin [Sat, 19 Jan 2019 01:53:26 +0000 (01:53 +0000)]
Revert "Reapply "[CGP] Check for existing inttotpr before creating new one""
This reverts commit r351618.
Compiler RT + ASAN tests are failing for PowerPC. Not sure
how would I reproduce these on macOS, so reverting (again)
until I do.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351619
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Tereshin [Sat, 19 Jan 2019 01:41:03 +0000 (01:41 +0000)]
Reapply "[CGP] Check for existing inttotpr before creating new one"
Original commit: r351582
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351618
91177308-0d34-0410-b5e6-
96231b3b80d8
Amara Emerson [Sat, 19 Jan 2019 00:36:11 +0000 (00:36 +0000)]
Revert r351584: "GlobalISel: Verify g_zextload and g_sextload"
This new assertion triggered on the AArch64 GlobalISel bots. Reverting while it's being investigated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351617
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Sat, 19 Jan 2019 00:33:02 +0000 (00:33 +0000)]
[X86] Deduplicate static calling convention helpers for code size, NFC
Summary:
Right now we include ${TGT}GenCallingConv.inc once per each instruction
selection method implemented by ${TGT}:
- ${TGT}ISelLowering.cpp
- ${TGT}CallLowering.cpp
- ${TGT}FastISel.cpp
Instead, add a mechanism to tablegen for marking a particular convention
as "External", which causes tablegen to emit into the ::llvm namespace,
instead of as a static helper. This allows us to provide a header to
forward declare it, so we can simply call the function from all the
places it is referenced. Typically the calling convention analyzer is
called indirectly, so it doesn't benefit from inlining.
This saves a bit of final binary size, but mostly just saves object file
size:
before after diff artifact
12852K 12492K -360K X86ISelLowering.cpp.obj
4640K 4280K -360K X86FastISel.cpp.obj
1704K 2092K +388K X86CallingConv.cpp.obj
52448K 52336K -112K llc.exe
I didn't collect before numbers for X86CallLowering.cpp.obj, which is
for GlobalISel, but we should save 360K there as well.
This patch applies the strategy to the X86 backend, but there is no
reason it couldn't be applied to the other backends that implement
multiple ISel strategies, like AArch64.
Reviewers: craig.topper, hfinkel, efriedma
Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D56883
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351616
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Sat, 19 Jan 2019 00:10:54 +0000 (00:10 +0000)]
Use llvm_canonicalize_cmake_booleans for LLVM_LIBXML2_ENABLED [llvm]
r291284 added a nice mechanism to consistently pass CMake on/off toggles to
lit. This change uses it for LLVM_LIBXML2_ENABLED too (which was added around
the same time and doesn't use the new system yet).
Also alphabetically sort the list passed to llvm_canonicalize_cmake_booleans()
in llvm/test/CMakeLists.txt.
No intended behavior change.
Differential Revision: https://reviews.llvm.org/D56912
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351615
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Sat, 19 Jan 2019 00:07:57 +0000 (00:07 +0000)]
Remove F_modify flag from FileOutputBuffer.
This code is dead. There is no use of the feature in the entire LLVM codebase.
Differential Revision: https://reviews.llvm.org/D56939
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351613
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 18 Jan 2019 21:42:55 +0000 (21:42 +0000)]
AMDGPU/GlobalISel: Legalize more types for select
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351599
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Tereshin [Fri, 18 Jan 2019 21:38:44 +0000 (21:38 +0000)]
Revert "[CGP] Check for existing inttotpr before creating new one"
This reverts commit r351582.
Bots are failing. Reverting this to fix and re-commit later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351598
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 18 Jan 2019 21:33:50 +0000 (21:33 +0000)]
AMDGPU/GlobalISel: Legalize illegal g_constant
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351596
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 18 Jan 2019 21:04:59 +0000 (21:04 +0000)]
GlobalISel: Verify G_BITCAST
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351594
91177308-0d34-0410-b5e6-
96231b3b80d8
Armando Montanez [Fri, 18 Jan 2019 20:56:03 +0000 (20:56 +0000)]
[elfabi] Add support for reading DT_NEEDED from binaries
This patch gives elfabi the ability to read DT_NEEDED entries from ELF binaries
to populate NeededLibs in TextAPI's ELFStub.
Differential Revision: https://reviews.llvm.org/D55852
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351592
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 18 Jan 2019 20:49:17 +0000 (20:49 +0000)]
GlobalISel: Verify G_ICMP/G_FCMP vector types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351591
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 18 Jan 2019 20:42:12 +0000 (20:42 +0000)]
[x86] add more movmsk tests; NFC
The existing tests already show a sub-optimal transform,
but this should make it clear that we can't just match
an 'and' op when creating movmsk instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351590
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Fri, 18 Jan 2019 20:41:49 +0000 (20:41 +0000)]
Make ThinLTO test run single threaded to try to avoid flakiness
To see if this helps flaky bot failures in PR40351.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351589
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 18 Jan 2019 20:27:02 +0000 (20:27 +0000)]
AMDGPU: Remove llvm.SI.load.const
It's taken 3 years, but now all of the old AMDGPU and SI intrinsics
are finally gone
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351586
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 18 Jan 2019 20:17:37 +0000 (20:17 +0000)]
GlobalISel: Verify g_zextload and g_sextload
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351584
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 18 Jan 2019 20:14:46 +0000 (20:14 +0000)]
[X86] Lower avx512f scatter intrinsics to X86MaskedScatterSDNode instead of going directly to MachineSDNode.
This sends these intrinsics through isel in a much more normal way. This should allow addressing mode matching in isel to make better use of the displacement field.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351583
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Tereshin [Fri, 18 Jan 2019 20:13:42 +0000 (20:13 +0000)]
[CGP] Check for existing inttotpr before creating new one
Make sure CodeGenPrepare doesn't emit multiple inttoptr instructions of
the same integer value while sinking address computations, but rather
CSEs them on the fly: excessive inttoptr's confuse SCEV into thinking
that related pointers have nothing to do with each other.
This problem blocks LoadStoreVectorizer from vectorizing some of the
loads / stores in a downstream target.
Reviewed By: hfinkel
Differential Revision: https://reviews.llvm.org/D56838
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351582
91177308-0d34-0410-b5e6-
96231b3b80d8
Bjorn Pettersson [Fri, 18 Jan 2019 20:06:13 +0000 (20:06 +0000)]
[SelectionDAG] Updates for -dag-dump-verbose
Summary:
This patch makes some changes related to -dag-dump-verbose.
Main use case has been when debugging how SelectionDAG is
dealing with debug info (SDDbgValue nodes).
1) We now print the number of DbgValues that are mapped to each
SDNode.
2) Removed duplicated printing of DebugLoc (nowadays DebugLoc is
printed also when not using -dag-dump-verbose).
3) Renamed SDDbgValue::dump to SDDbgValue::print, and added a
new SDDbgValue::dump that will start a new line after calling
print.
4) SDDbgValue::print now prints "Order", and it also prints
some additional information when kind is CONST/FRAMEIX/VREG.
5) SelectionDAG::dump() now dumps all SDDbgValue nodes after
the list of SDNodes (both "regular" and "ByVal" SDDbgValue:s).
Invalidated nodes are not printed.
6) Prohibit inline printing of SDNode operands that has SDDbgValue
nodes associated to them.
Reviewers: jmorse, aprantl
Reviewed By: aprantl
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D56793
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351581
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjin Sijaric [Fri, 18 Jan 2019 19:34:20 +0000 (19:34 +0000)]
Fix the buildbot issue introduced by r351421
The EXPENSIVE_CHECK x86_64 Windows buildbot is failing due to this change. Fix
the map access.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351577
91177308-0d34-0410-b5e6-
96231b3b80d8
Mandeep Singh Grang [Fri, 18 Jan 2019 18:53:48 +0000 (18:53 +0000)]
[GlobalISel] Change to range-based invocation of llvm::sort
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351574
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Fri, 18 Jan 2019 18:40:35 +0000 (18:40 +0000)]
[adt] Twine(nullptr) derefs the nullptr. Add a deleted Twine(std::nullptr_t)
Summary:
nullptr can implicitly convert to Twine as Twine(nullptr) in which case it
resolves to Twine(const char *). This constructor derefs the pointer and
therefore doesn't work. Add a Twine(std::nullptr_t) = delete to make it a
compile time error.
It turns out that in-tree usage of Twine(nullptr) is confined to a single
private method in IRBuilder where foldConstant(... const Twine &Name = nullptr)
and this method is only ever called with an explicit Name argument as making it
a mandatory argument doesn't cause compile-time or run-time errors.
Reviewers: jyknight
Reviewed By: jyknight
Subscribers: dexonsmith, kristina, llvm-commits
Differential Revision: https://reviews.llvm.org/D56870
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351572
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Fri, 18 Jan 2019 18:37:38 +0000 (18:37 +0000)]
[SelectionDAG] Split very large token factors for chained stores to 64k chunks.
Similar to D55073. Without this change, the DAG combiner crashes on code
with more than 64k of stores in a single basic block that form parallelizable
chains.
No test case, as it would be very IR file.
Reviewed By: RKSimon
Differential Revision: https://reviews.llvm.org/D56740
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351571
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 18 Jan 2019 18:22:26 +0000 (18:22 +0000)]
[X86] Lower avx2/avx512f gather intrinsics to X86MaskedGatherSDNode instead of going directly to MachineSDNode.:
This sends these intrinsics through isel in a much more normal way. This should allow addressing mode matching in isel to make better use of the displacement field.
Differential Revision: https://reviews.llvm.org/D56827
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351570
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Fri, 18 Jan 2019 17:36:22 +0000 (17:36 +0000)]
[LCSSA] Skip blocks in sub-loops when scanning for uses.
Summary:
Scanning blocks in sub-loops for uses is unnecessary, as they were
already handled while dealing with the containing sub-loop.
This speeds up LCSSA for highly nested loops. For the test case in PR37202, it
halves the time spent in LCSSA. In cases were we won't be able to skip
any blocks, the additional lookup should be negligible.
Time-passes without this patch for test case from PR37202:
Total Execution Time: 48.5505 seconds (48.5511 wall clock)
---User Time--- --System Time-- --User+System-- ---Wall Time--- --- Name ---
10.0822 ( 21.0%) 0.1406 ( 27.0%) 10.2228 ( 21.1%) 10.2228 ( 21.1%) Loop-Closed SSA Form Pass
10.0417 ( 20.9%) 0.1467 ( 28.2%) 10.1884 ( 21.0%) 10.1890 ( 21.0%) Loop-Closed SSA Form Pass #2
4.2703 ( 8.9%) 0.0040 ( 0.8%) 4.2742 ( 8.8%) 4.2742 ( 8.8%) Unswitch loops
2.7376 ( 5.7%) 0.0229 ( 4.4%) 2.7605 ( 5.7%) 2.7611 ( 5.7%) Loop-Closed SSA Form Pass #5
2.7332 ( 5.7%) 0.0214 ( 4.1%) 2.7546 ( 5.7%) 2.7546 ( 5.7%) Loop-Closed SSA Form Pass #3
2.7088 ( 5.6%) 0.0230 ( 4.4%) 2.7319 ( 5.6%) 2.7324 ( 5.6%) Loop-Closed SSA Form Pass #4
2.6855 ( 5.6%) 0.0236 ( 4.5%) 2.7091 ( 5.6%) 2.7090 ( 5.6%) Loop-Closed SSA Form Pass #6
2.1648 ( 4.5%) 0.0018 ( 0.4%) 2.1666 ( 4.5%) 2.1664 ( 4.5%) Unroll loops
1.8371 ( 3.8%) 0.0009 ( 0.2%) 1.8379 ( 3.8%) 1.8380 ( 3.8%) Value Propagation
1.8149 ( 3.8%) 0.0021 ( 0.4%) 1.8170 ( 3.7%) 1.8169 ( 3.7%) Loop Invariant Code Motion
1.6755 ( 3.5%) 0.0226 ( 4.3%) 1.6981 ( 3.5%) 1.6980 ( 3.5%) Loop-Closed SSA Form Pass #7
Time-passes with this patch
Total Execution Time: 29.9285 seconds (29.9276 wall clock)
---User Time--- --System Time-- --User+System-- ---Wall Time--- --- Name ---
5.2786 ( 17.7%) 0.0021 ( 1.2%) 5.2806 ( 17.6%) 5.2808 ( 17.6%) Unswitch loops
4.3739 ( 14.7%) 0.0303 ( 18.1%) 4.4042 ( 14.7%) 4.4042 ( 14.7%) Loop-Closed SSA Form Pass
4.2658 ( 14.3%) 0.0192 ( 11.5%) 4.2850 ( 14.3%) 4.2851 ( 14.3%) Loop-Closed SSA Form Pass #2
2.2307 ( 7.5%) 0.0013 ( 0.8%) 2.2320 ( 7.5%) 2.2318 ( 7.5%) Loop Invariant Code Motion
2.0888 ( 7.0%) 0.0012 ( 0.7%) 2.0900 ( 7.0%) 2.0897 ( 7.0%) Unroll loops
1.6761 ( 5.6%) 0.0013 ( 0.8%) 1.6774 ( 5.6%) 1.6774 ( 5.6%) Value Propagation
1.3686 ( 4.6%) 0.0029 ( 1.8%) 1.3716 ( 4.6%) 1.3714 ( 4.6%) Induction Variable Simplification
1.1457 ( 3.8%) 0.0010 ( 0.6%) 1.1468 ( 3.8%) 1.1468 ( 3.8%) Loop-Closed SSA Form Pass #4
1.1384 ( 3.8%) 0.0005 ( 0.3%) 1.1389 ( 3.8%) 1.1389 ( 3.8%) Loop-Closed SSA Form Pass #6
1.1360 ( 3.8%) 0.0027 ( 1.6%) 1.1387 ( 3.8%) 1.1387 ( 3.8%) Loop-Closed SSA Form Pass #5
1.1331 ( 3.8%) 0.0010 ( 0.6%) 1.1341 ( 3.8%) 1.1340 ( 3.8%) Loop-Closed SSA Form Pass #3
Reviewers: davide, efriedma, mzolotukhin
Reviewed By: davide, efriedma
Subscribers: hiraditya, dmgreen, llvm-commits
Differential Revision: https://reviews.llvm.org/D56848
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351567
91177308-0d34-0410-b5e6-
96231b3b80d8
Ilya Biryukov [Fri, 18 Jan 2019 17:30:49 +0000 (17:30 +0000)]
[Support] Implement llvm::Registry::iterator via llvm_iterator_facade
Summary:
Among other things, this allows using STL algorithms like 'find_if' over
llvm::Registry.
Reviewers: sammccall
Reviewed By: sammccall
Subscribers: kristina, llvm-commits
Differential Revision: https://reviews.llvm.org/D56854
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351566
91177308-0d34-0410-b5e6-
96231b3b80d8
Neil Henning [Fri, 18 Jan 2019 16:39:27 +0000 (16:39 +0000)]
[AMDGPU] Add some missing always-uniform values.
This commit adds some missing intrinsics into the isAlwaysUniform list
for the AMDGPU backend.
Differential Revision: https://reviews.llvm.org/D56845
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351562
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 18 Jan 2019 15:57:59 +0000 (15:57 +0000)]
[LTO] Change test/tools/lto/no-bitcode.s requirement from arm to aarch64
Set the test to properly require aarch64 instead of arm. Otherwise, this test fails with LLVM_TARGETS_TO_BUILD='ARM;X86'
bin/llvm-mc: : error: unable to get target for 'arm64-apple-ios7.0.0'
Committed on behalf of @easyaspi314 (Devin)
Differential Revision: https://reviews.llvm.org/D56472
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351560
91177308-0d34-0410-b5e6-
96231b3b80d8
Nirav Dave [Fri, 18 Jan 2019 15:57:13 +0000 (15:57 +0000)]
[SelectionDAGBuilder] Cleanup InlineAsm Output generation. NFCI.
Defer inline asm's output fixup work until after we've generated the
inline asm node itself. Remove StoresToEmit, IndirectStoresToEmit, and
RetValRegs in favor of using ConstraintOperands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351558
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 18 Jan 2019 15:55:21 +0000 (15:55 +0000)]
[x86] simplify code for SDValue.getOperand(); NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351557
91177308-0d34-0410-b5e6-
96231b3b80d8
Clement Courbet [Fri, 18 Jan 2019 15:26:14 +0000 (15:26 +0000)]
Revert r351529 "[llvm-objdump][NFC] Improve readability."
msan errors in ELF/strip-all.s.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351556
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitry Preobrazhensky [Fri, 18 Jan 2019 15:17:17 +0000 (15:17 +0000)]
[AMDGPU][MC][GFX8+][DISASSEMBLER] Corrected 1/2pi value for 64-bit operands
See bug 39332: https://bugs.llvm.org/show_bug.cgi?id=39332
Reviewers: artem.tamazov, arsenm
Differential Revision: https://reviews.llvm.org/D56794
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351555
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 18 Jan 2019 14:48:36 +0000 (14:48 +0000)]
[TTI] Use ConcreteTTI cast in getIntrinsicInstrCost Type variant. NFCI.
Same as we do in the Value variant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351554
91177308-0d34-0410-b5e6-
96231b3b80d8
Clement Courbet [Fri, 18 Jan 2019 14:20:13 +0000 (14:20 +0000)]
Reland r351529 "[llvm-objdump][NFC] Improve readability."
`SectionSymbol*` is cast from `void*` to
`std::tuple<uint64_t, StringRef, uint8_t>` in AMDGPUSymbolizer, so it has to
*be* one, not *act like* one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351553
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Fri, 18 Jan 2019 14:05:59 +0000 (14:05 +0000)]
[SelectionDAG] Add getTokenFactor, which splits nodes with > 64k operands.
This functionality is required at multiple places which potentially
create large operand lists, like SelectionDAGBuilder or DAGCombiner.
Differential Revision: https://reviews.llvm.org/D56739
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351552
91177308-0d34-0410-b5e6-
96231b3b80d8
James Henderson [Fri, 18 Jan 2019 13:58:41 +0000 (13:58 +0000)]
Add __[_[_]]Z demangling to new common demangle function
This is a follow-up to r351448. It adds support for other _*Z extensions
of the Itanium demanling, to the newly available demangle function
heuristic.
Reviewed by: erik.pilkington, rupprecht, grimar
Differential Revision: https://reviews.llvm.org/D56855
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351551
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitry Preobrazhensky [Fri, 18 Jan 2019 13:57:43 +0000 (13:57 +0000)]
[AMDGPU][MC] Disabled use of 2 different literals with SOP2/SOPC instructions
See bug 39319: https://bugs.llvm.org/show_bug.cgi?id=39319
Reviewers: artem.tamazov, arsenm, rampitec
Differential Revision: https://reviews.llvm.org/D56847
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351549
91177308-0d34-0410-b5e6-
96231b3b80d8
Pavel Labath [Fri, 18 Jan 2019 12:52:03 +0000 (12:52 +0000)]
[ADT] Add streaming operators for llvm::Optional
Summary:
The operators simply print the underlying value or "None".
The trickier part of this patch is making sure the streaming operators
work even in unit tests (which was my primary motivation, though I can
also see them being useful elsewhere). Since the stream operator was a
template, implicit conversions did not kick in, and our gtest glue code
was explicitly introducing an implicit conversion to make sure other
implicit conversions do not kick in :P. I resolve that by specializing
llvm_gtest::StreamSwitch for llvm:Optional<T>.
Reviewers: sammccall, dblaikie
Reviewed By: sammccall
Subscribers: mgorny, dexonsmith, kristina, llvm-commits
Differential Revision: https://reviews.llvm.org/D56795
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351548
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Fri, 18 Jan 2019 12:01:59 +0000 (12:01 +0000)]
[llvm-objdump] - Dump the archive headers when -all-headers is specified.
When -all-headers is given it is supposed to dump all headers,
but now it skips the archive headers for no reason.
The patch fixes that.
Differential revision: https://reviews.llvm.org/D56780
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351547
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Fri, 18 Jan 2019 11:33:26 +0000 (11:33 +0000)]
[llvm-objdump] - Move getRelocationValueString and dependenices out of the llvm-objdump.cpp
getRelocationValueString is a dispatcher function that calls the
corresponding ELF/COFF/Wasm/MachO implementations
that currently live in the llvm-objdump.cpp file.
These implementations better be moved to ELFDump.cpp,
COFFDump.cpp and other corresponding files, to move platform specific
implementation out from the common logic.
The patch does that. Also, I had to move ToolSectionFilter helper
and SectionFilterIterator, SectionFilter to a header to make them
available across the objdump code.
Differential revision: https://reviews.llvm.org/D56842
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351545
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Fri, 18 Jan 2019 11:27:38 +0000 (11:27 +0000)]
[AVR] Fix codegen bug in 16-bit loads
Prior to this patch, the AVR::LDWRdPtr instruction was always lowered to
instructions of this pattern:
ld $GPR8, [PTR:XYZ]+
ld $GPR8, [PTR]+1
This has a problem; the [PTR] is incremented in-place once, but never
decremented.
Future uses of the same pointer will use the now clobbered value,
leading to the pointer being incorrect by an offset of one.
This patch modifies the expansion code of the LDWRdPtr pseudo
instruction so that the pointer variable is not silently clobbered in
future uses in the same live range.
Patch by Keshav Kini.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351544
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Fri, 18 Jan 2019 10:41:26 +0000 (10:41 +0000)]
[llvm-objdump] - Show aliases in -help.
Currently llvm-objdump is inconsistent.
When -help is specified it shows no aliases except two.
Aliases are shown with -help-hidden though.
GNU objdump also prints them by default.
This patch does a change to always show all aliases
when -help is given.
Differential revision: https://reviews.llvm.org/D56853
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351542
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Fri, 18 Jan 2019 10:11:33 +0000 (10:11 +0000)]
[AVR] Fix the inst-cbr test
Now that the CBR alias has lower priority than ANDI, the assembly
printer uses ANDI instead.
Original broken in r351526.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351539
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Fri, 18 Jan 2019 10:00:38 +0000 (10:00 +0000)]
[SelectionDAG] Add static getMaxNumOperands function to SDNode.
Summary:
Use this helper to make sure we use the same value at various places.
This will likely be needed at more places were we currently crash
because we use more operands than possible.
Also makes it easier to change in the future.
Reviewers: RKSimon, craig.topper, efriedma, aemerson
Reviewed By: RKSimon
Subscribers: hiraditya, arsenm, llvm-commits
Differential Revision: https://reviews.llvm.org/D56859
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351537
91177308-0d34-0410-b5e6-
96231b3b80d8
Clement Courbet [Fri, 18 Jan 2019 09:40:19 +0000 (09:40 +0000)]
Revert r351529 "[llvm-objdump][NFC] Improve readability."
Breaks labels-branch.s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351534
91177308-0d34-0410-b5e6-
96231b3b80d8
Clement Courbet [Fri, 18 Jan 2019 08:59:39 +0000 (08:59 +0000)]
[llvm-objdump][NFC] Improve readability.
Summary:
Introduce a `struct SectionSymbol` instead of
`tuple<uint64_t, StringRef, uint8>`.
Reviewers: jhenderson, davide
Subscribers: rupprecht, llvm-commits
Differential Revision: https://reviews.llvm.org/D56858
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351529
91177308-0d34-0410-b5e6-
96231b3b80d8
Shiva Chen [Fri, 18 Jan 2019 08:36:06 +0000 (08:36 +0000)]
[ScheduleDAGRRList] Do not preschedule the node has ADJCALLSTACKDOWN parent
We should not pre-scheduled the node has ADJCALLSTACKDOWN parent,
or else, when bottom-up scheduling, ADJCALLSTACKDOWN and
ADJCALLSTACKUP may hold CallResource too long and make other
calls can't be scheduled. If there's no other available node
to schedule, the scheduler will try to rename the register by
creating copy to avoid the conflict which will fail because
CallResource is not a real physical register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351527
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Fri, 18 Jan 2019 07:31:34 +0000 (07:31 +0000)]
[AVR] Rewrite the CBRRdK instruction as an alias of ANDIRdK
The CBR instruction is just an ANDI instruction with the immediate
complemented.
Because of this, prior to this change TableGen would warn due to a
decoding conflict.
This commit fixes the existing compilation warning:
===============
[423/492] Building AVRGenDisassemblerTables.inc...
Decoding Conflict:
0111............
01..............
................
ANDIRdK 0111____________
CBRRdK 0111____________
================
After this commit, there are no more decoding conflicts in the AVR
backend's instruction definitions.
Thanks to Eli F for pointing me torward `t2_so_imm_not` as an example of
how to perform a complement in an instruction alias.
Fixes BugZilla PR38802.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351526
91177308-0d34-0410-b5e6-
96231b3b80d8
Hsiangkai Wang [Fri, 18 Jan 2019 07:17:09 +0000 (07:17 +0000)]
[CodeGen] Fix bugs in LiveDebugVariables when debug labels are generated.
Remove DBG_LABELs in LiveDebugVariables and generate them in
VirtRegRewriter.
This bug is reported in
https://bugs.chromium.org/p/chromium/issues/detail?id=898152.
Differential Revision: https://reviews.llvm.org/D54465
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351525
91177308-0d34-0410-b5e6-
96231b3b80d8
Dylan McKay [Fri, 18 Jan 2019 06:10:41 +0000 (06:10 +0000)]
[AVR] Expand 8/16-bit multiplication to libcalls on MCUs that don't have hardware MUL
This change modifies the LLVM ISel lowering settings so that
8-bit/16-bit multiplication is expanded to calls into the compiler
runtime library if the MCU being targeted does not support
multiplication in hardware.
Before this, MUL instructions would be generated on CPUs like the
ATtiny85, triggering a CPU reset due to an illegal instruction at
runtime.
First raised in https://github.com/avr-rust/rust/issues/124.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351523
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 18 Jan 2019 06:06:03 +0000 (06:06 +0000)]
[X86] Add test cases showing failure to fold a global variable address into the gather addressing mode when using the target specific intrinsics. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351522
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 18 Jan 2019 06:06:01 +0000 (06:06 +0000)]
[X86] Change avx512-gather-scatter-intrin.ll to use x86_64-unknown-unknown instead of x86_64-apple-darwin. NFC
Will help with an upcoming patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351521
91177308-0d34-0410-b5e6-
96231b3b80d8
Max Kazantsev [Fri, 18 Jan 2019 04:57:32 +0000 (04:57 +0000)]
Re-enable terminator folding in LoopSimplifyCFG: underlying bugs fixed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351520
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Fri, 18 Jan 2019 04:09:30 +0000 (04:09 +0000)]
gn build: unbreak mac (and maybe win) after r351258, r351277
The check-hwasan build files assert that current_os == "linux" || current_os ==
"android", so pull it in only there.
ar is unused on mac, so don't set it in the stage2 toolchain. (It'd be nicer to
use llvm-libtool on mac instead of host libtool, but llvm-libtool doesn't seem
to understand the -no_warning_for_no_symbols flag.)
Differential Revision: https://reviews.llvm.org/D56898
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351519
91177308-0d34-0410-b5e6-
96231b3b80d8
Xing GUO [Fri, 18 Jan 2019 03:56:37 +0000 (03:56 +0000)]
[DOCS] it it => it
Summary: it it => it for LLVM Language Reference Manual
Reviewers: aaron.ballman, Higuoxing, liangdzou
Reviewed By: aaron.ballman, Higuoxing, liangdzou
Subscribers: Higuoxing, llvm-commits
Differential Revision: https://reviews.llvm.org/D56533
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351517
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Fri, 18 Jan 2019 03:38:53 +0000 (03:38 +0000)]
gn build: Merge r351499
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351516
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Fri, 18 Jan 2019 03:36:04 +0000 (03:36 +0000)]
mac: Correctly disable tools/lto tests when building with LLVM_ENABLE_PIC=OFF
llvm/tools sets LLVM_TOOL_LTO_BUILD to Off if LLVM_ENABLE_PIC=OFF, but that's
not visible in llvm/test.
r289662 added the llvm_tool_lto_build lit parameter, there the intent was to
use it with an explicit -DLLVM_TOOL_LTO_BUILD=OFF, which is visible globally.
On the review for that (D27739), a mild preference was expressed for using a
lit parameter over checking the existence of libLTO.dylib. Since that works
with the LLVM_ENABLE_PIC=OFF case too and since it matches what we do for the
gold plugin, switch to that approach.
Differential Revision: https://reviews.llvm.org/D56805
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351515
91177308-0d34-0410-b5e6-
96231b3b80d8
Thomas Lively [Fri, 18 Jan 2019 02:47:48 +0000 (02:47 +0000)]
[WebAssembly] Add languages from debug info to producers section
Reviewers: aheejin, dschuff, sbc100
Subscribers: aprantl, jgravelle-google, hiraditya, sunfish
Differential Revision: https://reviews.llvm.org/D56889
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351507
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 17 Jan 2019 22:47:26 +0000 (22:47 +0000)]
AMDGPU: Convert tests away from llvm.SI.load.const
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351494
91177308-0d34-0410-b5e6-
96231b3b80d8
Erik Pilkington [Thu, 17 Jan 2019 22:39:31 +0000 (22:39 +0000)]
Address Ried's post-commit review comment on r351477.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351493
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Thu, 17 Jan 2019 22:36:05 +0000 (22:36 +0000)]
[HotColdSplit] Allow outlining with live outputs
Prior to r348205, extracting code regions with live output values was
disabled because of a miscompilation (PR39433). Lift the restriction as
PR39433 has been addressed.
Tested on LNT+externals, on a run of check-llvm in a stage2 build, and
with a full build of iOS (with hot/cold splitting enabled).
As a drive-by, remove an errant TODO.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351492
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Thu, 17 Jan 2019 22:35:47 +0000 (22:35 +0000)]
[HotColdSplit] Consider resume instructions to be cold
Resuming exception unwinding is roughly as unlikely as throwing an
exception.
Tested on LNT+externals (in particular, the C++ EH regression tests
provide end-to-end test coverage), as well as with a full build of iOS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351491
91177308-0d34-0410-b5e6-
96231b3b80d8
Vladimir Stefanovic [Thu, 17 Jan 2019 21:50:37 +0000 (21:50 +0000)]
[mips] Emit .reloc R_{MICRO}MIPS_JALR along with j(al)r(c) $25
The callee address is added as an optional operand (MCSymbol) in
AdjustInstrPostInstrSelection() and then used by asm printer to insert:
'.reloc tmplabel, R_MIPS_JALR, symbol
tmplabel:'.
Controlled with '-mips-jalr-reloc', default is true.
Differential revision: https://reviews.llvm.org/D56694
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351485
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Thu, 17 Jan 2019 21:42:36 +0000 (21:42 +0000)]
[HotColdSplit] Relax requirement that the cold sink block be extractable
Relaxing this requirement creates opportunities to split code dominated
by an EH pad.
Tested on LNT+externals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351483
91177308-0d34-0410-b5e6-
96231b3b80d8
Erik Pilkington [Thu, 17 Jan 2019 21:37:51 +0000 (21:37 +0000)]
[demangler] Support for block literals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351482
91177308-0d34-0410-b5e6-
96231b3b80d8
Erik Pilkington [Thu, 17 Jan 2019 21:37:36 +0000 (21:37 +0000)]
[demangler] Ignore leading underscores if present
On MacOS, symbols start with a leading underscore, so just parse and
ignore it if present.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351481
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Thu, 17 Jan 2019 21:29:34 +0000 (21:29 +0000)]
[HotColdSplit] Simplify tests by lowering their splitting thresholds
This gets rid of the brittle/mysterious calls to @sink()/@sideeffect()
peppered throughout the test cases. They are no longer needed to force
splitting to occur.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351480
91177308-0d34-0410-b5e6-
96231b3b80d8
Erik Pilkington [Thu, 17 Jan 2019 20:52:10 +0000 (20:52 +0000)]
Fix an MSVC bot failure from r351474.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351477
91177308-0d34-0410-b5e6-
96231b3b80d8
Wei Mi [Thu, 17 Jan 2019 20:48:34 +0000 (20:48 +0000)]
[SampleFDO] Skip profile reading when flattened profile used in ThinLTO postlink
If the sample profile has no inlining hierachy information included, we call
the sample profile is flattened. For flattened profile, in ThinLTO postlink
phase, SampleProfileLoader's hot function inlining and profile annotation will
do nothing, so it is better to save the effort to read in the profile and run
the sample profile loader pass. It is helpful for reducing compile time when
the flattened profile is huge.
Differential Revision: https://reviews.llvm.org/D54819
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351476
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 17 Jan 2019 20:46:53 +0000 (20:46 +0000)]
[InstCombine] Don't sink dynamic allocas
Summary:
InstCombine's sinking algorithm only thinks about memory. It doesn't
think about non-memory constraints like stack object lifetime. It can
sink dynamic allocas across a stacksave call, which may be used with
stackrestore, which can incorrectly reduce the lifetime of the dynamic
alloca.
Fixes PR40365
Reviewers: hfinkel, efriedma
Subscribers: hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D56872
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351475
91177308-0d34-0410-b5e6-
96231b3b80d8
Erik Pilkington [Thu, 17 Jan 2019 20:37:51 +0000 (20:37 +0000)]
NFC: Make the copies of the demangler byte-for-byte identical
With this patch, the copies of the files ItaniumDemangle.h,
StringView.h, and Utility.h are kept byte-for-byte in sync between
libcxxabi and llvm. All differences (namespaces, fallthrough, and
unreachable macros) are defined in each copies' DemanglerConfig.h.
This patch also adds a script to copy changes from libcxxabi
(cp-to-llvm.sh), and a README.txt explaining the situation.
Differential revision: https://reviews.llvm.org/D53538
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351474
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjin Sijaric [Thu, 17 Jan 2019 20:24:14 +0000 (20:24 +0000)]
Fix the buildbot failure introduced by r351404
EXPENSIVE_CHECKS buildbots are failing due to r351404.
Add x1 as live in to the funclet basic block for SEH funclets, as well as
-verify-machineinstrs to the test case that triggered the failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351472
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Thu, 17 Jan 2019 20:20:56 +0000 (20:20 +0000)]
llvm build: Merge r351448
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351469
91177308-0d34-0410-b5e6-
96231b3b80d8
Wouter van Oortmerssen [Thu, 17 Jan 2019 19:18:05 +0000 (19:18 +0000)]
[WebAssembly] Fixing 2 more symbol offset related tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351465
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Devlieghere [Thu, 17 Jan 2019 18:35:14 +0000 (18:35 +0000)]
[Test] Fix debug-loc-0.mir with EXPENSIVE_CHECKS
The `llc` invocation was missing `-start-before=machine-cp`.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351464
91177308-0d34-0410-b5e6-
96231b3b80d8
Wouter van Oortmerssen [Thu, 17 Jan 2019 18:14:09 +0000 (18:14 +0000)]
[WebAssembly] Fixed objdump not parsing function headers.
Summary:
objdump was interpreting the function header containing the locals
declaration as instructions. To parse these without injecting target
specific code in objdump, MCDisassembler::onSymbolStart was added to
be implemented by the WebAssembly implemention.
WasmObjectFile now returns a code offset for the "address" of a symbol,
rather than the index. This is also more in-line with what other
targets do.
Also ensured that the AsmParser correctly puts each function
in its own segment to enable this test case.
Reviewers: sbc100, dschuff
Subscribers: jgravelle-google, aheejin, sunfish, rupprecht, llvm-commits
Differential Revision: https://reviews.llvm.org/D56684
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351460
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Thu, 17 Jan 2019 17:55:47 +0000 (17:55 +0000)]
Add a missing dependency to fix build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351458
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Thu, 17 Jan 2019 16:05:04 +0000 (16:05 +0000)]
Revert "[ThinLTO] Add summary entries for index-based WPD"
Mistaken commit of something still under review!
This reverts commit r351453.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351455
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Thu, 17 Jan 2019 15:49:04 +0000 (15:49 +0000)]
Add -dump-input=always to cfi-devirt test to debug flake
To help diagnose flaky bot failures in PR40351.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351454
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Thu, 17 Jan 2019 15:49:03 +0000 (15:49 +0000)]
[ThinLTO] Add summary entries for index-based WPD
Summary:
If LTOUnit splitting is disabled, the module summary analysis computes
the summary information necessary to perform single implementation
devirtualization during the thin link with the index and no IR. The
information collected from the regular LTO IR in the current hybrid WPD
algorithm is summarized, including:
1) For vtable definitions, record the function pointers and their offset
within the vtable initializer (subsumes the information collected from
IR by tryFindVirtualCallTargets).
2) A record for each type metadata summarizing the vtable definitions
decorated with that metadata (subsumes the TypeIdentiferMap collected
from IR).
Also added are the necessary bitcode records, and the corresponding
assembly support.
The index-based WPD will be sent as a follow-on.
Depends on D53890.
Reviewers: pcc
Subscribers: mehdi_amini, Prazek, inglorion, eraman, steven_wu, dexonsmith, arphaman, llvm-commits
Differential Revision: https://reviews.llvm.org/D54815
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351453
91177308-0d34-0410-b5e6-
96231b3b80d8
James Henderson [Thu, 17 Jan 2019 15:34:12 +0000 (15:34 +0000)]
[llvm-readobj][ELF]Add demangling support
This change adds demangling support to the ELF side of llvm-readobj,
under the switch --demangle/-C.
The following places are demangled: symbol table dumps (static and
dynamic), relocation dumps (static and dynamic), addrsig dumps, call
graph profile dumps, and group section signature symbols.
Although GNU readelf doesn't support demangling, it is still a useful
feature to have, and brings it on a par with llvm-objdump's
capabilities.
This fixes https://bugs.llvm.org/show_bug.cgi?id=40054.
Reviewed by: grimar, rupprecht
Differential Revision: https://reviews.llvm.org/D56791
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351450
91177308-0d34-0410-b5e6-
96231b3b80d8
James Henderson [Thu, 17 Jan 2019 15:18:44 +0000 (15:18 +0000)]
Move demangling function from llvm-objdump to Demangle library
This allows it to be used in an upcoming llvm-readobj change.
A small change in internal behaviour of the function is to always call
the microsoftDemangle function if the string does not have an itanium
encoding prefix, rather than only if it starts with '?'. This is
harmless because the microsoftDemangle function does the same check
already.
Reviewed by: grimar, erik.pilkington
Differential Revision: https://reviews.llvm.org/D56721
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351448
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 17 Jan 2019 13:11:15 +0000 (13:11 +0000)]
build_llvm_package.bat: Run more tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351436
91177308-0d34-0410-b5e6-
96231b3b80d8
Max Kazantsev [Thu, 17 Jan 2019 12:51:10 +0000 (12:51 +0000)]
[LoopSimplifyCFG] Form LCSSA when a parent loop becomes a sibling
During the transforms in LoopSimplifyCFG, when we remove a dead exiting edge, the
parent loop may stop being reachable from the child loop, and therefore they become
siblings. If the former child loop had uses of some values from its former parent loop,
now such uses will require LCSSA Phis, even if they weren't needed before. So we must
form LCSSA for all loops that stopped being ancestors of the current loop in this case.
Differential Revision: https://reviews.llvm.org/D56144
Reviewed By: fedor.sergeev
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351434
91177308-0d34-0410-b5e6-
96231b3b80d8
Max Kazantsev [Thu, 17 Jan 2019 12:25:40 +0000 (12:25 +0000)]
[LoopSimplifyCFG] Fix order of deletion of complex dead subloops
Function `DeleteDeadBlock` requires that all predecessors of a block
being deleted have already been deleted, with the exception of a
single-block loop. When we use it for removal of dead subloops that
contain more than one block, we may not fulfull this requirement and
fail an assertion.
This patch replaces invocation of `DeleteDeadBlock` with a generalized
version `DeleteDeadBlocks` that is able to deal with multiple dead blocks,
even if they contain some cycles.
Differential Revision: https://reviews.llvm.org/D56121
Reviewed By: fedor.sergeev
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351433
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 17 Jan 2019 11:20:23 +0000 (11:20 +0000)]
[X86][SSE] Add PR40340 test case
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351430
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 17 Jan 2019 11:11:15 +0000 (11:11 +0000)]
[X86] Add AVX512 test to insertps
Pre-commit for PR40340
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351429
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 17 Jan 2019 10:50:07 +0000 (10:50 +0000)]
GlobalISel: Add comment to clarify G_BUILD_VECTOR
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351428
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 17 Jan 2019 10:49:01 +0000 (10:49 +0000)]
Allow FP types for atomicrmw xchg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351427
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 17 Jan 2019 10:25:18 +0000 (10:25 +0000)]
[MC] Remove unused variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351426
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Thu, 17 Jan 2019 10:11:59 +0000 (10:11 +0000)]
Fix capitalization. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351425
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Thu, 17 Jan 2019 10:11:55 +0000 (10:11 +0000)]
[ARM GlobalISel] Allow calls to varargs functions
Allow varargs functions to be called, both in arm and thumb mode. This
boils down to choosing the correct calling convention, which we can
easily test by making sure arm_aapcscc is used instead of
arm_aapcs_vfpcc when the callee is variadic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351424
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Bradbury [Thu, 17 Jan 2019 10:04:39 +0000 (10:04 +0000)]
[RISCV] Add codegen support for RV64A
In order to support codegen RV64A, this patch:
* Introduces masked atomics intrinsics for atomicrmw operations and cmpxchg
that use the i64 type. These are ultimately lowered to masked operations
using lr.w/sc.w, but we need to use these alternate intrinsics for RV64
because i32 is not legal
* Modifies RISCVExpandPseudoInsts.cpp to handle PseudoAtomicLoadNand64 and
PseudoCmpXchg64
* Modifies the AtomicExpandPass hooks in RISCVTargetLowering to sext/trunc as
needed for RV64 and to select the i64 intrinsic IDs when necessary
* Adds appropriate patterns to RISCVInstrInfoA.td
* Updates test/CodeGen/RISCV/atomic-*.ll to show RV64A support
This ends up being a fairly mechanical change, as the logic for RV32A is
effectively reused.
Differential Revision: https://reviews.llvm.org/D53233
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351422
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjin Sijaric [Thu, 17 Jan 2019 09:45:17 +0000 (09:45 +0000)]
[ARM64][Windows] Share unwind codes between epilogues
There are cases where we have multiple epilogues that have the exact same unwind
code sequence. In that case, the epilogues can share the same unwind codes in
the .xdata section. This should get us past the assert "SEH unwind data
splitting not yet implemented" in many cases.
We still need to add support for generating multiple .pdata/.xdata sections for
those functions that need to be split into fragments.
Differential Revision: https://reviews.llvm.org/D56813
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351421
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Thu, 17 Jan 2019 09:14:33 +0000 (09:14 +0000)]
[llvm-objdump] - Fix comment. NFC.
Forgot to address this one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351418
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Thu, 17 Jan 2019 09:13:17 +0000 (09:13 +0000)]
[llvm-objdump] - Simplify the getRelocationValueString. NFCI.
This refactors the getRelocationValueString method.
It is a bit overcomplicated and it is possible to reduce it without
losing the functionality it seems.
Differential revision: https://reviews.llvm.org/D56778
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351417
91177308-0d34-0410-b5e6-
96231b3b80d8
Max Kazantsev [Thu, 17 Jan 2019 06:20:42 +0000 (06:20 +0000)]
[NFC] Factor out some local vars
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351416
91177308-0d34-0410-b5e6-
96231b3b80d8
Thomas Lively [Thu, 17 Jan 2019 02:29:55 +0000 (02:29 +0000)]
[WebAssembly] Parse llvm.ident into producers section
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351413
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Thu, 17 Jan 2019 02:15:05 +0000 (02:15 +0000)]
[MergeFunc] Prevent silent miscompile of vararg functions
The function merging pass miscompiles identical vararg functions. The
forwarding thunk it emits doesn't forward the full variable-length list
of arguments. Disable merging for vararg functions for now.
I've filed llvm.org/PR40345 to track the issue.
rdar://
47326238
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351411
91177308-0d34-0410-b5e6-
96231b3b80d8
Thomas Lively [Thu, 17 Jan 2019 00:39:49 +0000 (00:39 +0000)]
Revert "[WebAssembly] Parse llvm.ident into producers section"
This reverts commit
eccdbba3a02a33e13b5262e92200a33e2ead873d.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351410
91177308-0d34-0410-b5e6-
96231b3b80d8