Owen Anderson
1fe94b16dc
Remove some code that I was using for collecting performance information that should not have been committed.
...
llvm-svn: 37706
2007-06-22 17:04:40 +00:00
Owen Anderson
89558a0db6
Fix the build.
...
llvm-svn: 37705
2007-06-22 16:59:54 +00:00
Dan Gohman
a62327ea40
Move ComputeMaskedBits, MaskedValueIsZero, and ComputeNumSignBits from
...
TargetLowering to SelectionDAG so that they have more convenient
access to the current DAG, in preparation for the ValueType routines
being changed from standalone functions to members of SelectionDAG for
the pre-legalize vector type changes.
llvm-svn: 37704
2007-06-22 14:59:07 +00:00
Duraid Madina
fe6e41b4f9
check in the BigBlock local register allocator
...
llvm-svn: 37703
2007-06-22 08:27:12 +00:00
Owen Anderson
92c7510376
Avoid excessive calls to find_leader when calculating AVAIL_OUT. This reduces the time to optimize 403.gcc from 23.5s to 21.9s.
...
llvm-svn: 37702
2007-06-22 03:14:03 +00:00
Evan Cheng
85169b9b40
std::set is really really terrible. Switch to SmallPtrSet to reduce compile time. For Duraid's example. The overall isel time is reduced from 0.6255 sec to 0.1876 sec.
...
llvm-svn: 37701
2007-06-22 01:35:51 +00:00
Dale Johannesen
e1c767df50
Quote complex names for Darwin X86 and ARM.
...
llvm-svn: 37700
2007-06-22 00:54:56 +00:00
Owen Anderson
0abfa1ecb2
Reserve space in vectors before topologically sorting into them. This improves the time to optimize 403.gcc from 28s to 23.5s.
...
llvm-svn: 37699
2007-06-22 00:43:22 +00:00
Owen Anderson
e121e85517
Make a bunch of optimizations for compile time to GVNPRE, including smarter set unions, deferring blocks rather than computing maximal sets, and smarter use of sets. With these enhancements, the time to optimize 273.perlbmk goes from 5.3s to 2.7s.
...
llvm-svn: 37698
2007-06-22 00:20:30 +00:00
Owen Anderson
41515dcd4b
Fix a bug in SmallPtrSet that was causing GVNPRE to enter an infinite loop.
...
llvm-svn: 37697
2007-06-22 00:11:18 +00:00
Chris Lattner
3ac68a90f2
Two changes:
...
1. Make SmallPtrSet::erase faster in the small case by replacing a memmove
with a pointer copy.
2. Fix a bug where the null terminator at the end of the array in the small
case was not copied
llvm-svn: 37696
2007-06-21 23:23:32 +00:00
Devang Patel
0b2cb3ec61
CallGraphSCCPass manager may require other passes.
...
Use schedulePass() to accomodate these requirement instead of directly
assigning a manager to new CallGraph PassManager.
llvm-svn: 37695
2007-06-21 22:29:02 +00:00
Chris Lattner
4624e16f16
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.
llvm-svn: 37692
2007-06-21 18:11:19 +00:00
Owen Anderson
eb29dac190
Change lots of sets from std::set to SmallPtrSet. This reduces the time required to optimize 253.perlbmk from 10.9s to 5.3s.
...
llvm-svn: 37690
2007-06-21 17:57:53 +00:00
Devang Patel
bfb1c7192e
Move code to update dominator information after basic block is split
...
from LoopSimplify.cpp to Dominator.cpp
llvm-svn: 37689
2007-06-21 17:23:45 +00:00
Dan Gohman
72af1305fb
Tidy up ValueType names in comments.
...
llvm-svn: 37688
2007-06-21 14:48:26 +00:00
Dan Gohman
1815e9bdb3
Rename TargetLowering::getNumElements and friends to
...
TargetLowering::getNumRegisters and similar, to avoid confusion with
the actual number of elements for vector types.
llvm-svn: 37687
2007-06-21 14:42:22 +00:00
Evan Cheng
f26fc091ac
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))
llvm-svn: 37685
2007-06-21 07:39:16 +00:00
Owen Anderson
a783224b25
Eliminate a redundant check. This speeds up optimization of 253.perlbmk from 13.5 seconds to 10.9 seconds.
...
llvm-svn: 37683
2007-06-21 01:59:05 +00:00
Owen Anderson
b06cc18b7c
Comment-ize the functions in GVNPRE.
...
llvm-svn: 37681
2007-06-21 00:19:05 +00:00
Chris Lattner
26537049eb
refactor a bunch of code out of visitICmpInstWithInstAndIntCst into its own
...
routine.
llvm-svn: 37679
2007-06-20 23:46:26 +00:00
Owen Anderson
ff60973eb8
Split runOnFunction into many smaller functions. This make it easier to get accurate performance analysis of GVNPRE.
...
llvm-svn: 37678
2007-06-20 22:10:02 +00:00
Owen Anderson
58265d2391
Make GVNPRE accurate report whether it modified the function or not.
...
llvm-svn: 37673
2007-06-20 18:30:20 +00:00
Owen Anderson
815c4d384b
Get rid of an unneeded helper function.
...
llvm-svn: 37670
2007-06-20 00:43:33 +00:00
Evan Cheng
5da7b6f0fc
Be more conservative of duplicating blocks.
...
llvm-svn: 37669
2007-06-19 23:55:02 +00:00
Owen Anderson
997c4e5e47
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.
...
llvm-svn: 37668
2007-06-19 23:23:54 +00:00
Owen Anderson
5a902e6afc
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.
...
llvm-svn: 37667
2007-06-19 23:07:16 +00:00
Tanya Lattner
b2aae813b6
Moved Inliner.h to include/llvm/Transforms/IPO/InlinerPass.h
...
llvm-svn: 37666
2007-06-19 22:31:52 +00:00
Tanya Lattner
a2e912bf51
Inliner pass header file was moved.
...
llvm-svn: 37665
2007-06-19 22:29:50 +00:00
Evan Cheng
5e2aabd3ad
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.
...
llvm-svn: 37660
2007-06-19 21:45:13 +00:00
Evan Cheng
c49382e48f
Allow predicated immediate ARM to ARM calls.
...
llvm-svn: 37659
2007-06-19 21:05:09 +00:00
Dan Gohman
bb705e230a
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.
llvm-svn: 37657
2007-06-19 14:28:31 +00:00
Dan Gohman
485cb57eab
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.
llvm-svn: 37656
2007-06-19 14:13:56 +00:00
Owen Anderson
0eafdcafe7
Handle constants in phi nodes properly. This fixes test/Transforms/GVNPRE/2007-06-18-ConstantInPhi.ll
...
llvm-svn: 37655
2007-06-19 07:35:36 +00:00
Chris Lattner
653c0ccfbe
document and hide two options.
...
llvm-svn: 37651
2007-06-19 05:47:49 +00:00
Chris Lattner
81e8a18e7c
describe an argument, hide it.
...
llvm-svn: 37650
2007-06-19 05:46:06 +00:00
Chris Lattner
6809b4b4fa
silence a bogus warning Duraid ran into.
...
llvm-svn: 37649
2007-06-19 05:43:49 +00:00
Owen Anderson
f74f94d859
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.
...
llvm-svn: 37647
2007-06-19 05:37:32 +00:00
Owen Anderson
d3d1716516
Remember to clear the maximal sets between functions.
...
Thanks to Nicholas for valgrinding this.
llvm-svn: 37646
2007-06-19 04:32:55 +00:00
Owen Anderson
dc858f6498
Refactor GVNPRE to use a much smart method of uniquing value sets, and centralize a lot of the value numbering information. No functionality change.
...
llvm-svn: 37645
2007-06-19 03:31:41 +00:00
Dan Gohman
b60d8a92c9
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.
llvm-svn: 37644
2007-06-19 01:48:05 +00:00
Evan Cheng
12b3002673
Replace TargetInstrInfo::CanBeDuplicated() with a M_NOT_DUPLICABLE bit.
...
llvm-svn: 37643
2007-06-19 01:26:51 +00:00
Chris Lattner
e13fac05d7
If a function is vararg, never pass inreg arguments in registers. Thanks to
...
Anton for half of this patch.
llvm-svn: 37641
2007-06-19 00:13:10 +00:00
Chris Lattner
68f9f9fa3b
add isVarArg to CCState
...
llvm-svn: 37640
2007-06-19 00:11:09 +00:00
Evan Cheng
80f0d5ae45
Look for VECTOR_SHUFFLE that's identity operation on either LHS or RHS. This can happen before DAGCombiner catches it.
...
llvm-svn: 37636
2007-06-19 00:02:56 +00:00
Evan Cheng
b752a87db1
Fix some fragile code wrt CFG edge updating.
...
llvm-svn: 37634
2007-06-18 22:44:57 +00:00
Evan Cheng
978058bcd7
Move CorrectExtraCFGEdges() from BranchFolding.cpp to a MachineBasicBlock method.
...
llvm-svn: 37633
2007-06-18 22:43:58 +00:00
Devang Patel
f57b9f4d5d
Fix quotes in debug messages.
...
llvm-svn: 37630
2007-06-18 21:32:29 +00:00
Chris Lattner
5b93ff84b9
make ComputeTopDownOrdering significantly faster and use less stack space
...
by making it non-recursive
llvm-svn: 37629
2007-06-18 21:28:10 +00:00
Dan Gohman
5db3ad4b32
In SCEVAddExpr::get, skip over any cast operands before looking for nested
...
add operands after constant operands. The recent change to recognize
sign-extend expressions caused this to be exposed more often.
llvm-svn: 37628
2007-06-18 19:30:09 +00:00