Commit Graph

100211 Commits

Author SHA1 Message Date
Adrian Prantl
20d5e1b247 Revert "Debug info: Emit values in subregisters that do not have a separate"
This reverts commit r201179 for buildbot breakage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201188 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-11 22:03:30 +00:00
David Blaikie
feb006fac4 DebugInfo: Don't include the name of the CU file in the line table file list when it's unneeded
This comes up in empty files or files containing #file directives that
never reference the actual source file name. Came up in a small test of
line tables I was playing with.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201187 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-11 21:49:46 +00:00
David Blaikie
3f93eb58a6 DebugInfo: Remove dependence on file numbering in the line table.
These tests were unnecessarily sensitive to the presence and ordering of
elements in the line table file_names list which will break on a future
change I'm working on.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201185 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-11 21:46:46 +00:00
Adrian Prantl
b015567256 whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201181 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-11 21:23:02 +00:00
Adrian Prantl
f4f80ebbc7 Debug info: Emit values in subregisters that do not have a separate
DWARF register number by emitting a super-register + DW_OP_bit_piece.
This is necessary because on x86_64, there are no DWARF register numbers
for i386-style subregisters.
Fixes a bunch of FIXMEs.

rdar://problem/16015314

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201180 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-11 21:22:59 +00:00
Adrian Prantl
d5468bf381 make llvm-dwarfdump a little more resilient when parsing .debug_loc
sections. The call to data.getUnsigned(&Offset, AddressSize) only
increments Offset if the read succeeds, which will result in an infinite
loop.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201179 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-11 21:22:53 +00:00
Matt Arsenault
69bc4ddf10 R600/SI: Fix assertion on infinite loops.
This isn't the most useful case to fix in the real world,
but bugpoint runs into this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201177 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-11 21:12:38 +00:00
Benjamin Kramer
1e6240a85d InstCombine: Teach icmp merging about the equivalence of bit tests and UGE/ULT with a power of 2.
This happens in bitfield code. While there reorganize the existing code
a bit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201176 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-11 21:09:03 +00:00
Jim Grosbach
75bf592807 Tidy up a bit. Formatting only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201174 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-11 20:48:41 +00:00
Jim Grosbach
0c2ff8cbfd ARM: Thumb2 LDR(literal) can target SP.
Fix a slightly overzealous destination register restriction for the
'without .w' alias. Add some explicit testcases.

rdar://16033140

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201173 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-11 20:48:39 +00:00
Benjamin Kramer
193c0914e7 SCEV: Cast switched values to make -Wswitch more useful.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201170 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-11 19:02:55 +00:00
Sylvestre Ledru
6a089db385 Improve the declaration when LDPO_PIE is not available.
Thanks to İsmail Dönmez for the better declaration.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201163 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-11 17:30:18 +00:00
Sylvestre Ledru
31575e7fec If LDPO_PIE is not defined (before binutils 2.23 version),
use the hardcoded declaration 3
See r201110 for the initial change



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201161 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-11 17:11:32 +00:00
Mark Seaborn
440ef85dd0 Add a note about using "Differential Revision:" in commit messages
I noticed this convention from the commit logs.  It seems like it
would be useful to document it, to encourage other committers to link
back to code reviews in their commits.

Differential Revision: http://llvm-reviews.chandlerc.com/D2678

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201160 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-11 16:58:03 +00:00
Benjamin Kramer
cb27441554 ScalarEvolution: Analyze trip count of loops with a switch guarding the exit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201159 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-11 15:44:32 +00:00
Robert Lougher
a63585a8f5 Teach the DAGCombiner how to fold concat_vector nodes when the input is two
BUILD_VECTOR nodes, e.g.:

(concat_vectors (BUILD_VECTOR a1, a2, a3, a4), (BUILD_VECTOR b1, b2, b3, b4))
->
(BUILD_VECTOR a1, a2, a3, a4, b1, b2, b3, b4)

This fixes an issue with AVX, where a sequence was not recognized as a 256-bit
vbroadcast due to the concat_vectors.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201158 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-11 15:42:46 +00:00
Bradley Smith
79ced8c5fa [AArch64] Add missing PCRel relocations for AArch64 in RuntimeDyldELF
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201149 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-11 12:59:09 +00:00
Chandler Carruth
8615ab4a4a [LPM] Switch LICM to actively use LCSSA in addition to preserving it.
Fixes PR18753 and PR18782.

This is necessary for LICM to preserve LCSSA correctly and efficiently.
There is still some active discussion about whether we should be using
LCSSA, but we can't just immediately stop using it and we *need* LICM to
preserve it while we are using it. We can restore the old SSAUpdater
driven code if and when there is a serious effort to remove the reliance
on LCSSA from all of the loop passes.

