Jim Grosbach [Thu, 15 Mar 2012 23:00:30 +0000 (23:00 +0000)]
Remove inadvertant commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152870
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 15 Mar 2012 22:54:20 +0000 (22:54 +0000)]
[fast-isel] Address Eli's comments for r152847. Specifically, add a test case
and still allow immediate encoding, just not with cmn.
rdar://
11038907
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152869
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 15 Mar 2012 22:19:35 +0000 (22:19 +0000)]
docs: Update TestingGuide to change recommended practice to using LNT to drive
the test-suite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152860
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 15 Mar 2012 21:40:23 +0000 (21:40 +0000)]
[fast-isel] Don't try to encode LONG_MIN using cmn instructions.
rdar://
11038907
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152847
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 15 Mar 2012 21:34:14 +0000 (21:34 +0000)]
ARM case-insensitive checking for APSR_nzcv.
rdar://
11056591
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152846
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 15 Mar 2012 21:33:47 +0000 (21:33 +0000)]
We actually handle AllocaInst via getRegForValue below just fine.
Part of rdar://
8905263
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152845
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 15 Mar 2012 21:33:44 +0000 (21:33 +0000)]
Add some debugging output into fast isel as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152844
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 15 Mar 2012 21:33:41 +0000 (21:33 +0000)]
Add another debug statement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152843
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 15 Mar 2012 21:33:39 +0000 (21:33 +0000)]
Tabs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152842
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 15 Mar 2012 21:33:35 +0000 (21:33 +0000)]
Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152841
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 15 Mar 2012 21:22:53 +0000 (21:22 +0000)]
Make MnemonicTable const again. That part of r152202 was OK.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152840
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 15 Mar 2012 20:48:18 +0000 (20:48 +0000)]
ARM aliases for pre-unified syntax fcmpz[sd] mnemonics.
rdar://
11056647
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152834
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 15 Mar 2012 20:44:06 +0000 (20:44 +0000)]
Don't assume all mnemonics fit in 64k.
We currently assume that all targets have less than 64k opcodes. We
shouldn't limit it further.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152833
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Beaumont-Gay [Thu, 15 Mar 2012 20:24:29 +0000 (20:24 +0000)]
line endings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152832
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 15 Mar 2012 20:14:42 +0000 (20:14 +0000)]
Type sizes and fields offsets inside structs are unsigned. This is a highly
theoretical fix since it only matters for types with >= 2^63 bits (!) and also
only matters if pointers have more than 64 bits, which is not supported anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152831
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 15 Mar 2012 18:49:02 +0000 (18:49 +0000)]
Use vmov.f32 to materialize f32 consts on ARM. This relaxes constraints on
register allocation by allowing all 32 D-registers to be used. Patch by Cameron
Zwarich.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152824
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 15 Mar 2012 18:05:57 +0000 (18:05 +0000)]
Revert r152202: "Use uint16_t to store InstrNameIndices in MCInstrInfo."
We cannot limit the concatenated instruction names to 64K. ARM is
already at 32K, and it is easy to imagine a target with more
instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152817
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 15 Mar 2012 18:05:54 +0000 (18:05 +0000)]
Revert r152105: "Use uint16_t to store indices into string table"
This patch limited the concatenated register names to 64K which meant
that the total number of registers was many times less than 64K.
If any compilers actually enforce the 64K limit on string literals, and
it turns out to be a problem, we should fix that problem by not using
long string literals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152816
91177308-0d34-0410-b5e6-
96231b3b80d8
Kristof Beyls [Thu, 15 Mar 2012 17:50:29 +0000 (17:50 +0000)]
Fix VCVT decoding (between floating-point and fixed-point, Floating-point). Patch by Richard Barton.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152814
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Thu, 15 Mar 2012 17:49:29 +0000 (17:49 +0000)]
Fix bug found by warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152812
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 15 Mar 2012 15:52:59 +0000 (15:52 +0000)]
Short term fix for pr12270 before we change dominates to handle unreachable
code.
While here, reduce indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152803
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 15 Mar 2012 11:19:41 +0000 (11:19 +0000)]
Use an iterator instead of calling .size() on the worklist every time, which is wasteful.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152794
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Thu, 15 Mar 2012 09:03:03 +0000 (09:03 +0000)]
Implement relocation-overflow behavior for PE/COFF.
This needs a test, but it will take some time to figure
out the best way to get an input that will produce > 2^16 relocs.
Patch by Graydon Hoare!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152787
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 15 Mar 2012 08:49:06 +0000 (08:49 +0000)]
When optimizing certain BUILD_VECTOR nodes into other BUILD_VECTOR nodes, add the new node into the work list because there is a potential for further optimizations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152784
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 15 Mar 2012 08:19:33 +0000 (08:19 +0000)]
Revert the removal of DW_AT_MIPS_linkage_name when we aren't putting
out the DW_AT_name. Older gdbs unfortunately still use it to
disambiguate member functions in templated classes (gdb.cp/templates.exp).
rdar://
11043421 (which is now deferred for a bit)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152782
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Thu, 15 Mar 2012 06:49:31 +0000 (06:49 +0000)]
Follow-up to r152620: restore JIT event listener tests to unittest/ExecutionEngine/JIT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152780
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 15 Mar 2012 05:12:00 +0000 (05:12 +0000)]
Add a xform to the DAG combiner.
Transform:
(fsub x, (fadd x, y)) -> (fneg y) and
(fsub x, (fadd y, x)) -> (fneg y)
if 'unsafe math' is specified.
<rdar://problem/
7540295>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152777
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 15 Mar 2012 01:37:56 +0000 (01:37 +0000)]
Remove the basic inliner. This was added in 2007, and hasn't really
changed since. No one was using it. It is yet another consumer of the
InlineCost interface that I'd like to change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152769
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 15 Mar 2012 00:55:51 +0000 (00:55 +0000)]
Make the swap code here a bit more obvious what its doing... We're
essentially sorting the pair's arguments. I'd love to actually call sort
here, but I'm just not that crazy. ;]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152764
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 15 Mar 2012 00:50:21 +0000 (00:50 +0000)]
Don't assume that the arguments are processed in some particular order.
This appears to not be the case with dragonegg at least in some
contexts. Hopefully will fix the bootstrap assert failure there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152763
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 15 Mar 2012 00:45:30 +0000 (00:45 +0000)]
[avx] Add patterns for VINSERTF128rm.
This results in things such as
vmovaps -96(%rbx), %xmm1
vinsertf128 $1, %xmm1, %ymm0, %ymm0
to be combined to
vinsertf128 $1, -96(%rbx), %ymm0, %ymm0
rdar://
10643481
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152762
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 15 Mar 2012 00:29:10 +0000 (00:29 +0000)]
This pass didn't want the inline cost per-se, it just wants generic code
metrics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152760
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 15 Mar 2012 00:29:08 +0000 (00:29 +0000)]
Remove all remnants of partial specialization in the cost computation
side of things. This is all dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152759
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Thu, 15 Mar 2012 00:05:31 +0000 (00:05 +0000)]
Fixed a transform crash when setting a negative size value for memset. Fixes PR12202.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152756
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 14 Mar 2012 23:33:24 +0000 (23:33 +0000)]
[tsan] use FunctionBlackList
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152755
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 14 Mar 2012 23:22:10 +0000 (23:22 +0000)]
[asan] rename class BlackList to FunctionBlackList and move it into a separate file -- we will need the same functionality in ThreadSanitizer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152753
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 14 Mar 2012 23:19:53 +0000 (23:19 +0000)]
Extend the inline cost calculation to account for bonuses due to
correlated pairs of pointer arguments at the callsite. This is designed
to recognize the common C++ idiom of begin/end pointer pairs when the
end pointer is a constant offset from the begin pointer. With the
C-based idiom of a pointer and size, the inline cost saw the constant
size calculation, and this provides the same level of information for
begin/end pairs.
In order to propagate this information we have to search for candidate
operations on a pair of pointer function arguments (or derived from
them) which would be simplified if the pointers had a known constant
offset. Then the callsite analysis looks for such pointer pairs in the
argument list, and applies the appropriate bonus.
This helps LLVM detect that half of bounds-checked STL algorithms
(such as hash_combine_range, and some hybrid sort implementations)
disappear when inlined with a constant size input. However, it's not
a complete fix due the inaccuracy of our cost metric for constants in
general. I'm looking into that next.
Benchmarks showed no significant code size change, and very minor
performance changes. However, specific code such as hashing is showing
significantly cleaner inlining decisions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152752
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 14 Mar 2012 23:05:06 +0000 (23:05 +0000)]
When an invoke is marked with metadata indicating its unwind edge
should be ignored by ARC optimization, don't insert new ARC runtime
calls in the unwind destination.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152748
91177308-0d34-0410-b5e6-
96231b3b80d8
Francois Pichet [Wed, 14 Mar 2012 22:36:10 +0000 (22:36 +0000)]
Fixes the MSVC build.
Commit r152704 exposed a latent MSVC limitation (aka bug).
Both ilist and and iplist contains the same function:
template<class InIt> void insert(iterator where, InIt first, InIt last) {
for (; first != last; ++first) insert(where, *first);
}
Also ilist inherits from iplist and ilist contains a "using iplist<NodeTy>::insert".
MSVC doesn't know which one to pick and complain with an error.
I think it is safe to delete ilist::insert since it is redundant anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152746
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 14 Mar 2012 20:16:41 +0000 (20:16 +0000)]
Change where we enable the heuristic that delays inlining into functions
which are small enough to themselves be inlined. Delaying in this manner
can be harmful if the function is inelligible for inlining in some (or
many) contexts as it pessimizes the code of the function itself in the
event that inlining does not eventually happen.
Previously the check was written to only do this delaying of inlining
for static functions in the hope that they could be entirely deleted and
in the knowledge that all callers of static functions will have the
opportunity to inline if it is in fact profitable. However, with C++ we
get two other important sources of functions where the definition is
always available for inlining: inline functions and templated functions.
This patch generalizes the inliner to allow linkonce-ODR (the linkage
such C++ routines receive) to also qualify for this delay-based
inlining.
Benchmarking across a range of large real-world applications shows
roughly 2% size increase across the board, but an average speedup of
about 0.5%. Some benhcmarks improved over 2%, and the 'clang' binary
itself (when bootstrapped with this feature) shows a 1% -O0 performance
improvement when run over all Sema, Lex, and Parse source code smashed
into a single file. A clean re-build of Clang+LLVM with a bootstrapped
Clang shows approximately 2% improvement, but that measurement is often
noisy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152737
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Wed, 14 Mar 2012 11:34:19 +0000 (11:34 +0000)]
Some typos in lit command guide
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152712
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 14 Mar 2012 11:26:37 +0000 (11:26 +0000)]
Silence operator precedence warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152711
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 14 Mar 2012 08:07:43 +0000 (08:07 +0000)]
Update the "hello world" example to resemble what we currently output.
Also do some minor reformatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152707
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 14 Mar 2012 07:32:53 +0000 (07:32 +0000)]
Refactor the inline cost bonus calculation for constants to use
a worklist rather than a recursive call.
No functionality changed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152706
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 14 Mar 2012 07:28:01 +0000 (07:28 +0000)]
Reapply r152486 with a fix for the nightly testers.
There were cases where a value could be used and it's both crossing an invoke
and NOT crossing an invoke. This could happen in the landing pads. In that case,
we will demote the value to the stack like we did before.
<rdar://problem/
10609139>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152705
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 14 Mar 2012 07:14:25 +0000 (07:14 +0000)]
Insert the debugging instructions in one fell-swoop so that it doesn't call the
expensive "getFirstTerminator" call. This reduces the time of compilation in
PR12258 from >10 minutes to < 10 seconds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152704
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Wed, 14 Mar 2012 06:16:57 +0000 (06:16 +0000)]
Clean up removed file after r152620
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152703
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Wed, 14 Mar 2012 06:09:20 +0000 (06:09 +0000)]
Typo in lit command guide
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152702
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 14 Mar 2012 04:00:41 +0000 (04:00 +0000)]
misched: implemented a framework for top-down or bottom-up scheduling.
New flags: -misched-topdown, -misched-bottomup. They can be used with
the default scheduler or with -misched=shuffle. Without either
topdown/bottomup flag -misched=shuffle now alternates scheduling
direction.
LiveIntervals update is unimplemented with bottom-up scheduling, so
only -misched-topdown currently works.
Capped the ScheduleDAG hierarchy with a concrete ScheduleDAGMI class.
ScheduleDAGMI is aware of the top and bottom of the unscheduled zone
within the current region. Scheduling policy can be plugged into
the ScheduleDAGMI driver by implementing MachineSchedStrategy.
ConvergingScheduler is now the default scheduling algorithm.
It exercises the new driver but still does no reordering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152700
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 14 Mar 2012 04:00:38 +0000 (04:00 +0000)]
misched comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152699
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 14 Mar 2012 02:59:17 +0000 (02:59 +0000)]
Remove the DW_AT_MIPS_linkage name attribute when we don't need it
output (we're emitting a specification already and the information
isn't changing).
Saves 1% on the debug information for a build of llvm.
Fixes rdar://
11043421
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152697
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 14 Mar 2012 00:38:15 +0000 (00:38 +0000)]
Move APInt::operator[] inline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152692
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 14 Mar 2012 00:01:35 +0000 (00:01 +0000)]
Move APInt::operator! inline, it's small and fuses well with surrounding code when inlined.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152688
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 13 Mar 2012 22:16:11 +0000 (22:16 +0000)]
Fortify r152675 a bit. Although I'm not able to come up with a test case that would trigger the truncation case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152678
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 13 Mar 2012 22:00:52 +0000 (22:00 +0000)]
DAG combine incorrectly optimize (i32 vextract (v4i16 load $addr), c) to
(i16 load $addr+c*sizeof(i16)) and replace uses of (i32 vextract) with the
i16 load. It should issue an extload instead: (i32 extload $addr+c*sizeof(i16)).
rdar://
11035895
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152675
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Tue, 13 Mar 2012 20:59:56 +0000 (20:59 +0000)]
Target override to allow CodeGenPrepare to sink address operands to intrinsics in the same way it current does for loads and stores
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152666
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 13 Mar 2012 20:18:42 +0000 (20:18 +0000)]
Add a sanity check in MemoryBuffer::getOpenFile() to make sure we don't hang
if the passed in FileSize is inaccurate.
rdar://
11034179
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152662
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 13 Mar 2012 20:07:36 +0000 (20:07 +0000)]
Remove an old hack for pre-2005 MSVC. We don't support ancient microsoft compilers anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152659
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 13 Mar 2012 20:04:21 +0000 (20:04 +0000)]
s/SjLjEHPass/SjLjEHPrepare/
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152658
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Tue, 13 Mar 2012 19:47:55 +0000 (19:47 +0000)]
Change the X86 assembler to not require a segment register on string
instruction's destination operand like it does for the source operand.
Also fix a typo in the comment for X86AsmParser::isSrcOp().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152654
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 13 Mar 2012 18:07:41 +0000 (18:07 +0000)]
enhance jump threading to preserve TBAA information when PRE'ing loads,
fixing rdar://
11039258, an issue that came up when inspecting clang's
bootstrapped codegen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152635
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 13 Mar 2012 18:01:37 +0000 (18:01 +0000)]
Teach globalopt how to evaluate an invoke with a non-void return type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152634
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 13 Mar 2012 14:07:05 +0000 (14:07 +0000)]
Generalize the "trunc(ptrtoint(x)) - trunc(ptrtoint(y)) ->
trunc(ptrtoint(x-y))" optimization introduced by Chandler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152626
91177308-0d34-0410-b5e6-
96231b3b80d8
Stepan Dyatkovskiy [Tue, 13 Mar 2012 12:37:10 +0000 (12:37 +0000)]
Fixed comments for SwitchInst::addCase and for SwitchInst::removeCase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152624
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 13 Mar 2012 11:42:19 +0000 (11:42 +0000)]
Uniformize the InstructionSimplify interface by ensuring that all routines
take a TargetLibraryInfo parameter. Internally, rather than passing TD, TLI
and DT parameters around all over the place, introduce a struct for holding
them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152623
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Tue, 13 Mar 2012 08:33:15 +0000 (08:33 +0000)]
Add profiling support for Intel Parallel Amplifier XE (VTune) for JITted code in LLVM.
Also refactor the existing OProfile profiling code to reuse the same interfaces with the VTune profiling code.
In addition, unit tests for the profiling interfaces were added.
This patch was prepared by Andrew Kaylor and Daniel Malea, and reviewed in the llvm-commits list by Jim Grosbach
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152620
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 13 Mar 2012 06:39:00 +0000 (06:39 +0000)]
Remove unused field from FixedLenDecoderEmitter. Move NumberedInstructions declaration from class to run method since its only used there and was being reinitialized anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152616
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 13 Mar 2012 05:52:28 +0000 (05:52 +0000)]
Add a return type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152614
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 13 Mar 2012 05:51:56 +0000 (05:51 +0000)]
Inline the d'tor and add an anchor instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152613
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 13 Mar 2012 05:47:27 +0000 (05:47 +0000)]
Refactor the SelectionDAG's 'dump' methods into their own .cpp file.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152611
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 13 Mar 2012 05:43:30 +0000 (05:43 +0000)]
Fixed typo in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152610
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 13 Mar 2012 01:06:07 +0000 (01:06 +0000)]
Fix regression from r151466: an we can't replace uses of an instruction reachable from the entry block with uses of an instruction not reachable from the entry block. PR12231.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152595
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 13 Mar 2012 00:06:15 +0000 (00:06 +0000)]
Address some review comments from Duncan. This moves the iterative
offset accumulation to use a boring APInt instead of ConstantExprs.
I didn't go all the way to an 'int64_t' because I wanted APInt to handle
any magic required to properly wrap the arithmetic when the pointer
width is <64 bits. If there is a significant penalty from using APInt
here, first off WTF, and secondly let me know and I'll do the math by
hand.
I've left one layer still operating w/ ConstantExpr because it makes the
interface quite a bit simpler, and that one isn't iterative so has much
lower cost.
I suppose this may potentially speed up some strang compilation
situations, but I don't really expect much. It should have no functional
impact either way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152590
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 13 Mar 2012 00:02:06 +0000 (00:02 +0000)]
lit: Pass %INCLUDE% to tests on Win32. clang may expect existence of %INCLUDE% in vcvarsall.bat.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152588
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Mon, 12 Mar 2012 21:38:09 +0000 (21:38 +0000)]
Change the second line of the test added for r152414 to use CHECK-NEXT.
Suggestion by Bill Wendling!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152582
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 12 Mar 2012 21:32:58 +0000 (21:32 +0000)]
DFAPacketizerEmitter: Prune includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152581
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Mon, 12 Mar 2012 21:32:09 +0000 (21:32 +0000)]
Added a missing error check for X86 assembly with mismatched base and index
registers not both being 64-bit or both being 32-bit registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152580
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 12 Mar 2012 21:18:53 +0000 (21:18 +0000)]
Inline a trivial helper function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152577
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 12 Mar 2012 21:12:59 +0000 (21:12 +0000)]
sort by alpha.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152576
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 12 Mar 2012 20:58:14 +0000 (20:58 +0000)]
Use a posix compliant regexp in export file construction.
Patch by John Spencer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152574
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 12 Mar 2012 20:19:41 +0000 (20:19 +0000)]
Revert due to nightly test failures.
--- Reverse-merging r152486 into '.':
U lib/CodeGen/SjLjEHPrepare.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152571
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Mon, 12 Mar 2012 18:49:11 +0000 (18:49 +0000)]
[asan] move x86-specific test to a separate X86 directory with a custom lit.local.cfg file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152567
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 12 Mar 2012 11:19:33 +0000 (11:19 +0000)]
When inlining a function and adding its inner call sites to the
candidate set for subsequent inlining, try to simplify the arguments to
the inner call site now that inlining has been performed.
The goal here is to propagate and fold constants through deeply nested
call chains. Without doing this, we loose the inliner bonus that should
be applied because the arguments don't match the exact pattern the cost
estimator uses.
Reviewed on IRC by Benjamin Kramer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152556
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 12 Mar 2012 11:19:31 +0000 (11:19 +0000)]
Teach instsimplify how to constant fold pointer differences.
Typically instcombine has handled this, but pointer differences show up
in several contexts where we would like to get constant folding, and
cannot afford to run instcombine. Specifically, I'm working on improving
the constant folding of arguments used in inline cost analysis with
instsimplify.
Doing this in instsimplify implies some algorithm changes. We have to
handle multiple layers of all-constant GEPs because instsimplify cannot
fold them into a single GEP the way instcombine can. Also, we're only
interested in all-constant GEPs. The result is that this doesn't really
replace the instcombine logic, it's just complimentary and focused on
constant folding.
Reviewed on IRC by Benjamin Kramer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152555
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 12 Mar 2012 11:19:28 +0000 (11:19 +0000)]
FileCheck-ize this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152554
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 12 Mar 2012 10:51:06 +0000 (10:51 +0000)]
Don't cast away constant qualifier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152553
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Mon, 12 Mar 2012 06:15:36 +0000 (06:15 +0000)]
Switch to unified syntax for VFP instructions in inline assembly.
<rdar://problem/
11024696>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152548
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 11 Mar 2012 19:32:35 +0000 (19:32 +0000)]
Replace a hand-coded leading one counting loop with the magic from MathExtras.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152545
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 11 Mar 2012 18:12:04 +0000 (18:12 +0000)]
Remove global map. This code isn't even hot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152544
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 11 Mar 2012 14:56:26 +0000 (14:56 +0000)]
DwarfDebug: Store the filename/dirname pair as a zero-separated string in a stringmap, instead of using a highly inefficient std::map of a pair of std::strings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152541
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 11 Mar 2012 07:57:25 +0000 (07:57 +0000)]
Convert more static tables of registers used by calling convention to uint16_t to reduce space.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152538
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 11 Mar 2012 07:16:55 +0000 (07:16 +0000)]
Use uint16_t to store registers and opcode in static tables in the target specific backends.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152537
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 11 Mar 2012 06:46:40 +0000 (06:46 +0000)]
Remove unused functions getArgRegs and getNumArgRegs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152535
91177308-0d34-0410-b5e6-
96231b3b80d8
Stepan Dyatkovskiy [Sun, 11 Mar 2012 06:09:17 +0000 (06:09 +0000)]
llvm::SwitchInst
Renamed methods caseBegin, caseEnd and caseDefault with case_begin, case_end, and case_default.
Added some notes relative to case iterators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152532
91177308-0d34-0410-b5e6-
96231b3b80d8
Gregory Szorc [Sun, 11 Mar 2012 02:32:56 +0000 (02:32 +0000)]
[llvm.py] Implement disassembler interface
It doesn't currently support the op info and symbol lookup callbacks,
but it is better than nothing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152527
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sun, 11 Mar 2012 02:22:41 +0000 (02:22 +0000)]
Add a few missing 'template' keywords
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152525
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 11 Mar 2012 01:57:56 +0000 (01:57 +0000)]
Shrink and reorder some fields in MCOperandInfo to fit it in 8 bytes to reduce size of static tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152524
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Sun, 11 Mar 2012 01:20:23 +0000 (01:20 +0000)]
Fix warnings when building with VS11.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152523
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Sun, 11 Mar 2012 00:51:01 +0000 (00:51 +0000)]
Fix warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152522
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Sat, 10 Mar 2012 23:03:01 +0000 (23:03 +0000)]
Fixing a compile warning triggered in MSVC about constant truncation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152518
91177308-0d34-0410-b5e6-
96231b3b80d8