OSDN Git Service
Vedant Kumar [Thu, 21 Sep 2017 01:11:30 +0000 (01:11 +0000)]
[llvm-cov] Improve error messaging for function mismatches
Passing "-dump" to llvm-cov will now print more detailed information
about function hash and counter mismatches. This should make it easier
to debug *.profdata files which contain incorrect records, and to debug
other scenarios where coverage goes missing due to mismatch issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313853
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 21 Sep 2017 00:45:59 +0000 (00:45 +0000)]
AMDGPU: Fix crash on immediate operand
We can have a v_mac with an immediate src0.
We can still fold if it's an inline immediate,
otherwise it already uses the constant bus.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313852
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Thu, 21 Sep 2017 00:24:52 +0000 (00:24 +0000)]
[lit] Make lit support config files with .py extension.
Many editors and Python-related diagnostics tools such as
debuggers break or fail in mysterious ways when python files
don't end in .py. This is especially true on Windows, but
still exists on other platforms. I don't want to be too heavy
handed in changing everything across the board, but I do want
to at least *allow* lit configs to have .py extensions. This
patch makes the discovery process first look for a config file
with a .py extension, and if one is not found, then looks for
a config file using the old method. So for existing users, there
should be no functional change.
Differential Revision: https://reviews.llvm.org/D37838
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313849
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 21 Sep 2017 00:18:48 +0000 (00:18 +0000)]
[X86] Replace a condition that can never be true with an assert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313848
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 21 Sep 2017 00:18:46 +0000 (00:18 +0000)]
[SelectionDAG] Replace a flag that can never be true with an assert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313847
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 20 Sep 2017 23:48:58 +0000 (23:48 +0000)]
[InstCombine] Teach getDemandedBitsLHSMask to handle constant splat vectors
This replaces a ConstantInt dyn_cast with m_APInt
Differential Revision: https://reviews.llvm.org/D38100
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313840
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 20 Sep 2017 23:48:56 +0000 (23:48 +0000)]
[SelectionDAG] Use APInt::getActivebits instead of Bitwidth - leading zeros.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313839
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Wed, 20 Sep 2017 23:39:44 +0000 (23:39 +0000)]
[WebAssembly] Weak symbols should be defined in SF_Global
Summary:
This manifested itself in lld since it meant that weak
symbols were not appearing in archive symbol tables.
Subscribers: jfb, dschuff, jgravelle-google, aheejin
Differential Revision: https://reviews.llvm.org/D38111
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313838
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Wed, 20 Sep 2017 23:29:47 +0000 (23:29 +0000)]
typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313837
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Wed, 20 Sep 2017 23:29:31 +0000 (23:29 +0000)]
llvm-dwarfdump: move -eh-frame into the right section in the help output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313836
91177308-0d34-0410-b5e6-
96231b3b80d8
Marek Sokolowski [Wed, 20 Sep 2017 23:26:05 +0000 (23:26 +0000)]
[llvm-readobj] Fix 'Teach readobj to dump .res files', pt 3.
Fix (r313790) missing ulittle{}_t error on some buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313834
91177308-0d34-0410-b5e6-
96231b3b80d8
Marek Sokolowski [Wed, 20 Sep 2017 23:07:39 +0000 (23:07 +0000)]
[llvm-readobj] Fix 'Teach readobj to dump .res files', pt 2.
Another fix-up for r313790. Big-endian hosts swapped byte order in
UTF16 words.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313833
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Morehouse [Wed, 20 Sep 2017 22:53:08 +0000 (22:53 +0000)]
[MSan] Disable sanitization for __sanitizer_dtor_callback.
Summary:
Eliminate unnecessary instrumentation at __sanitizer_dtor_callback
call sites. Fixes https://github.com/google/sanitizers/issues/861.
Reviewers: eugenis, kcc
Reviewed By: eugenis
Subscribers: vitalybuka, llvm-commits, cfe-commits, hiraditya
Differential Revision: https://reviews.llvm.org/D38063
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313831
91177308-0d34-0410-b5e6-
96231b3b80d8
Dave Lee [Wed, 20 Sep 2017 22:41:34 +0000 (22:41 +0000)]
Remove references to response file argument in CommandLine.rst
Summary:
The documentation refers to a boolean that controls whether response files are
handled, but this is incorrect. Since r165535, response files are always
enabled.
Reviewers: compnerd, rafael
Reviewed By: compnerd
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D38095
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313830
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 20 Sep 2017 22:31:35 +0000 (22:31 +0000)]
[SimplifyCFG] don't create a no-op subtract
I noticed this inefficiency while investigating PR34603:
https://bugs.llvm.org/show_bug.cgi?id=34603
This fix will likely push another bug (we don't maintain state of 'LateSimplifyCFG')
into hiding, but I'll try to clean that up with a follow-up patch anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313829
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 20 Sep 2017 21:56:21 +0000 (21:56 +0000)]
Commit local changes that missed llvm.dbg.addr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313826
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 20 Sep 2017 21:52:33 +0000 (21:52 +0000)]
[IR] Add llvm.dbg.addr, a control-dependent version of llvm.dbg.declare
Summary:
This implements the design discussed on llvm-dev for better tracking of
variables that live in memory through optimizations:
http://lists.llvm.org/pipermail/llvm-dev/2017-September/117222.html
This is tracked as PR34136
llvm.dbg.addr is intended to be produced and used in almost precisely
the same way as llvm.dbg.declare is today, with the exception that it is
control-dependent. That means that dbg.addr should always have a
position in the instruction stream, and it will allow passes that
optimize memory operations on local variables to insert llvm.dbg.value
calls to reflect deleted stores. See SourceLevelDebugging.rst for more
details.
The main drawback to generating DBG_VALUE machine instrs is that they
usually cause LLVM to emit a location list for DW_AT_location. The next
step will be to teach DwarfDebug.cpp how to recognize more DBG_VALUE
ranges as not needing a location list, and possibly start setting
DW_AT_start_offset for variables whose lifetimes begin mid-scope.
Reviewers: aprantl, dblaikie, probinson
Subscribers: eraman, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D37768
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313825
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Wed, 20 Sep 2017 21:52:09 +0000 (21:52 +0000)]
[docs] llvm-cov: Document -show-instantiation-summary
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313824
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Zelenko [Wed, 20 Sep 2017 21:35:51 +0000 (21:35 +0000)]
[ARM] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313823
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Wed, 20 Sep 2017 21:32:44 +0000 (21:32 +0000)]
Revert "Revert "ExecutionEngine: add R_AARCH64_ABS{16,32}""
This reverts commit SVN r313668. The original test case attempted to
write a pointer value into 16-bits, although the value may exceed the
range representable in 16-bits. Ensure that the symbol is located in
the address space such that its absolute address is representable in
16-bits. This should fix the assertion failure that was seen on the
Windows hosts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313822
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 20 Sep 2017 21:25:02 +0000 (21:25 +0000)]
[SimplifyCFG] auto-generate full checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313821
91177308-0d34-0410-b5e6-
96231b3b80d8
Artem Belevich [Wed, 20 Sep 2017 21:23:07 +0000 (21:23 +0000)]
[NVPTX] Implemented shfl.sync instruction and supporting intrinsics/builtins.
Differential Revision: https://reviews.llvm.org/D38090
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313820
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 20 Sep 2017 21:18:17 +0000 (21:18 +0000)]
[InstCombine] Handle (X & C2) < C1 --> (X & C2) == 0
We already did (X & C2) > C1 --> (X & C2) != 0, if any bit set in (X & C2) will produce a result greater than C1. But there is an equivalent inverse condition with <= C1 (which will be canonicalized to < C1+1)
Differential Revision: https://reviews.llvm.org/D38065
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313819
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 20 Sep 2017 21:18:12 +0000 (21:18 +0000)]
[InstCombine] Pre-commit test cases for D38065.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313818
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Wed, 20 Sep 2017 21:17:04 +0000 (21:17 +0000)]
[WebAssembly] Add support for local symbol bindings
Differential Revision: https://reviews.llvm.org/D38096
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313817
91177308-0d34-0410-b5e6-
96231b3b80d8
Marek Sokolowski [Wed, 20 Sep 2017 21:03:37 +0000 (21:03 +0000)]
[llvm-readobj] Fix 'Teach readobj to dump .res files'.
Fix-up for r313790. Some buildbots couldn't convert size_t to
uint{}_t; do it manually.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313816
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Wed, 20 Sep 2017 21:01:30 +0000 (21:01 +0000)]
[mips] Fix calculation of a branch instruction offset to escape left shift of negative value
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313815
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 20 Sep 2017 21:01:24 +0000 (21:01 +0000)]
AMDGPU: Start selecting v_mad_mixhi_f16
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313814
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Wed, 20 Sep 2017 21:00:40 +0000 (21:00 +0000)]
X86: treat SwiftCC as Win64_CC on Win64
The Swift CC is identical to Win64 CC with the exception of swift error
being passed in r12 which is a CSR. However, since this calling
convention is only used in swift -> swift code, it does not impact
interoperability and can be treated entirely as Win64 CC. We would
previously incorrectly lower the frame setup as we did not treat the
frame as conforming to Win64 specifications.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313813
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 20 Sep 2017 20:53:49 +0000 (20:53 +0000)]
AMDGPU: Add tied operands to v_mad_mix{lo|hi}_f16
These write to the low and high half of the destination
register and leave the other 16-bits unchanged. This is true
for most 16-bit instructions on gfx9, but we don't use that
now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313812
91177308-0d34-0410-b5e6-
96231b3b80d8
Vlad Tsyrklevich [Wed, 20 Sep 2017 20:38:14 +0000 (20:38 +0000)]
Introduce the llvm-cfi-verify tool (resubmission of D37937).
Summary: Resubmission of D37937. Fixed i386 target building (conversion from std::size_t& to uint64_t& failed). Fixed documentation warning failure about docs/CFIVerify.rst not being in the tree.
Reviewers: vlad.tsyrklevich
Reviewed By: vlad.tsyrklevich
Patch by Mitch Phillips
Subscribers: sbc100, mgorny, pcc, llvm-commits, kcc
Differential Revision: https://reviews.llvm.org/D38089
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313809
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 20 Sep 2017 20:32:23 +0000 (20:32 +0000)]
Remove the default subtarget from the new Nios2 port. It's unused and deprecated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313808
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 20 Sep 2017 20:31:24 +0000 (20:31 +0000)]
[lit] Undo the patch to stop writing pyc files.
The problems on the bots appear to be resolved and this was
determined to not be the culprit. Removing this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313807
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 20 Sep 2017 20:28:39 +0000 (20:28 +0000)]
AMDGPU: Start selecting v_mad_mixlo_f16
Also add some tests that should be able to use v_mad_mixhi_f16,
but do not yet. This is trickier because we don't really model
the partial update of the register done by 16-bit instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313806
91177308-0d34-0410-b5e6-
96231b3b80d8
Vlad Tsyrklevich [Wed, 20 Sep 2017 19:46:02 +0000 (19:46 +0000)]
Revert "Introduce the llvm-cfi-verify tool (resubmission of D37937)."
This reverts commit r313798, it's causing buildbot failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313804
91177308-0d34-0410-b5e6-
96231b3b80d8
Vlad Tsyrklevich [Wed, 20 Sep 2017 19:14:16 +0000 (19:14 +0000)]
Introduce the llvm-cfi-verify tool (resubmission of D37937).
Summary: Resubmission of D37937. Fixed i386 target building (conversion from std::size_t& to uint64_t& failed). Fixed documentation warning failure about docs/CFIVerify.rst not being in the tree.
Reviewers: vlad.tsyrklevich
Reviewed By: vlad.tsyrklevich
Patch by Mitch Phillips
Subscribers: mgorny, pcc, llvm-commits, kcc
Differential Revision: https://reviews.llvm.org/D38089
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313798
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 20 Sep 2017 19:09:28 +0000 (19:09 +0000)]
AMDGPU: Fix encoding of op_sel for mad_mix* opcodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313797
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Wed, 20 Sep 2017 19:03:35 +0000 (19:03 +0000)]
Reland "[WebAssembly] Add support for naming wasm data segments"
Add adds support for naming data segments. This is useful
useful linkers so that they can merge similar sections.
Differential Revision: https://reviews.llvm.org/D37886
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313795
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 20 Sep 2017 18:49:31 +0000 (18:49 +0000)]
[APInt] Use getActiveBits() to implement logBase2 and ceilLogBase2. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313793
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 20 Sep 2017 18:49:29 +0000 (18:49 +0000)]
[InstCombine] Use APInt::getActiveBits() to avoid creating an APInt from a trailing zero count to do a comparison. NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313792
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Wed, 20 Sep 2017 18:40:59 +0000 (18:40 +0000)]
CodeGen: support SwiftError SwiftCC on Windows x64
Add support for passing SwiftError through a register on the Windows x64
calling convention. This allows the use of swifterror attributes on
parameters which is used by the swift front end for the `Error`
parameter. This partially enables building the swift standard library
for Windows x86_64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313791
91177308-0d34-0410-b5e6-
96231b3b80d8
Marek Sokolowski [Wed, 20 Sep 2017 18:33:35 +0000 (18:33 +0000)]
[llvm-readobj] Teach readobj to dump .res files (WindowsResource).
This enables readobj to output Windows resource files (.res). This way,
we'll be able to test .res outputs without comparing them byte-by-byte
with "magic binary files" generated by MS toolchain.
Differential Revision: https://reviews.llvm.org/D38058
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313790
91177308-0d34-0410-b5e6-
96231b3b80d8
Jake Ehrlich [Wed, 20 Sep 2017 18:23:01 +0000 (18:23 +0000)]
Rename K_MIPS64 to K_GNU64
This patch renames K_MIPS64 to K_GNU64 as part of a change to add
support for writing archives with 64-bit indexes in the symbol table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313787
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 20 Sep 2017 18:19:08 +0000 (18:19 +0000)]
Re-land "[DebugInfo] Insert DW_OP_deref when spilling indirect DBG_VALUEs"
After r313775, it's easier to maintain a parallel BitVector of spilled
locations indexed by location number.
I wasn't able to build a good reduced test case for this iteration of
the bug, but I added a more direct assertion that spilled values must
use frame index locations. If this bug reappears, it won't only fire on
the NEON vector code that we detected it on, but on medium-sized
integer-only programs as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313786
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 20 Sep 2017 18:01:40 +0000 (18:01 +0000)]
[TableGen] Some optimizations to TableGen.
This changes some STL data types to corresponding LLVM
data types that have better performance characteristics.
Differential Revision: https://reviews.llvm.org/D37957
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313783
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 20 Sep 2017 18:01:20 +0000 (18:01 +0000)]
[TableGen] Add a DenseMapInfo for MachineValueType.
No functional change, just adding a DenseMapInfo and tombstone
value so that MVT's can be put into a DenseMap / DenseSet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313782
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Wed, 20 Sep 2017 18:00:03 +0000 (18:00 +0000)]
Revert r313771 "[SLP] Vectorize jumbled memory loads."
This broke the buildbots, e.g.
http://bb.pgr.jp/builders/test-llvm-i686-linux-RA/builds/391
> Summary:
> This patch tries to vectorize loads of consecutive memory accesses, accessed
> in non-consecutive or jumbled way. An earlier attempt was made with patch D26905
> which was reverted back due to some basic issue with representing the 'use mask'
> jumbled accesses.
>
> This patch fixes the mask representation by recording the 'use mask' in the usertree entry.
>
> Change-Id: I9fe7f5045f065d84c126fa307ef6ebe0787296df
>
> Subscribers: mzolotukhin
>
> Reviewed By: ayal
>
> Differential Revision: https://reviews.llvm.org/D36130
>
> Review comments updated accordingly
>
> Change-Id: I22ab0a8a9bac9d49d74baa81a08e1e486f5e75f0
>
> Added a TODO for sortLoadAccesses API
>
> Change-Id: I3c679bf1865422d1b45e17ea28f1992bca660b58
>
> Modified the TODO for sortLoadAccesses API
>
> Change-Id: Ie64a66cb5f9e2a7610438abb0e750c6e090f9565
>
> Review comment update for using OpdNum to insert the mask in respective location
>
> Change-Id: I016d0c1b29874e979efc0205bbf078991f92edce
>
> Fixes '-Wsign-compare warning' in LoopAccessAnalysis.cpp and code rebase
>
> Change-Id: I64b2ea5e68c1d7b6a028f5ef8251c5a97333f89b
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313781
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Wed, 20 Sep 2017 18:00:02 +0000 (18:00 +0000)]
Pacify a gcc -Wparentheses warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313780
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Wed, 20 Sep 2017 18:00:02 +0000 (18:00 +0000)]
Pacify gcc's -Wnum-compare after r313775
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313779
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Wed, 20 Sep 2017 17:44:00 +0000 (17:44 +0000)]
llvm-dwarfdump: implement --recurse-depth=<N>
This patch implements the Darwin dwarfdump option --recurse-depth=<N>,
which limits the recursion depth when selectively printing DIEs at an
offset.
Differential Revision: https://reviews.llvm.org/D38064
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313778
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 20 Sep 2017 17:32:54 +0000 (17:32 +0000)]
[DebugInfo] Use a MapVector to coalesce MachineOperand locations
Summary:
The new code should be linear in the number of DBG_VALUEs, while the old
code was quadratic. NFC intended.
This is also hopefully a more direct expression of the problem, which is
to:
1. Rewrite all virtual register operands to stack slots or physical
registers
2. Uniquely number those machine operands, assigning them location
numbers
3. Rewrite all uses of the old location numbers in the interval map to
use the new location numbers
In r313400, I attempted to track which locations were spilled in a
parallel bitvector indexed by location number. My code was broken
because these location numbers are not stable during rewriting.
Reviewers: aprantl, hans
Subscribers: hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D38068
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313775
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Wed, 20 Sep 2017 17:32:16 +0000 (17:32 +0000)]
[InstCombine] Add select simplifications
In these cases, two selects have constant selectable operands for
both the true and false components and have the same conditional
expression.
We then create two arithmetic operations of the same type and feed a
final select operation using the result of the true arithmetic for the true
operand and the result of the false arithmetic for the false operand and reuse
the original conditionl expression.
The arithmetic operations are naturally folded as a consequence, leaving
only the newly formed select to replace the old arithmetic operation.
Patch by: Michael Berg <michael_c_berg@apple.com>
Differential Revision: https://reviews.llvm.org/D37019
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313774
91177308-0d34-0410-b5e6-
96231b3b80d8
Jake Ehrlich [Wed, 20 Sep 2017 17:22:06 +0000 (17:22 +0000)]
Reland "[llvm-objcopy] Add support for .dynamic, .dynsym, and .dynstr"
I did not upload two binaries that I reference in tests.
This change adds support for sections involved in dynamic loading such
as SHT_DYNAMIC, SHT_DYNSYM, and allocated string tables.
The two added binaries used for tests can be downloaded here and here
Differential Revision: https://reviews.llvm.org/D36560
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313772
91177308-0d34-0410-b5e6-
96231b3b80d8
Mohammad Shahid [Wed, 20 Sep 2017 17:19:57 +0000 (17:19 +0000)]
[SLP] Vectorize jumbled memory loads.
Summary:
This patch tries to vectorize loads of consecutive memory accesses, accessed
in non-consecutive or jumbled way. An earlier attempt was made with patch D26905
which was reverted back due to some basic issue with representing the 'use mask'
jumbled accesses.
This patch fixes the mask representation by recording the 'use mask' in the usertree entry.
Change-Id: I9fe7f5045f065d84c126fa307ef6ebe0787296df
Subscribers: mzolotukhin
Reviewed By: ayal
Differential Revision: https://reviews.llvm.org/D36130
Review comments updated accordingly
Change-Id: I22ab0a8a9bac9d49d74baa81a08e1e486f5e75f0
Added a TODO for sortLoadAccesses API
Change-Id: I3c679bf1865422d1b45e17ea28f1992bca660b58
Modified the TODO for sortLoadAccesses API
Change-Id: Ie64a66cb5f9e2a7610438abb0e750c6e090f9565
Review comment update for using OpdNum to insert the mask in respective location
Change-Id: I016d0c1b29874e979efc0205bbf078991f92edce
Fixes '-Wsign-compare warning' in LoopAccessAnalysis.cpp and code rebase
Change-Id: I64b2ea5e68c1d7b6a028f5ef8251c5a97333f89b
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313771
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Wed, 20 Sep 2017 17:16:01 +0000 (17:16 +0000)]
[cmake] Add an option to build llvm with IR PGO
This adds an LLVM_ENABLE_IR_PGO option to enable building llvm and its
tools with IR PGO instrumentation.
Usage: -DLLVM_BUILD_INSTRUMENTED=On -DLLVM_ENABLE_IR_PGO=On (both
options must be enabled)
Differential Revision: https://reviews.llvm.org/D38066
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313770
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Wed, 20 Sep 2017 17:16:00 +0000 (17:16 +0000)]
[cmake] Unmark LLVM_BUILD_INSTRUMENTED_COVERAGE as experimental
The coverage bot has been stable for a while:
http://lab.llvm.org:8080/coverage/coverage-reports/index.html
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313769
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Wed, 20 Sep 2017 17:16:00 +0000 (17:16 +0000)]
[docs] Make a note of LLVM_BUILD_INSTRUMENTED_COVERAGE
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313768
91177308-0d34-0410-b5e6-
96231b3b80d8
Jake Ehrlich [Wed, 20 Sep 2017 17:11:58 +0000 (17:11 +0000)]
Reland "[llvm-objcopy] Add support for .dynamic, .dynsym, and .dynstr"
I overzealously landed this before I was sure that another change
wouldn't break the build that this change depends on.
This change adds support for sections involved in dynamic loading such
as SHT_DYNAMIC, SHT_DYNSYM, and allocated string tables.
The two added binaries used for tests can be downloaded here and here
Differential Revision: https://reviews.llvm.org/D36560
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313767
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Wed, 20 Sep 2017 17:09:47 +0000 (17:09 +0000)]
[ThinLTO] Fix dead stripping analysis for SamplePGO
Summary:
The fix for dead stripping analysis in the case of SamplePGO indirect
calls to local functions (r313151) introduced the possibility of an
infinite loop.
Make sure we check for the value being already live after we update it
for SamplePGO indirect call handling.
Reviewers: danielcdh
Subscribers: mehdi_amini, inglorion, llvm-commits, eraman
Differential Revision: https://reviews.llvm.org/D38086
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313766
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 20 Sep 2017 17:08:20 +0000 (17:08 +0000)]
[lit] Reverse path list when updating environment vars.
Bug pointed out by EricWF. This would construct a path where
items would be added in the wrong order, potentially leading
to using the wrong tools for testing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313765
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 20 Sep 2017 16:01:50 +0000 (16:01 +0000)]
Make libcxx tests work when llvm sources are not present.
Despite a strong CMake warning that this is an unsupported
libcxx build configuration, some bots still rely on being
able to check out lit and libcxx independently with no
LLVM sources, and then run lit against libcxx.
A previous patch broke that workflow, so this is making it work
again. Unfortunately, it breaks generation of the llvm-lit
script for libcxx, but we will just have to live with that until
a solution is found that allows libcxx to make more use of
llvm build pieces. libcxx can still run tests by using the
ninja check target, or by running lit.py directly against the
build tree or source tree.
Differential Revision: https://reviews.llvm.org/D38057
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313763
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 20 Sep 2017 15:59:57 +0000 (15:59 +0000)]
DebugInfo: Remove unneeded attributes from test/DebugInfo/Generic/imported-name-inlined.ll
Remove unneeded attributes from test/DebugInfo/Generic/imported-name-inlined.ll because it was causing failures on pure MIPS builds.
Patch by Miloš Stojanović!
Differential Revision: https://reviews.llvm.org/D38079
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313762
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Wed, 20 Sep 2017 15:57:25 +0000 (15:57 +0000)]
[mips] Add a valid test case to check the reason of the recent build-bot failure. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313761
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Wed, 20 Sep 2017 14:53:07 +0000 (14:53 +0000)]
Revert r313736: "[SLP] Vectorize jumbled memory loads."
The revision breaks buildbots:
http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/6694/steps/test/logs/stdio
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313758
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Wed, 20 Sep 2017 14:52:56 +0000 (14:52 +0000)]
Revert r313753: "Fix a -Wsign-compare warning in LoopAccessAnalysis.cpp"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313757
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 20 Sep 2017 13:49:52 +0000 (13:49 +0000)]
[X86][SSE] Add PR22415 test case
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313755
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Wed, 20 Sep 2017 12:18:22 +0000 (12:18 +0000)]
Fix a -Wsign-compare warning in LoopAccessAnalysis.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313753
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Wed, 20 Sep 2017 11:54:37 +0000 (11:54 +0000)]
Recommit [MachineCombiner] Update instruction depths incrementally for large BBs.
This version of the patch fixes an off-by-one error causing PR34596. We
do not need to use std::next(BlockIter) when calling updateDepths, as
BlockIter already points to the next element.
Original commit message:
> For large basic blocks with lots of combinable instructions, the
> MachineTraceMetrics computations in MachineCombiner can dominate the compile
> time, as computing the trace information is quadratic in the number of
> instructions in a BB and it's relevant successors/predecessors.
> In most cases, knowing the instruction depth should be enough to make
> combination decisions. As we already iterate over all instructions in a basic
> block, the instruction depth can be computed incrementally. This reduces the
> cost of machine-combine drastically in cases where lots of instructions
> are combined. The major drawback is that AFAIK, computing the critical path
> length cannot be done incrementally. Therefore we only compute
> instruction depths incrementally, for basic blocks with more
> instructions than inc_threshold. The -machine-combiner-inc-threshold
> option can be used to set the threshold and allows for easier
> experimenting and checking if using incremental updates for all basic
> blocks has any impact on the performance.
>
> Reviewers: sanjoy, Gerolf, MatzeB, efriedma, fhahn
>
> Reviewed By: fhahn
>
> Subscribers: kiranchandramohan, javed.absar, efriedma, llvm-commits
>
> Differential Revision: https://reviews.llvm.org/D36619
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313751
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Wed, 20 Sep 2017 10:24:37 +0000 (10:24 +0000)]
Revert r313746 "[yaml2obj] - Don't crash on invalid document."
It broke BB:
http://lab.llvm.org:8011/builders/llvm-hexagon-elf/builds/9781
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313748
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Wed, 20 Sep 2017 09:57:11 +0000 (09:57 +0000)]
[yaml2obj] - Don't crash on invalid document.
Previously jaml2obj would segfault on empty document.
(without yaml description).
Patch fixes the issue.
Differential revision: https://reviews.llvm.org/D38036
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313746
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 20 Sep 2017 09:36:11 +0000 (09:36 +0000)]
[X86][SSE] Remove unnecessary NonceMasks from combineX86ShufflesRecursively calls (NFCI)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313743
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikael Holmen [Wed, 20 Sep 2017 08:23:29 +0000 (08:23 +0000)]
[IfConversion] Add testcases [NFC]
These tests should have been included in r310697 / D34099 but apparently
I missed them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313737
91177308-0d34-0410-b5e6-
96231b3b80d8
Mohammad Shahid [Wed, 20 Sep 2017 08:18:28 +0000 (08:18 +0000)]
[SLP] Vectorize jumbled memory loads.
Summary:
This patch tries to vectorize loads of consecutive memory accesses, accessed
in non-consecutive or jumbled way. An earlier attempt was made with patch D26905
which was reverted back due to some basic issue with representing the 'use mask' of
jumbled accesses.
This patch fixes the mask representation by recording the 'use mask' in the usertree entry.
Change-Id: I9fe7f5045f065d84c126fa307ef6ebe0787296df
Reviewers: mkuper, loladiro, Ayal, zvi, danielcdh
Reviewed By: Ayal
Subscribers: mzolotukhin
Differential Revision: https://reviews.llvm.org/D36130
Commit after rebase for patch D36130
Change-Id: I8add1c265455669ef288d880f870a9522c8c08ab
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313736
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew V. Tischenko [Wed, 20 Sep 2017 08:17:17 +0000 (08:17 +0000)]
'into' instruction should not be decoded as a valid instr in 64-bit mode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313735
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 20 Sep 2017 06:38:41 +0000 (06:38 +0000)]
[X86] Remove isel checks for immediate size on floating point compare and xop compare instructions. NFCI
If these checks fail we end up not selecting an instruction at all. So we are already relying on the immediate being checked upstream of isel. So doing the check in isel is just bloat to the isel table. Interestingly, we didn't check on the AVX512 version of the instructions anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313724
91177308-0d34-0410-b5e6-
96231b3b80d8
Stanislav Mekhanoshin [Wed, 20 Sep 2017 06:34:28 +0000 (06:34 +0000)]
[AMDGPU] Fixed memory leak with inliner replaced
Delete inliner before replacing it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313723
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 20 Sep 2017 06:11:25 +0000 (06:11 +0000)]
AMDGPU: Move r600 only code into r600 only td file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313719
91177308-0d34-0410-b5e6-
96231b3b80d8
Stanislav Mekhanoshin [Wed, 20 Sep 2017 06:10:15 +0000 (06:10 +0000)]
[AMDGPU] Fix regression in test clang/test/CodeGen/backend-unsupported-error.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313718
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 20 Sep 2017 05:01:53 +0000 (05:01 +0000)]
AMDGPU: Match load d16 hi instructions
Also starts selecting global loads for constant address
in some cases. Some end up selecting to mubuf still, which
requires investigation.
We still get sub-optimal regalloc and extra waitcnts inserted
due to not really tracking the liveness of the separate register
halves.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313716
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 20 Sep 2017 04:39:02 +0000 (04:39 +0000)]
DiagnosticInfoOptimizationBase: Appease g++-4.8.2 not confused to add an explicit type to resolve emit() as non-template function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313715
91177308-0d34-0410-b5e6-
96231b3b80d8
Stanislav Mekhanoshin [Wed, 20 Sep 2017 04:25:58 +0000 (04:25 +0000)]
[AMDGPU] Port of HSAIL inliner
Differential Revision: https://reviews.llvm.org/D36849
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313714
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 20 Sep 2017 03:43:35 +0000 (03:43 +0000)]
AMDGPU: Cleanup load/store PatFrags
Try to use a consistent naming scheme.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313713
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 20 Sep 2017 03:20:09 +0000 (03:20 +0000)]
AMDGPU: Match store d16_hi instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313712
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Wed, 20 Sep 2017 02:31:57 +0000 (02:31 +0000)]
Tighten the invariants around LoopBase::invalidate
Summary:
With this change:
- Methods in LoopBase trip an assert if the receiver has been invalidated
- LoopBase::clear frees up the memory held the LoopBase instance
This change also shuffles things around as necessary to work with this stricter invariant.
Reviewers: chandlerc
Subscribers: mehdi_amini, mcrosier, llvm-commits
Differential Revision: https://reviews.llvm.org/D38055
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313708
91177308-0d34-0410-b5e6-
96231b3b80d8
Mike Edwards [Wed, 20 Sep 2017 01:21:02 +0000 (01:21 +0000)]
Reverting due to Green Dragon bot failure.
http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental/42594/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313706
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Wed, 20 Sep 2017 01:12:09 +0000 (01:12 +0000)]
Clang-format few files to make later diffs leaner; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313705
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Berlin [Wed, 20 Sep 2017 00:07:27 +0000 (00:07 +0000)]
GVNSink: Make ModelledPHIs constructor linear (and avoid edge case it worries about) by avoiding getIncomingValueForBlock
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313702
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Berlin [Wed, 20 Sep 2017 00:07:25 +0000 (00:07 +0000)]
Revert "[GVNSink] Remove dependency on SmallPtrSet iteration order."
This reverts commit r312156, because now the op and block arrays are not in the same order :(.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313701
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Berlin [Wed, 20 Sep 2017 00:07:12 +0000 (00:07 +0000)]
NewGVN: Remove unused includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313700
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Tue, 19 Sep 2017 23:50:28 +0000 (23:50 +0000)]
Make lit stop writing pyc files.
Many svn-based buildbots seem to be getting stuck continually
in tree conflicts due to the output of pyc files. I'm disabling
these as a temporary measure in an attempt to get everything
stable again.
I'll try to remove this code once I understand the problem
better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313698
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Tue, 19 Sep 2017 23:34:12 +0000 (23:34 +0000)]
[MIRPrinter] Print empty successor lists when they cannot be guessed
This re-applies commit r313685, this time with the proper updates to
the test cases.
Original commit message:
Unreachable blocks in the machine instr representation are these
weird empty blocks with no successors.
The MIR printer used to not print empty lists of successors. However,
the MIR parser now treats non-printed list of successors as "please
guess it for me". As a result, the parser tries to guess the list of
successors and given the block is empty, just assumes it falls through
the next block (if any).
For instance, the following test case used to fail the verifier.
The MIR printer would print
entry
/ \
true (def) false (no list of successors)
|
split.true (use)
The MIR parser would understand this:
entry
/ \
true (def) false
| / <-- invalid edge
split.true (use)
Because of the invalid edge, we get the "def does not
dominate all uses" error.
The fix consists in printing empty successor lists, so that the parser
knows what to do for unreachable blocks.
rdar://problem/
34022159
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313696
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Tue, 19 Sep 2017 23:19:00 +0000 (23:19 +0000)]
[LoopInfo] Make LoopBase and Loop destructors non-public
Summary:
See comment for why I think this is a good idea.
This change also:
- Removes an SCEV test case. The SCEV test was not testing anything useful (most of it was `#if 0` ed out) and it would need to be updated to deal with a private ~Loop::Loop.
- Updates the loop pass manager test case to deal with a private ~Loop::Loop.
- Renames markAsRemoved to markAsErased to contrast with removeLoop, via the usual remove vs. erase idiom we already have for instructions and basic blocks.
Reviewers: chandlerc
Subscribers: mehdi_amini, mcrosier, llvm-commits
Differential Revision: https://reviews.llvm.org/D37996
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313695
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Tue, 19 Sep 2017 23:00:57 +0000 (23:00 +0000)]
[WebAssembly] Add support for naming wasm data segments
Add adds support for naming data segments. This is useful
useful linkers so that they can merge similar sections.
Differential Revision: https://reviews.llvm.org/D37886
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313692
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Tue, 19 Sep 2017 23:00:55 +0000 (23:00 +0000)]
Allow ORE.emit to take a closure to delay building the remark object
In the lambda we are now returning the remark by value so we need to preserve
its type in the insertion operator. This requires making the insertion
operator generic.
I've also converted a few cases to use the new API. It seems to work pretty
well. See the LoopUnroller for a slightly more interesting case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313691
91177308-0d34-0410-b5e6-
96231b3b80d8
Vlad Tsyrklevich [Tue, 19 Sep 2017 22:36:32 +0000 (22:36 +0000)]
Revert "Introduce the llvm-cfi-verify tool."
This reverts commit r313688, it caused build failures for
llvm-i686-linux-RA
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313689
91177308-0d34-0410-b5e6-
96231b3b80d8
Vlad Tsyrklevich [Tue, 19 Sep 2017 22:33:09 +0000 (22:33 +0000)]
Introduce the llvm-cfi-verify tool.
Summary: Introduces the llvm-cfi-verify tool to llvm. Includes the design document (docs/CFIVerify.rst). Current implementation of the tool is simply a disassembler that identifies and prints the indirect control flow instructions.
Reviewers: vlad.tsyrklevich
Reviewed By: vlad.tsyrklevich
Patch by Mitch Phillips
Subscribers: llvm-commits, kcc, pcc, mgorny
Differential Revision: https://reviews.llvm.org/D37937
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313688
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Tue, 19 Sep 2017 22:10:20 +0000 (22:10 +0000)]
CodeGen: use range based for loops (NFC)
Simplify the RPOT traversal by using a range based for loop for the
iterator dereference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313687
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Tue, 19 Sep 2017 22:03:50 +0000 (22:03 +0000)]
Revert "[MIRPrinter] Print empty successor lists when they cannot be guessed"
This reverts commit r313685.
I thought I had ran ninja check, but apparently I didn't...
Need to update a bunch of mir tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313686
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Tue, 19 Sep 2017 21:55:51 +0000 (21:55 +0000)]
[MIRPrinter] Print empty successor lists when they cannot be guessed
Unreachable blocks in the machine instr representation are these
weird empty blocks with no successors.
The MIR printer used to not print empty lists of successors. However,
the MIR parser now treats non-printed list of successors as "please
guess it for me". As a result, the parser tries to guess the list of
successors and given the block is empty, just assumes it falls through
the next block (if any).
For instance, the following test case used to fail the verifier.
The MIR printer would print
entry
/ \
true (def) false (no list of successors)
|
split.true (use)
The MIR parser would understand this:
entry
/ \
true (def) false
| / <-- invalid edge
split.true (use)
Because of the invalid edge, we get the "def does not
dominate all uses" error.
The fix consists in printing empty successor lists, so that the parser
knows what to do for unreachable blocks.
rdar://problem/
34022159
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313685
91177308-0d34-0410-b5e6-
96231b3b80d8
Jake Ehrlich [Tue, 19 Sep 2017 21:37:35 +0000 (21:37 +0000)]
Reland "[llvm-objcopy] Add support for nested and overlapping segments"
I didn't initialize a pointer to be nullptr that I needed to.
This change adds support for nested and even overlapping segments. This means
that PT_PHDR, PT_GNU_RELRO, PT_TLS, and PT_DYNAMIC can be supported properly.
Differential Revision: https://reviews.llvm.org/D36558
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313682
91177308-0d34-0410-b5e6-
96231b3b80d8