However, this also serves as a great example of why LCSSA is very nice
to have. This change significantly simplifies the process of sinking
instructions for LICM, and makes it quite a bit less expensive.

It wouldn't even be as complex as it is except that I had to start the
process of removing the big recursive LCSSA formation hammer in order to
switch even this much of the re-forming code to asserting that LCSSA was
preserved. I'll fully remove that next just to tidy things up until the
LCSSA debate settles one way or the other.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201148 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-11 12:52:27 +00:00
Robert Lytton
d3abd0b648 XCore target: fix const section handling
Xcore target ABI requires const data that is externally visible
to be handled differently if it has C-language linkage rather than
C++ language linkage.

Clang now emits ".cp.rodata" section information.

All other externally visible constant data will be placed in the DP section.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201144 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-11 10:36:26 +00:00
Robert Lytton
04a573a41f XCore target: Lower ATOMIC_LOAD & ATOMIC_STORE
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201143 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-11 10:36:18 +00:00
Elena Demikhovsky
e9d5f6e387 AVX: fixed a bug in LowerVECTOR_SHUFFLE
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201140 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-11 10:21:53 +00:00
Dmitri Gribenko
d4ab7d1b69 Remove TimeValue::toPosixTime() -- it is buggy, semantics are unclear, and its
only current user should be using toEpochTime() instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201136 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-11 09:11:18 +00:00
Elena Demikhovsky
e4092e9895 AVX-512: Optimized BUILD_VECTOR pattern;
fixed encoding of VEXTRACTPS instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201134 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-11 07:25:59 +00:00
Quentin Colombet
defd4bc77b [CodeGenPrepare] Test case for the promotions that bypass the
profitability check due to some other checks in the addressing
mode matcher. I.e., test case for commit r201121.

<rdar://problem/16020230>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201132 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-11 06:55:43 +00:00
Lang Hames
a70e3fca1a In RuntimeDyldImpl::emitSection, make Allocate (section size to be allocated) a
uintptr_t. An unsigned could overflow for large sections.

No test case - anything big enough to overflow an unsigned is going to take an
appreciable time to zero when the test passes.

The choice of uintptr_t was made to match the RTDyldMemoryManager APIs, but
these should probably be hardcoded to uint64_ts: It is legitimate to JIT for
64-bit targets from a 32-bit host/compiler.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201127 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-11 05:28:24 +00:00
Craig Topper
35c474d251 Changed attributes of all gather intrinsics from IntrReadMem to IntrReadArgMem as they access only memory based on argument. Patch by Robert Khasanov.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201126 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-11 04:05:33 +00:00
Aaron Ballman
bec3b4865e Using the helper API for random number generation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201125 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-11 03:40:14 +00:00
Aaron Ballman
91b585bccc Hopefully fixing the MinGW 32 build, which was broken by r200767. Not using rand_s() since MinGW does not have an implementation for it, but instead using the underlying CryptGenRandom APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201124 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-11 02:47:33 +00:00
Quentin Colombet
921f0b1d66 [CodeGenPrepare] Undo changes that happened for the profitability check.
The addressing mode matcher checks at some point the profitability of folding an
instruction into the addressing mode. When the instruction to be folded has
several uses, it checks that the instruction can be folded in each use.
To do so, it creates a new matcher for each use and check if the instruction is
in the list of the matched instructions of this new matcher.

The new matchers may promote some instructions and this has to be undone to keep
the state of the original matcher consistent.

A test case will follow.

<rdar://problem/16020230>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201121 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-11 01:59:02 +00:00
David Blaikie
efbd8e5fc0 DebugInfo: Use existing symbol rather than creating it again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201119 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-11 01:23:52 +00:00
Eli Bendersky
8ed971b988 Move the *PassPrinter into their own module.
These are self-contained in functionality so it makes sense to separate them,
as opt.cpp has grown quite big already.

Following Eric's suggestions, if this code is ever deemed useful outside of
tools/opt, it will make sense to move it to one of the LLVM libraries like IR.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201116 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-10 23:34:23 +00:00
Juergen Ributzka
1a66b63578 [Stackmaps] Cleanup code. No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201115 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-10 23:30:26 +00:00
Manman Ren
f3fc8c9d09 LTO API: add lto_module_create_from_memory_with_path.
This function adds an extra path argument to lto_module_create_from_memory.
The path argument will be passed to makeBuffer to make sure the MemoryBuffer
has a name and the created module has a module identifier.

This is mainly for emitting warning messages from the linker. When we emit
warning message on a module, we can use the module identifier.

