Commit Graph

33055 Commits

Author SHA1 Message Date
Owen Anderson
d3fb671480 Have internal df_iterator's use SmallPtrSet instead of std::set. This provides compile time speedups to any pass using df_iterator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37694 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-21 21:25:36 +00:00
Evan Cheng
52974eb49a Fix tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37693 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-21 18:22:42 +00:00
Chris Lattner
1dbfd48fa2 Significantly improve the documentation of the instcombine divide/compare
transformation.  Also, keep track of which end of the integer interval overflows
occur on.  This fixes Transforms/InstCombine/2007-06-21-DivCompareMiscomp.ll
and rdar://5278853, a miscompilation of perl.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37692 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-21 18:11:19 +00:00
Chris Lattner
e47f30f5e6 new testcase miscompiled by instcombine, reduced from perl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37691 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-21 18:09:25 +00:00
Owen Anderson
66fd906074 Change lots of sets from std::set to SmallPtrSet. This reduces the time required to optimize 253.perlbmk from 10.9s to 5.3s.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37690 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-21 17:57:53 +00:00
Devang Patel
0e7f728ad1 Move code to update dominator information after basic block is split
from LoopSimplify.cpp to Dominator.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37689 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-21 17:23:45 +00:00
Dan Gohman
2d74a318de Tidy up ValueType names in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37688 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-21 14:48:26 +00:00
Dan Gohman
b9f1019696 Rename TargetLowering::getNumElements and friends to
TargetLowering::getNumRegisters and similar, to avoid confusion with
the actual number of elements for vector types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37687 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-21 14:42:22 +00:00
Evan Cheng
53855ca95c New tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37686 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-21 07:40:00 +00:00
Evan Cheng
b13cdbd865 Xforms:
(add (select cc, 0, c), x) -> (select cc, x, (add, x, c))
(sub x, (select cc, 0, c)) -> (select cc, x, (sub, x, c))


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37685 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-21 07:39:16 +00:00
Owen Anderson
58e087b6e3 Eliminate a redundant check. This speeds up optimization of 253.perlbmk from 13.5 seconds to 10.9 seconds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37683 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-21 01:59:05 +00:00
Owen Anderson
9cb56014ce Comment-ize the functions in GVNPRE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37681 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-21 00:19:05 +00:00
Chris Lattner
562ef78df2 refactor a bunch of code out of visitICmpInstWithInstAndIntCst into its own
routine.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37679 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-20 23:46:26 +00:00
Owen Anderson
3eaca716bf Split runOnFunction into many smaller functions. This make it easier to get accurate performance analysis of GVNPRE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37678 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-20 22:10:02 +00:00
Tanya Lattner
c5dfcdb3a5 Modify deleting global variable with an even easier way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37676 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-20 20:46:37 +00:00
Devang Patel
2397f8d0c6 Update AnalysisGroup documentation to document restriction that allows
only one ImmutablePass in a group.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37675 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-20 18:51:14 +00:00
Tanya Lattner
b011c66da4 Add blurb on deleting global variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37674 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-20 18:33:15 +00:00
Owen Anderson
0304b2bc2b Make GVNPRE accurate report whether it modified the function or not.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37673 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-20 18:30:20 +00:00
Evan Cheng
60c916bc72 Added some if-conversion tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37672 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-20 18:26:15 +00:00
Owen Anderson
5dbea73e35 Get rid of an unneeded helper function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37670 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-20 00:43:33 +00:00
Evan Cheng
97e604e7d8 Be more conservative of duplicating blocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37669 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 23:55:02 +00:00
Owen Anderson
4f703ec0a1 Use a DenseMap instead of an std::map for the value numbering. This reduces the time to optimize lencod on a PPC Debug build from ~300s to ~140s.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37668 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 23:23:54 +00:00
Owen Anderson
52471b102c Make dependsOnInvoke much more specific in what it tests, which in turn make it much faster to run. This reduces the time to optimize lencondwith a debug build on PPC from ~450s to ~300s.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37667 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 23:07:16 +00:00
Tanya Lattner
c91c56cf43 Moved Inliner.h to include/llvm/Transforms/IPO/InlinerPass.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37666 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 22:31:52 +00:00
Tanya Lattner
6f7426ec2e Inliner pass header file was moved.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37665 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 22:29:50 +00:00
Tanya Lattner
9933e4bd7d Move inliner pass header file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37664 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 22:29:02 +00:00
Evan Cheng
9ffd340daf Avoid if-converting simple block that ends with unconditional branch or fallthrough unless it branches / falls to the 'false' block. Not profitable, may end up increasing code size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37660 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 21:45:13 +00:00
Evan Cheng
277f0741c5 Allow predicated immediate ARM to ARM calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37659 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 21:05:09 +00:00
Chris Lattner
3f931b8c0e Fix pr1448
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37658 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 16:46:48 +00:00
Dan Gohman
5cec4db6ae Rename ScalarEvolution::deleteInstructionFromRecords to
deleteValueFromRecords and loosen the types to all it to accept
Value* instead of just Instruction*, since this is what
ScalarEvolution uses internally anyway. This allows more flexibility
for future uses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37657 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 14:28:31 +00:00
Dan Gohman
b5bec2b6f6 Pass a SelectionDAG into SDNode::dump everywhere it's used, in prepration
for needing the DAG node to print pre-legalize extended value types, and
to get better debug messages with target-specific nodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37656 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 14:13:56 +00:00
Owen Anderson
d0954105f0 Handle constants in phi nodes properly. This fixes test/Transforms/GVNPRE/2007-06-18-ConstantInPhi.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37655 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 07:35:36 +00:00
Chris Lattner
20c2b35c2f silence warning when assertions are disabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37654 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 06:40:46 +00:00
Owen Anderson
831dab360f Testcase for instances where a constant only occurs as an operand to a phi node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37653 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 05:55:01 +00:00
Chris Lattner
defb9fb4e9 don't use binutils 2.17
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37652 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 05:52:36 +00:00
Chris Lattner
85ef254630 document and hide two options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37651 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 05:47:49 +00:00
Chris Lattner
3ee774091b describe an argument, hide it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37650 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 05:46:06 +00:00
Chris Lattner
2384d7b179 silence a bogus warning Duraid ran into.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37649 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 05:43:49 +00:00
Owen Anderson
5b689c3a28 Add a new testcase for memory corruption issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37648 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 05:41:22 +00:00
Owen Anderson
20cb51fda4 Be careful to erase values from all of the appropriate sets when they're not needed anymore. This fixes a few more memory-related issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37647 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 05:37:32 +00:00
Owen Anderson
6cae7409b1 Remember to clear the maximal sets between functions.
Thanks to Nicholas for valgrinding this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37646 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 04:32:55 +00:00
Owen Anderson
086f5f350b Refactor GVNPRE to use a much smart method of uniquing value sets, and centralize a lot of the value numbering information. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37645 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 03:31:41 +00:00
Dan Gohman
82a87a0172 Replace M_REMATERIALIZIBLE and the newly-added isOtherReMaterializableLoad
with a general target hook to identify rematerializable instructions. Some
instructions are only rematerializable with specific operands, such as loads
from constant pools, while others are always rematerializable. This hook
allows both to be identified as being rematerializable with the same
mechanism.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37644 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 01:48:05 +00:00
Evan Cheng
eaa91b0a1f Replace TargetInstrInfo::CanBeDuplicated() with a M_NOT_DUPLICABLE bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37643 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 01:26:51 +00:00
Evan Cheng
4e6b1e1d99 Replace CanBeDuplicated() with a M_NOT_DUPLICABLE bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37642 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 01:21:41 +00:00
Chris Lattner
52387be1e0 If a function is vararg, never pass inreg arguments in registers. Thanks to
Anton for half of this patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37641 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 00:13:10 +00:00
Chris Lattner
aeeccfc5b2 add isVarArg to CCState
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37640 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 00:11:09 +00:00
Chris Lattner
f9521355c4 add isvararg tracking to CCState
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37639 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 00:10:25 +00:00
Chris Lattner
839c522e0c testcase for PR1513
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37638 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 00:08:42 +00:00
Evan Cheng
ad0a4c0be9 New test case: identity operation of RHS / LHS of a VECTOR_SHUFFLE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37637 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-19 00:06:08 +00:00