Commit Graph

3057 Commits

Author SHA1 Message Date
Bill Wendling
c7a09ab311 Temporarily XFAIL this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66866 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-13 04:37:11 +00:00
Duncan Sands
58256f83c8 Revert commit 66140 since it caused several failures
in the Ada testcase.  Reverting this only covers up
the real problem, which is a nasty conceptual difficulty
in the phi elimination pass: when eliminating phi nodes
in landing pads, the register copies need to come before
the invoke, not at the end of the basic block which is
too late...  See PR3784.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66826 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 21:13:42 +00:00
Dale Johannesen
a891518c4d Skip interleaved debug info when fast-forwarding through
allocations.  Apparently the assumption is there is an
instruction (terminator?) following the allocation so I
am allowing the same assumption.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66716 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-11 22:19:43 +00:00
Dale Johannesen
ff278b11bf Removing a dead debug intrinsic shouldn't trigger
another instcombine pass if we weren't going to make
one without debug info.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66576 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-10 21:19:49 +00:00
John Criswell
090c0a2ffd Do not attempt to do parial redundancy elimination on void values.
Also fixed a punctuation error in the header comment.
This fixes PR3775.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66542 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-10 15:04:53 +00:00
Dan Gohman
9d10086797 Don't record the increment instruction; just recompute it from the Phi
if needed. This simplifies the code a little, and is needed for an
upcoming refactoring.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66479 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-09 22:04:01 +00:00
Dan Gohman
3cfe6a4bc2 Fix a few more places where induction variable types were used
where memory access types are needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66470 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-09 21:22:12 +00:00
Dan Gohman
bb5b49cb8d Use ReplacedTy instead of recomputing the same value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66469 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-09 21:19:58 +00:00
Dan Gohman
0daeed270b Use LoopInfo's getLoopLatch() instead of doing what it does manualy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66467 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-09 21:14:16 +00:00
Dan Gohman
53f2ae268a Don't use an induction variable type as a memory access type.
Use VoidTy instead, to be properly conservative.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66463 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-09 21:04:19 +00:00
Dan Gohman
21e7722868 Factor out the code that determines the memory access type
of an instruction into a helper function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66460 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-09 21:01:17 +00:00
Dan Gohman
f7912df4cb Move the sorting of the StrideOrder array earlier so that it doesn't
have to be done twice.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66449 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-09 20:46:50 +00:00
Dan Gohman
9f4ac31a94 Delete the isOnlyStride argument, which is unused.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66446 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-09 20:41:15 +00:00
Dan Gohman
80b0f8c062 Tidy some LSR debug output: announce the loop it's about to process
before it does any processing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66443 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-09 20:34:59 +00:00
Chris Lattner
d7168ddb11 reimplement AliasSetTracker in terms of DenseMap instead of hash_map,
hopefully no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66398 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-09 05:11:09 +00:00
Chris Lattner
29e641761e teach SROA to handle promoting vector allocas with a memset into them into
a vector type instead of into an integer type.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66368 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-08 04:17:04 +00:00
Chris Lattner
c570487d45 Enhance SROA to "promote to scalar" allocas which are
memcpy/memmove'd into or out of.  This fixes a serious
perf issue that Nate ran into.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66366 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-08 04:04:21 +00:00
Chris Lattner
dfe964ce8c change the MemIntrinsic get/setAlignment method to take an unsigned
instead of a Constant*, which is what the clients of it really want.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66364 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-08 03:59:00 +00:00
Chris Lattner
3ce5e887ae Introduce a new MemTransferInst pseudo class, which is a common
parent between MemCpyInst and MemMoveInst, simplify some code to
use it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66361 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-08 03:37:16 +00:00
Chris Lattner
57c03831cc add a bunch more passes to the C bindings (PR3734), patch by
Lennart Augustsson!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66272 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-06 16:52:18 +00:00
Devang Patel
00e389c8c8 While converting an aggregate to scalare, ignore and remove aggregate's debug info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66262 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-06 07:03:54 +00:00
Chris Lattner
0070ce511e this wasn't intended to go in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66252 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-06 05:42:30 +00:00
Chris Lattner
cc14d25dd9 Change various llvm utilities to use PrettyStackTraceProgram in
their main routines.  This makes the tools print their argc/argv
commands if they crash.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66248 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-06 05:34:10 +00:00
Devang Patel
3f43a7021f Do not count DbgInfoIntrinsic while estimating loop header size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66245 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-06 03:51:30 +00:00
Devang Patel
c64bc16cae Skip DbgInfoIntrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66244 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-06 02:59:27 +00:00
Dale Johannesen
03afd02ca2 Don't assign rank numbers to debug intrinsic "calls".
This is needed so debug info doesn't change codegen.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66235 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-06 01:41:59 +00:00
Evan Cheng
67fca63da2 SRThreshold is meant to be inclusive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66227 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-06 00:56:43 +00:00
Evan Cheng
6fb8f421ee Do not split edges to EH landing pads. It will cause code size explosion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66140 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-05 06:31:26 +00:00
Dale Johannesen
4084c4ee34 Fix another case where debug info was affecting
codegen.  I convinced myself it was OK to skip all
pointer bitcasts here too.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66122 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-05 02:06:48 +00:00
Bill Wendling
e562149cdb Add comment to emphasize that the while body is empty.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66115 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-05 01:08:35 +00:00
Dale Johannesen
a0a6637b25 Fix another case where a dbg.declare meant something
had 2 uses instead of 1.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66112 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-05 00:39:02 +00:00
Dale Johannesen
6129e24e49 Re-commit 65975 and a fix for the problem that
was causing llvm-gcc to fail to build.  I've
verified it bootstraps now; good enough for me.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66073 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-04 21:24:04 +00:00
Dan Gohman
fd0339933b Fix this comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66065 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-04 20:50:23 +00:00
Dan Gohman
bc10b8c6c7 Add an assertion for a condition that's always true, and not
immediately obvious.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66062 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-04 20:49:01 +00:00
Chris Lattner
88fe1ad187 complete comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66055 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-04 19:23:25 +00:00
Chris Lattner
0ff83ab985 this wasn't intended to be committed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66054 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-04 19:22:30 +00:00
Chris Lattner
1541e0f7da Fix PR3720 by properly propagating alignment information from memcpy/memmove
onto element accesses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66053 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-04 19:20:50 +00:00
Dale Johannesen
cdb16aa5ab Always skip ptr-to-ptr bitcasts when counting,
per Chris' suggestion.  Slightly faster.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65999 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-04 01:53:05 +00:00
Dale Johannesen
0d6596b7bf Make my earlier patch to skip debug intrinsics
when counting work; it was only off by 1.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65993 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-04 01:20:34 +00:00
Dale Johannesen
4ded40a44d Instruction counters must skip the bitcasts that
feed into llvm.dbg.declare nodes, as well as
the debug directives themselves.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65976 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-03 22:36:47 +00:00
Dale Johannesen
4945c65784 When removing a store to an alloca that has only one
use, check also for the case where it has two uses,
the other being a llvm.dbg.declare.  This is needed so
debug info doesn't affect codegen.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65970 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-03 21:26:39 +00:00
Bill Wendling
3aaf5d9933 Use > instead of >=. We want to promote aggregates of 128-bytes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65960 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-03 19:18:49 +00:00
Bill Wendling
5a377cb27b Reapply r65755, but reversing "<" to ">=".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65945 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-03 12:12:58 +00:00
Dan Gohman
0f8b53f19d Fix a bunch of Doxygen syntax issues. Escape special characters,
and put @file directives on their own comment line.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65920 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-03 02:55:14 +00:00
Dale Johannesen
acb51a3037 Don't count DebugInfo instructions in another limit
(lest they affect codegen).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65915 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-03 01:43:03 +00:00
Dale Johannesen
bd8e650876 When sinking an insn in InstCombine bring its debug
info with it.
Don't count debug info insns against the scan maximum
in FindAvailableLoadedValue (lest they affect codegen).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65910 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-03 01:09:07 +00:00
Devang Patel
cf42ee42b1 If branch conditions' one successor is dominating another non-latch successor then this loop's iteration space can not be restricted. In this example block bb5 is always executed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65902 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-02 23:39:14 +00:00
Duncan Sands
5b7cfb02f7 Fix PR3694: add an instcombine micro-optimization that helps
clean up when using variable length arrays in llvm-gcc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65832 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-02 09:18:21 +00:00
Bill Wendling
8fe40819ae Temporarily revert r65755. It was causing failures in the self-hosting
testsuite:

Running /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/CodeGen/X86/dg.exp ...
FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/CodeGen/X86/nancvt.ll
Failed with exit(1) at line 2
while running: grep 2147027116 nancvt.ll.tmp | count 3
count: expected 3 lines and got        0.
child process exited abnormally
FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/CodeGen/X86/vec_ins_extract.ll
Failed with exit(1) at line 1
while running:  llvm-as < /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/CodeGen/X86/vec_ins_extract.ll |  opt -scalarrepl -instcombine |   llc -march=x86 -mcpu=yonah | not /usr/bin/grep sub.*esp
      subl      $28, %esp
      subl      $28, %esp
child process exited abnormally

And more.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65758 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-01 03:55:12 +00:00
Chris Lattner
af89a3f1d3 hoist the check for alloca size up so that it controls CanConvertToScalar
as well as isSafeAllocaToScalarRepl.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65755 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-01 02:26:47 +00:00