Devang Patel
ab4cb51479
Break DominatorTree from ETNode.
...
Remove unused PostETForest.
llvm-svn: 37551
2007-06-12 00:54:38 +00:00
Devang Patel
d544f5262e
Use DominatorTree instead of ETForest.
...
llvm-svn: 37507
2007-06-08 00:17:13 +00:00
Devang Patel
67ede3d635
Use DominatorTree instead of ETForest.
...
llvm-svn: 37505
2007-06-07 23:53:38 +00:00
Devang Patel
babcd06827
Maintain ETNode as part of DomTreeNode.
...
This adds redundancy for now.
llvm-svn: 37492
2007-06-07 17:47:21 +00:00
Nick Lewycky
2897eb89d0
Optimize this test. Firstly, only Instructions may use other Instructions.
...
Secondly, checking whether removal succeeded tells you whether it was in
the map to begin with.
llvm-svn: 37469
2007-06-06 11:26:20 +00:00
Nick Lewycky
c667323382
Fix PR1487 and Transforms/IndVar/2007-06-06-DeleteDanglesPtr.ll
...
llvm-svn: 37459
2007-06-06 04:12:20 +00:00
Devang Patel
606fb412b0
Fix PR 1497
...
Use separate pass id for CFGOnlyPrinter.
llvm-svn: 37439
2007-06-05 20:24:36 +00:00
Devang Patel
2ef6caf14f
s/llvm::DominatorTreeBase::DomTreeNode/llvm::DomTreeNode/g
...
llvm-svn: 37407
2007-06-04 00:32:22 +00:00
Devang Patel
d58b82f83a
s/DominatorTreeBase::Node/DominatorTreeBase:DomTreeNode/g
...
llvm-svn: 37403
2007-06-03 06:26:14 +00:00
Chris Lattner
d339f51afd
when merging two alias sets together, be sure to propagate the volatility of
...
the inner set. This fixes PR1435 and Transforms/LICM/2007-05-22-VolatileSink.ll
llvm-svn: 37305
2007-05-23 06:36:35 +00:00
Dan Gohman
f704d8f166
Add passes -view-cfg and -view-cfg-only that are like -print-cfg and
...
-print-cfg-only except they use the ViewCFG function, which displays the
CFG rendered with graphviz with gv.
llvm-svn: 37033
2007-05-14 14:25:08 +00:00
Nick Lewycky
c2306ff5b4
Fix typo in comment.
...
llvm-svn: 36873
2007-05-06 13:37:16 +00:00
Devang Patel
cd45427a87
Drop 'const'
...
llvm-svn: 36662
2007-05-03 01:11:54 +00:00
Devang Patel
8ee9065162
Use 'static const char' instead of 'static const int'.
...
Due to darwin gcc bug, one version of darwin linker coalesces
static const int, which defauts PassID based pass identification.
llvm-svn: 36652
2007-05-02 21:39:20 +00:00
Lauro Ramos Venancio
57d03e112b
Fix build error.
...
llvm-svn: 36648
2007-05-02 20:37:47 +00:00
Devang Patel
38a66bc82e
Do not use typeinfo to identify pass in pass manager.
...
llvm-svn: 36632
2007-05-01 21:15:47 +00:00
Zhou Sheng
9339daf407
Make use of ConstantInt::isZero instead of ConstantInt::isNullValue.
...
llvm-svn: 36261
2007-04-19 05:39:12 +00:00
Devang Patel
ffbee86b8e
Cache DT[*SI] lookup.
...
llvm-svn: 36239
2007-04-18 01:19:55 +00:00
Devang Patel
daba9f7064
Fix
...
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070416/047971.html
llvm-svn: 36236
2007-04-18 00:53:01 +00:00
Chris Lattner
af290edea7
Be more careful when inserting reused instructions. This fixes CodeGen/Generic/2007-04-17-lsr-crash.ll
...
llvm-svn: 36231
2007-04-17 23:43:50 +00:00
Chris Lattner
e4323f863a
Remove use of Instruction::getNext
...
llvm-svn: 36201
2007-04-17 17:52:45 +00:00
Anton Korobeynikov
f3e62a428a
Removed tabs everywhere except autogenerated & external files. Add make
...
target for tabs checking.
llvm-svn: 36146
2007-04-16 18:10:23 +00:00
Reid Spencer
85f055a567
Revert last patch. It was already fixed.
...
llvm-svn: 36102
2007-04-16 02:24:41 +00:00
Reid Spencer
e411fd1f10
For PR1336:
...
Fix a div-by-zero bug noticed by APInt. This fixes:
test/Transforms/IndVarsSimplify/exit_value_tests.llx
llvm-svn: 36099
2007-04-16 01:48:37 +00:00
Owen Anderson
b371956400
Tabs -> Spaces
...
llvm-svn: 36094
2007-04-15 23:14:18 +00:00
Chris Lattner
c2762b5d83
Fix a nasty bug introduced when apint'ified. This fixes
...
Transforms/IndVarsSimplify/exit_value_tests.llx
llvm-svn: 36081
2007-04-15 19:52:49 +00:00
Owen Anderson
ea857029ea
Remove ImmediateDominator analysis. The same information can be obtained from DomTree. A lot of code for
...
constructing ImmediateDominator is now folded into DomTree construction.
This is part of the ongoing work for PR217.
llvm-svn: 36063
2007-04-15 08:47:27 +00:00
Chris Lattner
335f1cb1f8
CSE simple binary expressions when they are inserted. This makes LSR produce
...
less huge code that needs to be cleaned up by sdisel.
llvm-svn: 35959
2007-04-13 05:04:18 +00:00
Zhou Sheng
c2cfa6111d
Eliminate unnecessary APInt construction.
...
llvm-svn: 35740
2007-04-07 17:48:27 +00:00
Zhou Sheng
7bcd47dbc1
Make APInt variables do the computation stuffs instead of
...
ConstantExpr::getXX if possible.
llvm-svn: 35738
2007-04-07 17:40:57 +00:00
Zhou Sheng
21dfc2107a
Eliminate unnecessary zext/trunc stuffs.
...
llvm-svn: 35737
2007-04-07 17:12:38 +00:00
Owen Anderson
85b0e20f2a
Completely purge DomSet. This is the (hopefully) final patch for PR1171.
...
llvm-svn: 35731
2007-04-07 07:17:27 +00:00
Owen Anderson
5403a248af
Expunge DomSet from LoadValueNumbering. This is part of the continuing
...
work on PR1171.
llvm-svn: 35723
2007-04-07 04:43:07 +00:00
Chris Lattner
6668db1331
Treat xor of signbit like an add.
...
llvm-svn: 35586
2007-04-02 05:41:38 +00:00
Reid Spencer
34b5a64f15
The bit counting intrinsics return i32 not the operand type. This fixes
...
last night's regression in SingleSource/UnitTests/2005-05-11-Popcount-ffs-fls
llvm-svn: 35556
2007-04-01 18:42:20 +00:00
Reid Spencer
88fb617695
For PR1297:
...
Support overloaded intrinsics bswap, ctpop, cttz, ctlz.
llvm-svn: 35547
2007-04-01 07:35:23 +00:00
Dan Gohman
d0a0ea9916
Change uses of Function::front to Function::getEntryBlock for readability.
...
llvm-svn: 35265
2007-03-22 16:38:57 +00:00
Devang Patel
6a56e3c1a0
Now IndVarSimplify is a LoopPass.
...
llvm-svn: 35003
2007-03-07 06:39:01 +00:00
Devang Patel
c35610b9f9
Now LoopUnswitch is a LoopPass.
...
llvm-svn: 34992
2007-03-07 00:26:10 +00:00
Devang Patel
bee9c51214
Insert loop into LQ before visiting children.
...
llvm-svn: 34982
2007-03-06 19:50:49 +00:00
Devang Patel
57322d0462
Use schedulePass() instead of assignPassManager() to add new LPPassManager.
...
This ensures that require analysis info is available.
llvm-svn: 34980
2007-03-06 19:11:25 +00:00
Devang Patel
b44e86318e
Add LPPassManager::insertLoop().
...
llvm-svn: 34979
2007-03-06 19:00:02 +00:00
Devang Patel
8490ffbcdc
LPPassManager::deleteLoopFromQueue() add meat. Cut-n-paste code from
...
LoopUnswitch pass.
llvm-svn: 34977
2007-03-06 18:38:33 +00:00
Devang Patel
d3cf506865
LPPassManager. Implement preparePassManager() hook.
...
llvm-svn: 34975
2007-03-06 17:59:37 +00:00
Devang Patel
e3abf559e5
LPPassManager : Add initialization and finalizatino hooks.
...
llvm-svn: 34968
2007-03-06 16:59:03 +00:00
Devang Patel
e4da6fa801
Use std::deque to manage loop queue inside LPPassManager.
...
llvm-svn: 34943
2007-03-06 02:30:46 +00:00
Devang Patel
6668a341ae
Avoid constructing std::strings unless pass debugging is ON.
...
llvm-svn: 34933
2007-03-05 20:01:30 +00:00
Jeff Cohen
98c99a3a02
Unbreak VC++ build.
...
llvm-svn: 34917
2007-03-05 00:00:42 +00:00
Chris Lattner
dec6a90a00
Speed up Loop::isLCSSAForm by using a hash table instead of a sorted vector.
...
llvm-svn: 34900
2007-03-04 04:06:39 +00:00
Reid Spencer
17000a40e2
Guard further against APInt operations with operands of unequal bit width.
...
llvm-svn: 34897
2007-03-04 01:25:35 +00:00
Reid Spencer
89154fbfff
Fix an unequal bitwidth issue.
...
llvm-svn: 34831
2007-03-02 02:59:25 +00:00
Reid Spencer
1f970769e8
Prefer non-virtual calls to ConstantInt::isZero over virtual calls to
...
Constant::isNullValue() in situations where it is possible.
llvm-svn: 34821
2007-03-02 00:28:52 +00:00
Reid Spencer
ee77d22f26
Make it possible to create an SCEVUnknown from an APInt as well as an int.
...
llvm-svn: 34816
2007-03-01 22:28:51 +00:00
Reid Spencer
30758bbe85
Avoid a potential assert out if the loop increment is > 64 bits.
...
llvm-svn: 34798
2007-03-01 19:45:00 +00:00
Reid Spencer
288f1db60d
Construct ConstantInt with simpler constructor.
...
llvm-svn: 34795
2007-03-01 19:32:33 +00:00
Reid Spencer
18d663b62c
Fix last night's 445.gobmk breakage which was caused by comparison of
...
APInt's of unequal bitwidth.
llvm-svn: 34790
2007-03-01 17:17:21 +00:00
Reid Spencer
3f3487918c
Remove the "isSigned" parameters from ConstantRange. It turns out they
...
are not needed as the results are the same with or without it.
Patch by Nicholas Lewycky.
llvm-svn: 34782
2007-03-01 07:54:15 +00:00
Reid Spencer
036051c002
APIntify various computations in ScalarEvolution
...
llvm-svn: 34780
2007-03-01 07:25:48 +00:00
Reid Spencer
67eedb21b7
For PR1205:
...
Make GetConstantFactor compute its result using an APInt.
llvm-svn: 34765
2007-02-28 23:31:17 +00:00
Reid Spencer
19e5279a38
For PR1205:
...
Adjust to changes in ConstantRange interface.
llvm-svn: 34762
2007-02-28 22:03:51 +00:00
Reid Spencer
f119927a6f
Move ConstantRange class to lib/Support from lib/Analysis and make its
...
interface not depend on Type or ICmpInst.
llvm-svn: 34761
2007-02-28 22:02:48 +00:00
Reid Spencer
965067a054
For PR1205:
...
Remove ConstantInt from ConstantRange interface and adjust its users to
compensate.
llvm-svn: 34758
2007-02-28 19:57:34 +00:00
Reid Spencer
e2b4631435
For PR1205:
...
First round of ConstantRange changes. This makes all CR constructors use
only APInt and not use ConstantInt. Clients are adjusted accordingly.
llvm-svn: 34756
2007-02-28 18:57:32 +00:00
Reid Spencer
2b933467ad
For PR1205:
...
Convert ConstantRange class to use APInt internally as its value type for
the constant range, instead of ConstantInt.
llvm-svn: 34745
2007-02-28 17:36:23 +00:00
Devang Patel
89791371ce
Make getPassManagerType() const.
...
llvm-svn: 34669
2007-02-27 15:00:39 +00:00
Devang Patel
e0c0b3bea6
Fix thinko.
...
llvm-svn: 34528
2007-02-23 18:05:55 +00:00
Devang Patel
06b8983669
Loop passes are set up to accept pointer.
...
llvm-svn: 34527
2007-02-23 17:53:17 +00:00
Devang Patel
46cad14ab8
Teach LoopPass to assign itself one Loop Pass Manager.
...
llvm-svn: 34510
2007-02-23 00:36:57 +00:00
Devang Patel
9a7b18fa3d
Add facility that allows LoopPass to re-insert a loop into
...
Loop Pass Manager's queue.
llvm-svn: 34509
2007-02-23 00:16:44 +00:00
Devang Patel
bbfd00e658
Add LPPassManager interface that LoopPass can use to skip
...
rest of the passes in the queue for a loop.
llvm-svn: 34508
2007-02-23 00:10:16 +00:00
Devang Patel
d7448faaed
Populate and walk loop queue.
...
llvm-svn: 34505
2007-02-22 23:45:15 +00:00
Devang Patel
b170ebf833
Add LoopQueue. This is used by loop pass manager to manage loop nest.
...
llvm-svn: 34504
2007-02-22 23:30:07 +00:00
Devang Patel
aabb87cffe
Add Loop Pass Manager.
...
llvm-svn: 34487
2007-02-22 08:56:17 +00:00
Reid Spencer
55e4e98a2a
For PR1195:
...
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.
llvm-svn: 34293
2007-02-15 02:26:10 +00:00
Nick Lewycky
b994bafc0f
Fix comments to match names of functions.
...
llvm-svn: 34173
2007-02-11 00:58:49 +00:00
Chris Lattner
058257bdd2
Switch some std::vector's to SmallVectors. This speeds up -load-vn -gcse
...
by 6% on tramp3d.
llvm-svn: 34167
2007-02-10 22:15:31 +00:00
Chris Lattner
8dbca590f4
modify CheckGEPInstructions to take a pointer and size instead of a vector.
...
llvm-svn: 34166
2007-02-10 22:12:53 +00:00
Chris Lattner
d47f00d794
eliminate use of TargetData::getIndexedOffset that takes a vector
...
llvm-svn: 34163
2007-02-10 20:35:22 +00:00
Chris Lattner
fd0d12756d
completely eliminate a temporary vector
...
llvm-svn: 34162
2007-02-10 20:33:15 +00:00
Chris Lattner
9dafd9fe90
Privatize StructLayout::MemberOffsets, adding an accessor
...
llvm-svn: 34156
2007-02-10 19:55:17 +00:00
Reid Spencer
598f6d293b
Make classes in anonymous namespaces use VISIBILITY_HIDDEN to help reduce
...
LLVM's footprint and speed up linking.
llvm-svn: 33941
2007-02-05 23:42:17 +00:00
Reid Spencer
591bfa1e0b
Changes to support making the shift instructions be true BinaryOperators.
...
This feature is needed in order to support shifts of more than 255 bits
on large integer types. This changes the syntax for llvm assembly to
make shl, ashr and lshr instructions look like a binary operator:
shl i32 %X, 1
instead of
shl i32 %X, i8 1
Additionally, this should help a few passes perform additional optimizations.
llvm-svn: 33776
2007-02-02 02:16:23 +00:00
Devang Patel
e5e4a44cca
Dump function names when debug-pass=Executions is used.
...
llvm-svn: 33772
2007-02-01 22:38:33 +00:00
Devang Patel
015a474023
Pretty print pass manager
...
llvm-svn: 33766
2007-02-01 22:09:37 +00:00
Chris Lattner
46ce2a4cca
Fix a minor bug in my patch yesterday that broken ConstProp/bswap.ll
...
llvm-svn: 33704
2007-01-31 18:04:55 +00:00
Chris Lattner
9888e0a048
elimiante a temporary vector
...
llvm-svn: 33694
2007-01-31 04:42:05 +00:00
Chris Lattner
be153e31f3
Move some symbolic constant folding code out of instcombine into a place
...
it can be used by multiple clients. This specifically allows the inliner
to constant fold symbolically.
llvm-svn: 33687
2007-01-31 00:51:48 +00:00
Chris Lattner
937bf05f43
The local "ConstantFold" method is now just a watered down version of
...
ConstantFoldInstOperands. Switch to ConstantFoldInstOperands and remove
ConstantFold.
llvm-svn: 33683
2007-01-30 23:52:44 +00:00
Chris Lattner
1765c2eed8
move a bunch of constant folding code f rom Transforms/Utils/Local.cpp into
...
libanalysis/ConstantFolding.cpp.
llvm-svn: 33679
2007-01-30 23:45:45 +00:00
Chris Lattner
116b82d058
adjust to constant folding api changes.
...
llvm-svn: 33673
2007-01-30 23:15:43 +00:00
Reid Spencer
19af04a142
For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoid
...
confusion with external linkage types.
llvm-svn: 33663
2007-01-30 20:08:39 +00:00
Devang Patel
3eb643f21e
Use StartPassTimer() and StopPassManager()
...
llvm-svn: 33640
2007-01-29 23:29:54 +00:00
Devang Patel
dd0a7887fa
Measure timings.
...
llvm-svn: 33627
2007-01-29 20:08:03 +00:00
Devang Patel
f1ef346a53
Remove dead code.
...
CallGraphSCCPass does not need to implement runOnModule().
It supports runOnSCC().
llvm-svn: 33516
2007-01-26 01:08:18 +00:00
Devang Patel
f8db9e212e
Fix typo.
...
llvm-svn: 33467
2007-01-23 21:55:17 +00:00
Devang Patel
cfd7cfeccd
Add CallGraphSCCPass::assignPassManager().
...
This enables CalLGraphPassManager.
llvm-svn: 33466
2007-01-23 21:52:35 +00:00
Reid Spencer
e33c18f4d2
For PR970:
...
Clean up handling of isFloatingPoint() and dealing with PackedType.
Patch by Gordon Henriksen!
llvm-svn: 33415
2007-01-21 00:29:26 +00:00
Reid Spencer
14b42c0040
For PR1043:
...
This is the final patch for this PR. It implements some minor cleanup
in the use of IntegerType, to wit:
1. Type::getIntegerTypeMask -> IntegerType::getBitMask
2. Type::Int*Ty changed to IntegerType* from Type*
3. ConstantInt::getType() returns IntegerType* now, not Type*
This also fixes PR1120.
Patch by Sheng Zhou.
llvm-svn: 33370
2007-01-19 21:13:56 +00:00
Devang Patel
756af73d3a
Add CGPassManager.
...
llvm-svn: 33309
2007-01-17 21:45:01 +00:00
Jeff Cohen
c4ab4ae3e1
Unbreak VC++ build.
...
llvm-svn: 33242
2007-01-15 20:27:18 +00:00