rdar://15985737


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201114 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-10 23:26:14 +00:00
Rafael Espindola
4822c5fa52 Mark the methods in the Mangler const.
A const ObjectFile needs to be able to provide its name. For an IRObjectFile,
that means being able to call the mangler. Since each IRObjectFile can have
a different mangling, it is natural for them to contain a Mangler which is
therefore also const.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201113 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-10 21:25:13 +00:00
Reid Kleckner
b89b11926c cmake: Do not export targets when installing toolchain only
Patch by Brad King!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201111 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-10 20:44:57 +00:00
Rafael Espindola
256d839eed Fix an old FIXME. LDPO_PIE is available since 2.23, realeased 2012-10-22.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201110 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-10 20:38:38 +00:00
Rafael Espindola
a40b3522c8 Change the begin and end methods in ObjectFile to match the style guide.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201108 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-10 20:24:04 +00:00
Matt Arsenault
700bba297b R600: Implement isTruncateFree
Truncation is just accessing a subregister for any multiple of
the register size, so it's free.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201107 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-10 19:57:42 +00:00
Chandler Carruth
d5a9ea8afe [LPM] A terribly simple fix to a terribly complex bug: PR18773.
The crux of the issue is that LCSSA doesn't preserve stateful alias
analyses. Before r200067, LICM didn't cause LCSSA to run in the LTO pass
manager, where LICM runs essentially without any of the other loop
passes. As a consequence the globalmodref-aa pass run before that loop
pass manager was able to survive the loop pass manager and be used by
DSE to eliminate stores in the function called from the loop body in
Adobe-C++/loop_unroll (and similar patterns in other benchmarks).

When LICM was taught to preserve LCSSA it had to require it as well.
This caused it to be run in the loop pass manager and because it did not
preserve AA, the stateful AA was lost. Most of LLVM's AA isn't stateful
and so this didn't manifest in most cases. Also, in most cases LCSSA was
already running, and so there was no interesting change.

The real kicker is that LCSSA by its definition (injecting PHI nodes
only) trivially preserves AA! All we need to do is mark it, and then
everything goes back to working as intended. It probably was blocking
some other weird cases of stateful AA but the only one I have is
a 1000-line IR test case from loop_unroll, so I don't really have a good
test case here.

Hopefully this fixes the regressions on performance that have been seen
since that revision.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201104 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-10 19:39:35 +00:00
Hans Wennborg
1c4554854d Copy the ThreadLocalMode in GlobalVariable::copyAttributesFrom
This fixes the oversight from r159077.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201098 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-10 17:13:56 +00:00
Tom Stellard
42faffddb9 R600/SI: Initialize M0 and emit S_WQM_B64 whenever DS instructions are used
DS instructions that access local memory can only uses addresses that
are less than or equal to the value of M0.  When M0 is uninitialized,
then we experience undefined behavior.

This patch also changes the behavior to emit S_WQM_B64 on pixel shaders
no matter what kind of DS instruction is used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201097 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-10 16:58:30 +00:00
Tom Stellard
835f1c01bf R600/SI: Only use S_WQM_B64 in pixel shaders
This doesn't change any functionality, since we only have two shader
types (compute and pixel) that use local memory.  We're just changing
the logic to match the documentation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201096 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-10 16:58:27 +00:00
David Blaikie
853f658ed1 Remove some prototype code accidentally committed in r201043
Thanks to Chandler for the catch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201095 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-10 16:49:07 +00:00
Tim Northover
71313f88cb ARM: use natural LLVM IR for vshll instructions
Similarly to the vshrn instructions, these are simple zext/sext + trunc
operations. Using normal LLVM IR should allow for better code, and more sharing
with the AArch64 backend.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201093 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-10 16:20:29 +00:00
Chad Rosier
5fcb5c92d3 [AArch64] Handle aliases of conditional branches without b.pred form.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201091 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-10 15:43:11 +00:00
Oliver Stannard
dbd5c285b8 ARM: r12 is callee-saved for interrupt handlers
For A- and R-class processors, r12 is not normally callee-saved, but is for
interrupt handlers. See AAPCS, 5.3.1.1, "Use of IP by the linker".



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201089 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-10 14:24:23 +00:00
Benjamin Kramer
299918ad48 Make succ_iterator a real random access iterator and clean up a couple of users.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201088 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-10 14:17:42 +00:00
Benjamin Kramer
df3ae8e4f0 GlobalsModRef: Unify and clean up duplicated pointer analysis code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201087 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-10 14:17:30 +00:00
Tim Northover
9ed30bb230 ARM: use LLVM IR to represent the vshrn operation
vshrn is just the combination of a right shift and a truncate (and the limits
on the immediate value actually mean the signedness of the shift doesn't
matter). Using that representation allows us to get rid of an ARM-specific
intrinsic, share more code with AArch64 and hopefully get better code out of
the mid-end optimisers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201085 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-10 14:04:07 +00:00
Robert Lougher
5a2ae98407 Test commit - added a new line to vec_shuf-insert.ll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201083 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-10 12:42:13 +00:00