Devang Patel
e3206cb425
Use SmallPtrSet.
...
llvm-svn: 40560
2007-07-27 18:34:27 +00:00
Dan Gohman
6e853bc73f
Move the GET_SIDE_EFFECT_INFO logic from isInstructionTriviallyDead
...
to Instruction::mayWriteToMemory, fixing a FIXME, and helping
various places that call mayWriteToMemory directly.
llvm-svn: 40533
2007-07-26 16:06:08 +00:00
Devang Patel
33227115b9
Add BasicInliner interface.
...
This interface allows clients to inline bunch of functions with module
level call graph information.:wq
llvm-svn: 40486
2007-07-25 18:00:25 +00:00
Devang Patel
a273d1cd3a
Verify loop info.
...
llvm-svn: 40062
2007-07-19 18:02:32 +00:00
Devang Patel
186e0d8b0a
After a basic block is split into two parts,
...
second part dominates all the blocks dominated
by original basic block. And first part dominates
second part.
llvm-svn: 40035
2007-07-19 02:29:24 +00:00
Devang Patel
de5901523c
Now this temp. fix is not required.
...
llvm-svn: 40034
2007-07-19 02:22:21 +00:00
Reid Spencer
3363f4ad96
Return Undef if the block has no dominator. This was required to allow
...
llvm-gcc build to succeed. Without this change it fails in libstdc++
compilation. This causes no regressions in dejagnu tests. However,
someone who knows this code better might want to review it.
llvm-svn: 39924
2007-07-16 21:03:44 +00:00
Dan Gohman
06c60b6032
Fix comments about vectors to use the current wording.
...
llvm-svn: 39921
2007-07-16 14:29:03 +00:00
Devang Patel
4cd1413f15
Make LCSSA a loop pass.
...
llvm-svn: 39844
2007-07-13 23:57:11 +00:00
Tanya Lattner
ccecbcd779
Adding ability to demote phi to stack.
...
llvm-svn: 39744
2007-07-11 18:41:34 +00:00
Anton Korobeynikov
76547349c1
During module cloning copy aliases too. This fixes PR1544
...
llvm-svn: 38505
2007-07-10 19:07:35 +00:00
Devang Patel
d7767cc2a7
Add SplitEdge and SplitBlock utility routines.
...
llvm-svn: 37952
2007-07-06 21:39:20 +00:00
David Greene
1e2a12019f
Fix reference to iterator invalidated by an erase operation. Uncovered
...
by _GLIBCXX_DEBUG.
llvm-svn: 37796
2007-06-29 02:53:16 +00:00
Devang Patel
d5258a23a5
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
Devang Patel
78b9c68164
Add and use DominatorTreeBase::findNearestCommonDominator().
...
llvm-svn: 37545
2007-06-11 23:31:22 +00:00
Devang Patel
536ac4dca7
Simplify.
...
llvm-svn: 37542
2007-06-11 21:45:31 +00:00
Devang Patel
d18054afcf
simplify
...
llvm-svn: 37541
2007-06-11 21:25:31 +00:00
Devang Patel
ab2eee89a4
Simplify. Dominator Tree is required so always available.
...
llvm-svn: 37540
2007-06-11 21:18:00 +00:00
Devang Patel
becc466451
Update LoopSimplify to require and preserve DominatorTree only.
...
Now LoopSimplify does not require nor preserve ETForest.
llvm-svn: 37512
2007-06-08 01:50:32 +00:00
Devang Patel
8ecffa996a
Do not preserve ETForest.
...
llvm-svn: 37506
2007-06-08 00:02:08 +00:00
Devang Patel
cf470e5255
Do not use ETForest as well as DomiantorTree. DominatorTree is sufficient.
...
llvm-svn: 37501
2007-06-07 22:17:16 +00:00
Devang Patel
fc7fdef7d2
Use DominatorTree instead of ETForest.
...
This allows faster immediate domiantor walk.
llvm-svn: 37500
2007-06-07 21:57:03 +00:00
Devang Patel
af41e4a192
Maintain ETNode as part of DomTreeNode.
...
This adds redundancy for now.
llvm-svn: 37492
2007-06-07 17:47:21 +00:00
Devang Patel
ebc5b96735
s/DominatorTree::createNewNode/DominatorTree::addNewBlock/g
...
llvm-svn: 37415
2007-06-04 16:43:25 +00:00
Devang Patel
a89566aefd
Add basic block level interface to change immediate dominator
...
and create new node.
llvm-svn: 37414
2007-06-04 16:22:33 +00:00
Devang Patel
bdd1aaef10
s/llvm::DominatorTreeBase::DomTreeNode/llvm::DomTreeNode/g
...
llvm-svn: 37407
2007-06-04 00:32:22 +00:00
Devang Patel
0e8aa7b69a
s/DominatorTreeBase::Node/DominatorTreeBase:DomTreeNode/g
...
llvm-svn: 37403
2007-06-03 06:26:14 +00:00
Dan Gohman
30978078bf
Minor comment cleanups.
...
llvm-svn: 37321
2007-05-24 14:36:04 +00:00
Dan Gohman
b5650ebd6a
Fix typos.
...
llvm-svn: 36994
2007-05-11 21:10:54 +00:00
Nick Lewycky
e7da2d6ac3
Fix typo in comment.
...
llvm-svn: 36873
2007-05-06 13:37:16 +00:00
Devang Patel
8c78a0bff0
Drop 'const'
...
llvm-svn: 36662
2007-05-03 01:11:54 +00:00
Devang Patel
e95c6ad802
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
Devang Patel
09f162ca6a
Do not use typeinfo to identify pass in pass manager.
...
llvm-svn: 36632
2007-05-01 21:15:47 +00:00
Devang Patel
d3ccc073a2
Mem2Reg does not need TargetData.
...
llvm-svn: 36444
2007-04-25 18:32:35 +00:00
Devang Patel
073be55d8e
Remove unused function argument.
...
llvm-svn: 36441
2007-04-25 17:15:20 +00:00
Owen Anderson
2965adb849
Fix a comment.
...
llvm-svn: 36299
2007-04-21 07:12:44 +00:00
Jeff Cohen
5959f42498
Comment out usage of write() for now.
...
llvm-svn: 36287
2007-04-20 22:40:10 +00:00
Devang Patel
83a3adcc3f
Avoid recursion.
...
llvm-svn: 36272
2007-04-20 20:04:37 +00:00
Owen Anderson
2da606c757
Move more passes to using ETForest instead of DominatorTree.
...
llvm-svn: 36271
2007-04-20 06:27:13 +00:00
Evan Cheng
db9b65d67a
Revert Owen's last check-in. This is breaking Mac OS X / PPC llvm-gcc bootstrap.
...
llvm-svn: 36258
2007-04-18 22:39:00 +00:00
Owen Anderson
08293fd6d1
Use new ETForest accessor.
...
llvm-svn: 36248
2007-04-18 04:46:35 +00:00
Owen Anderson
f38f2f2394
Use ETForest instead of DominatorTree.
...
llvm-svn: 36247
2007-04-18 04:39:32 +00:00
Chris Lattner
233f97ac6a
remove use of BasicBlock::getNext
...
llvm-svn: 36205
2007-04-17 18:09:47 +00:00
Chris Lattner
77a3edcb92
remove use of Instruction::getNext
...
llvm-svn: 36199
2007-04-17 17:47:54 +00:00
Anton Korobeynikov
fb80151c42
Removed tabs everywhere except autogenerated & external files. Add make
...
target for tabs checking.
llvm-svn: 36146
2007-04-16 18:10:23 +00:00
Chris Lattner
343c88cdb9
Fix PR1335 and Transforms/Inline/2007-04-15-InlineEH.ll
...
llvm-svn: 36090
2007-04-15 21:38:06 +00:00
Owen Anderson
f35a1dbc7a
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
a6b5660209
avoid copying sets and vectors around.
...
llvm-svn: 36017
2007-04-14 22:10:17 +00:00
Lauro Ramos Venancio
749e4668e7
Implement the "thread_local" keyword.
...
llvm-svn: 35950
2007-04-12 18:32:50 +00:00
Owen Anderson
3c7867935e
Re-constify things that don't break the build. Last patch in this
...
series, I promise.
llvm-svn: 35848
2007-04-09 23:38:18 +00:00
Owen Anderson
f1ca1376d3
Unconst-ify stuff that broke the build.
...
llvm-svn: 35843
2007-04-09 23:08:26 +00:00
Owen Anderson
5917716146
Const-ify some parameters, and some cosmetic cleanups. No functionality
...
change.
llvm-svn: 35842
2007-04-09 22:54:50 +00:00
Owen Anderson
e0ef5ac6bd
Tabs -> Spaces
...
llvm-svn: 35841
2007-04-09 22:31:43 +00:00
Owen Anderson
83efbc84f7
Improve some _slow_ behavior introduced in my patches the last few days.
...
llvm-svn: 35839
2007-04-09 22:25:09 +00:00
Owen Anderson
ae39ca037a
Cleanup some from my DomSet-removal changes. Add a new
...
isReachableFromEntry
test to ETForest to factor a common test out of code.
llvm-svn: 35786
2007-04-09 00:52:49 +00:00
Nick Lewycky
e6c64466c7
Remove DominatorSet usage from LoopSimplify. Patch from Owen Anderson.
...
llvm-svn: 35757
2007-04-08 01:04:30 +00:00
Owen Anderson
f7ebea1b9f
Add DomSet back, and revert the changes to LoopSimplify. Apparently the
...
ETForest updating mechanisms don't work as I thought they did. These changes
will be reapplied once the issue is worked out.
llvm-svn: 35741
2007-04-07 18:23:27 +00:00
Owen Anderson
706e97049d
Completely purge DomSet from LoopSimplify. This is part of the
...
continuing work on PR1171.
llvm-svn: 35730
2007-04-07 06:56:47 +00:00
Owen Anderson
d03a646f06
BreakCriticalEdges does still preserve DominatorTree.
...
llvm-svn: 35729
2007-04-07 05:57:09 +00:00
Owen Anderson
b39d9ca902
Expunge DomSet from BreakCriticalEdges. This is part of the continuing
...
work for PR 1171.
llvm-svn: 35728
2007-04-07 05:49:29 +00:00
Owen Anderson
f095bf3ac4
Expunge DomSet from CodeExtractor. This is part of the continuing work
...
on PR1171.
llvm-svn: 35726
2007-04-07 05:31:27 +00:00
Owen Anderson
910419596e
Expunge a bunch of uses of DomSet from LoopSimplify. Many more remain.
...
This is the beginning of work for PR1171.
llvm-svn: 35720
2007-04-07 04:37:14 +00:00
Chris Lattner
b7b75145f1
reduce use of std::set
...
llvm-svn: 35576
2007-04-02 01:44:59 +00:00
Devang Patel
4398e242dd
Reduce malloc/free traffic.
...
llvm-svn: 35370
2007-03-26 23:19:29 +00:00
Dan Gohman
dcb291faa4
Change uses of Function::front to Function::getEntryBlock for readability.
...
llvm-svn: 35265
2007-03-22 16:38:57 +00:00
Devang Patel
1758cb50de
LoopSimplify::FindPHIToPartitionLoops()
...
Use ETForest instead of DominatorSet.
llvm-svn: 35221
2007-03-20 20:18:12 +00:00
Jeff Cohen
00227417d2
Unbreak VC++ build. Do not use identifiers starting with _ as they are reserved and
...
can collide with system defined names. Windows defines _BB, for example.
llvm-svn: 35066
2007-03-12 17:56:27 +00:00
Anton Korobeynikov
8a6dc102d3
Use range tests in LowerSwitch, where possible
...
llvm-svn: 35057
2007-03-10 16:46:28 +00:00
Devang Patel
5f50e61d52
Remove dead comments.
...
llvm-svn: 35053
2007-03-09 23:41:03 +00:00
Devang Patel
bda1250624
Avoid recursion. Use iterative algorithm for RenamePass().
...
llvm-svn: 35052
2007-03-09 23:39:14 +00:00
Reid Spencer
dec03a08d6
Make sure debug code is not evaluated in non-debug case.
...
llvm-svn: 34856
2007-03-02 23:15:21 +00:00
Reid Spencer
1e102971d2
1. Sort switch cases using APInt safe comparison.
...
2. Make sure debug output of APInt values is safe for all bit widths.
llvm-svn: 34855
2007-03-02 23:05:28 +00:00
Reid Spencer
43376a74af
Use APInt safe isOne() method on ConstantInt instead of getZExtValue()==1
...
llvm-svn: 34854
2007-03-02 23:03:17 +00:00
Reid Spencer
bb38d79ad6
Make sorting of ConstantInt be APInt clean through use of ult function.
...
llvm-svn: 34853
2007-03-02 23:01:14 +00:00
Chris Lattner
4bd8cda3f0
switch the inliner from being recursive to being iterative.
...
llvm-svn: 34832
2007-03-02 03:11:20 +00:00
Chris Lattner
1e48acb858
fix an obscure and tricky bug the inliner can hit sometimes.
...
llvm-svn: 34531
2007-02-23 19:54:30 +00:00
Jim Laskey
d879dfbf1c
Revert changes for a simplier solution.
...
llvm-svn: 34495
2007-02-22 16:21:18 +00:00
Jim Laskey
e4ccf22c34
Itanium ABI exception handing support.
...
llvm-svn: 34480
2007-02-21 22:49:50 +00:00
Dan Gohman
8c8597c4d9
Fix typos in comments.
...
llvm-svn: 34456
2007-02-20 20:52:03 +00:00
Chris Lattner
b5f6d0c15a
eliminate use of deprecated apis
...
llvm-svn: 34417
2007-02-19 07:34:47 +00:00
Reid Spencer
d84d35ba70
For PR1195:
...
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.
llvm-svn: 34293
2007-02-15 02:26:10 +00:00
Chris Lattner
a06a8fd2d7
Eliminate use of ctors that take vectors.
...
llvm-svn: 34219
2007-02-13 02:10:56 +00:00
Chris Lattner
a731513406
stop using methods that take vectors.
...
llvm-svn: 34205
2007-02-12 22:56:41 +00:00
Chris Lattner
8dd4cae4f8
simplify code by using Value::takeName
...
llvm-svn: 34177
2007-02-11 01:37:51 +00:00
Chris Lattner
430c9217f0
redesign the primary datastructure used by mem2reg to eliminate an
...
std::map of std::vector's (ouch!). This speeds up mem2reg by 10% on 176.gcc.
llvm-svn: 33974
2007-02-07 01:15:04 +00:00
Chris Lattner
c85e79f3e0
With the last change, we no longer need both directions of mapping from
...
BBNumbers. Instead of using a bi-directional mapping, just use a single
densemap. This speeds up mem2reg on 176.gcc by 8%, from 1.3489 to
1.2485s.
llvm-svn: 33940
2007-02-05 23:37:20 +00:00
Reid Spencer
557ab15e71
Apply the VISIBILITY_HIDDEN field to the remaining anonymous classes in
...
the Transforms library. This reduces debug library size by 132 KB, debug
binary size by 376 KB, and reduces link time for llvm tools slightly.
llvm-svn: 33939
2007-02-05 23:32:05 +00:00
Chris Lattner
52da61fb5c
Simplify use of DFBlocks, this makes no noticable performance difference,
...
but paves the way to eliminate BBNumbers.
llvm-svn: 33938
2007-02-05 23:31:26 +00:00
Chris Lattner
bf67b1229b
Switch InsertedPHINodes back to SmallPtrSet now that the SmallPtrSet::erase
...
bug is fixed.
llvm-svn: 33932
2007-02-05 23:11:37 +00:00
Chris Lattner
606dde0093
switch a SmallPtrSet back to an std::set for now, this caused problems.
...
llvm-svn: 33930
2007-02-05 22:28:52 +00:00
Chris Lattner
1ed84bbd2d
switch an std::set over to a SmallPtrSet, speeding up mem2reg 6% on 176.gcc.
...
llvm-svn: 33929
2007-02-05 22:15:21 +00:00
Chris Lattner
70fbb9de4c
switch an std::set over to SmallPtrSet, speeding up mem2reg 3.4% on 176.gcc.
...
llvm-svn: 33928
2007-02-05 22:13:11 +00:00
Chris Lattner
8fbc888d91
eliminate some malloc traffic, this speeds up mem2reg by 3.4%.
...
llvm-svn: 33927
2007-02-05 21:58:48 +00:00
Reid Spencer
3aaaa0b2bd
For PR411:
...
This patch replaces the SymbolTable class with ValueSymbolTable which does
not support types planes. This means that all symbol names in LLVM must now
be unique. The patch addresses the necessary changes to deal with this and
removes code no longer needed as a result. This completes the bulk of the
changes for this PR. Some cleanup patches will follow.
llvm-svn: 33918
2007-02-05 20:47:22 +00:00
Reid Spencer
a1d35926b7
For PR1177:
...
Revert last patch which caused iteration invalidation.
llvm-svn: 33901
2007-02-05 05:23:32 +00:00
Owen Anderson
f6fa108993
Use DenseMap for pointer->pointer maps.
...
llvm-svn: 33897
2007-02-05 02:39:47 +00:00
Reid Spencer
3f4e6e84dc
For PR1163:
...
Make the Module's dependent library use a std::vector instead of SetVector
adjust #includes in .cpp files because SetVector.h is no longer included.
llvm-svn: 33855
2007-02-04 00:40:42 +00:00
Chris Lattner
1bfc7ab6a7
Switch inliner over to use DenseMap instead of std::map for ValueMap. This
...
speeds up the inliner 16%.
llvm-svn: 33801
2007-02-03 00:08:31 +00:00
Chris Lattner
ce494229a1
Fix bugs in the inliner having to do with single-entry phi nodes and valuemap
...
updating. These were exposed by Devang's recent passmgr changes (with
non-default passorderings) because now the inliner can be interleved with
the LCSSA pass.
llvm-svn: 33760
2007-02-01 18:48:38 +00:00
Chris Lattner
7a63e7a7ad
eliminate temporary vectors
...
llvm-svn: 33713
2007-01-31 20:07:32 +00:00