Chris Lattner
b374a0158a
remove doConstantPropagation and dceInstruction, they are just
...
wrappers around the interesting code and use an obscure iterator
abstraction that dates back many many years.
Move EraseDeadInstructions to Transforms/Utils and name it
RecursivelyDeleteTriviallyDeadInstructions.
llvm-svn: 60191
2008-11-27 22:57:53 +00:00
Chris Lattner
577096bcaa
move FindAvailableLoadedValue from JumpThreading to Transforms/Utils.
...
llvm-svn: 60166
2008-11-27 08:10:05 +00:00
Chris Lattner
bb86dff3fe
move MergeBasicBlockIntoOnlyPred to Transforms/Utils.
...
llvm-svn: 60162
2008-11-27 07:43:12 +00:00
Devang Patel
e5a07d989e
Do not use separate utility to walk all instructions and remove dead dbg intrinsics. Let instcombiner do this job.
...
llvm-svn: 59659
2008-11-19 19:01:37 +00:00
Devang Patel
ec4ae29ae4
Add utility routines to remove dead debug info.
...
llvm-svn: 59011
2008-11-11 00:53:02 +00:00
Daniel Dunbar
097da598fb
Add InlineCost class for represent the estimated cost of inlining a
...
function.
- This explicitly models the costs for functions which should
"always" or "never" be inlined. This fixes bugs where such costs
were not previously respected.
llvm-svn: 58450
2008-10-30 19:26:59 +00:00
Daniel Dunbar
e2fe2de3f4
Assorted comment/naming fixes, 80-col violations, and reindentation.
...
- No functionality change.
llvm-svn: 58352
2008-10-28 23:24:26 +00:00
Dan Gohman
e1f9be27bc
Tidy up several unbeseeming casts from pointer to intptr_t.
...
llvm-svn: 55779
2008-09-04 17:05:41 +00:00
Owen Anderson
cb787a2004
Make MergeBlockIntoPredecessor more aggressive when the same successor appears
...
more than once.
llvm-svn: 53731
2008-07-17 19:42:29 +00:00
Owen Anderson
7fb36c8bba
Factor MergeBlockIntoPredecessor out into BasicBlockUtils.
...
llvm-svn: 53705
2008-07-17 00:01:40 +00:00
Dan Gohman
9f52e3890f
Correct a top-level comment.
...
llvm-svn: 53685
2008-07-16 16:03:31 +00:00
Chris Lattner
8a9725bffe
Reapply r53540, now with the matching header!
...
llvm-svn: 53557
2008-07-14 17:32:59 +00:00
Chris Lattner
58fe3dee5a
whitespace fix.
...
llvm-svn: 53537
2008-07-14 00:28:45 +00:00
Chris Lattner
f5c321c7fc
doxygenate comments and wrap to 80 cols.
...
llvm-svn: 53536
2008-07-14 00:27:31 +00:00
Dan Gohman
955fdc7a4c
Add explicit keywords.
...
llvm-svn: 53179
2008-07-07 18:00:37 +00:00
Evan Cheng
ce2c3b07ba
Revert 51775.
...
llvm-svn: 51795
2008-05-30 22:47:19 +00:00
Evan Cheng
8ebaae9d1c
Patches for building llvm on Solaris x86. Contributed by Nathan Keynes.
...
llvm-svn: 51775
2008-05-30 17:16:20 +00:00
Dan Gohman
3ea2dceca0
Prune and tidy #includes.
...
llvm-svn: 51697
2008-05-29 19:52:31 +00:00
Dan Gohman
b4eeb4dfba
Commit the header I accidentally left out of 51083.
...
llvm-svn: 51093
2008-05-14 04:39:40 +00:00
Dan Gohman
a84b75df17
Remove uses of llvm/System/IncludeFile.h that are no longer needed.
...
llvm-svn: 50695
2008-05-06 01:32:53 +00:00
Chris Lattner
57e11a167d
Move SplitBlockPredecessors out of loopsimplify into BasicBlockUtils.h
...
as a global helper function. At the same type, switch it from taking
a vector of predecessors to an arbitrary sequential input. This allows
us to switch LoopSimplify to use a SmallVector for various temporary
vectors that it passed into SplitBlockPredecessors.
llvm-svn: 50020
2008-04-21 01:28:02 +00:00
Evan Cheng
d01a2a18f8
Increasing the inline limit from (overly conservative) 200 to 300. Given each BB costs 20 and each instruction costs 5, 200 means a 4 BB function + 24 instructions (actually less because caller's size also contributes to it).
...
Furthermore, double the limit when more than 10% of the callee instructions are vector instructions. Multimedia kernels tend to love inlining.
llvm-svn: 48725
2008-03-24 06:37:48 +00:00
Chris Lattner
9fb1d740a6
prune #includes, fit in 80 cols.
...
llvm-svn: 47556
2008-02-25 19:21:38 +00:00
Chris Lattner
ff7707de37
don't include loopinfo.h from this file.
...
llvm-svn: 45858
2008-01-11 06:30:04 +00:00
Chris Lattner
e0b1ee937a
Don't attribute in file headers anymore. See llvmdev for the
...
discussion of this change. Boy are my fingers tired. ;-)
llvm-svn: 45411
2007-12-29 19:59:42 +00:00
Owen Anderson
7b92dab615
Start the process of making MachineLoopInfo possible by templating Loop.
...
llvm-svn: 44097
2007-11-14 02:33:58 +00:00
Anton Korobeynikov
8ab03c9d1c
Make this header public
...
llvm-svn: 43938
2007-11-09 12:16:58 +00:00
Anton Korobeynikov
bcee4726bf
Reg2Mem cleanup and optimizations:
...
- enable phi instructions demotion to stack
- create alloca instructions in the entry block
llvm-svn: 43208
2007-10-21 23:05:16 +00:00
Hartmut Kaiser
ed12f66488
Updated VC++ build system.
...
Silenced some VC warnings.
I'm getting linker errors, though: unresolved externals:
llvm::Split<class llvm::BasicBlock *,struct llvm::GraphTraits<class llvm::BasicBlock *> >(class llvm::DominatorTreeBase<class llvm::BasicBlock> &,class llvm::BasicBlock *)
and
llvm::Split<struct llvm::Inverse<class llvm::BasicBlock *>,struct llvm::GraphTraits<struct llvm::Inverse<class llvm::BasicBlock *> > >(class llvm::DominatorTreeBase<class llvm::BasicBlock> &,class llvm::BasicBlock *)
Where are these defined?
llvm-svn: 43073
2007-10-17 14:56:40 +00:00
Devang Patel
d412a2a0ed
Add utility to clone loops.
...
llvm-svn: 40997
2007-08-10 17:59:47 +00:00
Devang Patel
a03e82d7ee
Use SmallPtrSet.
...
llvm-svn: 40560
2007-07-27 18:34:27 +00:00
Devang Patel
d7b401bafd
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
Tanya Lattner
a715bbe152
Adding ability to demote phi to stack.
...
llvm-svn: 39744
2007-07-11 18:41:34 +00:00
Devang Patel
d9043c7501
Add SplitEdge and SplitBlock utility routines.
...
llvm-svn: 37952
2007-07-06 21:39:20 +00:00
Devang Patel
b5554f450a
Do not preserve ETForest.
...
llvm-svn: 37506
2007-06-08 00:02:08 +00:00
Devang Patel
3daf3625ab
Do not use ETForest as well as DomiantorTree. DominatorTree is sufficient.
...
llvm-svn: 37501
2007-06-07 22:17:16 +00:00
Devang Patel
a466c96f77
Use DominatorTree instead of ETForest.
...
This allows faster immediate domiantor walk.
llvm-svn: 37500
2007-06-07 21:57:03 +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
Devang Patel
38a66bc82e
Do not use typeinfo to identify pass in pass manager.
...
llvm-svn: 36632
2007-05-01 21:15:47 +00:00
Devang Patel
6a358e5694
Mem2Reg does not need TargetData.
...
llvm-svn: 36446
2007-04-25 18:41:11 +00:00
Devang Patel
b6ef7bc5d9
Remove unused function argument.
...
llvm-svn: 36441
2007-04-25 17:15:20 +00:00
Owen Anderson
41b527b75f
Move more passes to using ETForest instead of DominatorTree.
...
llvm-svn: 36271
2007-04-20 06:27:13 +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
41bf50021d
Expunge DomSet from CodeExtractor. This is part of the continuing work
...
on PR1171.
llvm-svn: 35726
2007-04-07 05:31:27 +00:00
Chris Lattner
71fe09f397
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
854464d748
move constant folding code out of Utils/Local into libanalysis
...
llvm-svn: 33681
2007-01-30 23:46:43 +00:00
Chris Lattner
23628987e2
The inliner/cloner can now optionally take TargetData info, which can be
...
used by constant folding.
llvm-svn: 33676
2007-01-30 23:22:39 +00:00
Chris Lattner
59ba02e557
Change constant folding APIs to take an optional TargetData, and change
...
ConstantFoldInstOperands/ConstantFoldCall to take a pointer to an array
of operands + size, instead of an std::vector.
llvm-svn: 33669
2007-01-30 23:12:47 +00:00