Chris Lattner
773a1c4474
Two small cleanups/speedups:
...
* Do not insert a new entry into NewPhiNodes during the rename pass if there are no PHIs in a block.
* Do not compute WriteSets in parallel
llvm-svn: 8858
2003-10-05 02:37:36 +00:00
Chris Lattner
9f0a542057
* Minor cleanups
...
* Eliminate the KillList instance variable, instead, just delete loads and
stores as they are "renamed", and delete allocas when they are done
* Make the 'visited' set an instance variable to avoid passing it on the stack.
llvm-svn: 8857
2003-10-05 01:52:53 +00:00
Chris Lattner
253c5f582e
Fix bugs in the last change
...
llvm-svn: 8667
2003-09-22 23:30:59 +00:00
Chris Lattner
7ff5b8a024
Fix bug: Inline/2003-09-22-PHINodesInNormalInvokeDest.ll
...
llvm-svn: 8666
2003-09-22 22:35:39 +00:00
Chris Lattner
2cb1e9f0a6
Fix bug: Inline/2003-09-22-PHINodesInExceptionDest.ll
...
... by making sure to update PHI nodes to take into consideration the
extra edges we get if we inline a call instruction through an invoke.
llvm-svn: 8664
2003-09-22 21:59:27 +00:00
Chris Lattner
fabd2617fc
Minor cleanups, no functional changes
...
Rename Function::getEntryNode -> getEntryBlock
llvm-svn: 8623
2003-09-20 14:36:23 +00:00
Chris Lattner
7a55e0b56d
Fix bug: Inline/2003-09-14-InlineValue.ll
...
llvm-svn: 8514
2003-09-15 02:10:16 +00:00
Chris Lattner
ee577bdc08
Expand the pass to unify all of the unwind blocks as well
...
llvm-svn: 8456
2003-09-10 20:34:51 +00:00
Chris Lattner
e8ae7bf114
Eliminate support for the llvm.unwind intrinisic, using the Unwind instruction instead
...
llvm-svn: 8411
2003-09-08 19:44:26 +00:00
Chris Lattner
5f9de6e523
Should invokify is always true
...
llvm-svn: 8409
2003-09-08 19:00:30 +00:00
Chris Lattner
a295c0d706
Fix bug where we considered function types equivalent even if they had differing numbers of arguments
...
llvm-svn: 8178
2003-08-28 16:42:50 +00:00
Chris Lattner
399ad7c300
Remove special casing
...
llvm-svn: 8144
2003-08-25 22:34:15 +00:00
Chris Lattner
bca7655aa9
Fix bug: Linker/2003-08-23-GlobalVarLinking.ll
...
llvm-svn: 8130
2003-08-24 19:30:20 +00:00
Chris Lattner
64c658e617
Implement: Linker/2003-08-24-InheritPtrSize.ll
...
llvm-svn: 8129
2003-08-24 19:26:42 +00:00
Chris Lattner
a0203709f4
Implement SimplifyCFG/InvokeEliminate.ll
...
llvm-svn: 8126
2003-08-24 18:36:16 +00:00
Chris Lattner
7e3e38b76d
rethrow is really the language independent primitive here. "throw" can be written
...
in terms of it and llvm.exc.setcurrent.
Rework the intrinsics.
llvm-svn: 8111
2003-08-24 12:24:11 +00:00
Chris Lattner
d5be33fded
*** Implement inlining of Invoke instructions!
...
llvm-svn: 8106
2003-08-24 06:59:16 +00:00
Chris Lattner
b3db526a4f
Implement: Inline/cfg_preserve_test.ll
...
llvm-svn: 8099
2003-08-24 04:06:56 +00:00
Chris Lattner
c499f5486f
Implement SimplifyCFG/2003-08-17-FoldSwitch.ll:test5
...
llvm-svn: 8093
2003-08-23 23:18:19 +00:00
Chris Lattner
9274d2d21a
Do not consider any types that exist in the global symbol table!
...
llvm-svn: 8084
2003-08-23 21:32:24 +00:00
Chris Lattner
c94a7e8904
Fix bug: Linker/2003-08-23-RecursiveOpaqueTypeResolve.ll
...
llvm-svn: 8083
2003-08-23 21:25:54 +00:00
Chris Lattner
f063146af6
Implement Linker/2003-08-23-GlobalVarLinking.ll, which should fix 176.gcc
...
llvm-svn: 8080
2003-08-23 20:31:10 +00:00
Chris Lattner
d6bf205b7d
Fix typeo
...
llvm-svn: 8059
2003-08-22 20:16:48 +00:00
Chris Lattner
fafb0d5a3c
The process of linking types can cause their addresses to become invalid. For this reason, we must use TypeHandles!
...
llvm-svn: 8057
2003-08-22 19:12:55 +00:00
Chris Lattner
b382d33401
Implement Linker/2003-08-20-OpaqueTypeResolve.ll
...
Hopefully this will fix the 176.gcc spec test as well.
llvm-svn: 8051
2003-08-22 06:07:12 +00:00
Misha Brukman
56f7db4178
Spell `necessary' correctly.
...
llvm-svn: 7944
2003-08-18 14:43:39 +00:00
Chris Lattner
382a3a3708
Implement folding of switch instructions.
...
Implements SimplifyCFG/2003-08-17-FoldSwitch.ll
llvm-svn: 7923
2003-08-17 20:21:14 +00:00
Chris Lattner
1f5afd2a1c
Fix bug: SimplifyCFG/2003-08-17-BranchFoldOrdering.ll
...
llvm-svn: 7921
2003-08-17 19:41:53 +00:00
Chris Lattner
17f985bfa4
The fixme is irrelevant: if that happens, the LLVM bytecode is malformed.
...
This fixes testcase: SimplifyCFG/2003-08-17-BranchFold.ll
llvm-svn: 7919
2003-08-17 19:34:55 +00:00
Chris Lattner
488b0e52a8
Fix bug: SimplifyCFG/2003-08-05-InvokeCrash.ll
...
Fix bug: SimplifyCFG/2003-08-05-MishandleInvoke.ll
llvm-svn: 7599
2003-08-05 16:27:44 +00:00
Tanya Lattner
eaa01f0821
Fixed comment width, changed arg to be const, fixed indentation, removed unnecessary includes.
...
llvm-svn: 6476
2003-05-31 20:01:37 +00:00
Tanya Lattner
ce23a1f169
Added the CloneTrace function which clones traces. It takes a vector of basic blocks, removes
...
internal phi nodes, and returns a new vector of basic blocks.
llvm-svn: 6431
2003-05-30 15:50:18 +00:00
Chris Lattner
01cbfa9317
Eliminate unnecessary ->get calls that are now automatically handled.
...
llvm-svn: 6397
2003-05-29 15:12:27 +00:00
Chris Lattner
24947af013
* Separate all of the grunt work of inlining out into the Utils library.
...
* Make the function inliner _significantly_ smarter. :)
llvm-svn: 6396
2003-05-29 15:11:31 +00:00
Chris Lattner
e58f6153f4
Remove using declarations
...
llvm-svn: 6306
2003-05-22 22:00:07 +00:00
Misha Brukman
825e174bf7
Hopefully, the final fix for `[Pp]ropogate'.
...
llvm-svn: 6251
2003-05-20 21:01:22 +00:00
Chris Lattner
d0f6311c43
Fix Bug: Linker/2003-05-15-TypeProblem.ll
...
llvm-svn: 6225
2003-05-15 16:30:55 +00:00
Chris Lattner
be0b81a4e9
Fix major problem with appending linkage changes
...
llvm-svn: 6185
2003-05-14 12:11:51 +00:00
Chris Lattner
576323e25e
Implement linkage of appending global variables!
...
llvm-svn: 6178
2003-05-13 21:33:43 +00:00
Chris Lattner
e1c995e9b6
Fix bug: mem2reg/2003-04-24-MultipleIdenticalSuccessors.ll
...
llvm-svn: 5919
2003-04-25 00:54:58 +00:00
Chris Lattner
043b4a7621
Fix iterator invalidation problem
...
llvm-svn: 5895
2003-04-24 17:52:20 +00:00
Chris Lattner
f0c01a508b
Make sure that the cloned module retains the type symbol table entries!
...
llvm-svn: 5894
2003-04-24 17:15:33 +00:00
Chris Lattner
868b3316c9
Make sure to preserve endiannes and pointer size when cloning modules!
...
llvm-svn: 5892
2003-04-24 15:54:40 +00:00
Chris Lattner
b6050c264d
Fix Bug: Linker/2003-04-23-LinkOnceLost.ll
...
llvm-svn: 5879
2003-04-23 18:38:39 +00:00
Chris Lattner
db6b7ba364
Remove unnecesary &*'s
...
llvm-svn: 5872
2003-04-23 16:37:45 +00:00
Chris Lattner
69b54208f4
Add warning when linking modules with disagreeing target properties
...
llvm-svn: 5845
2003-04-22 19:13:20 +00:00
Chris Lattner
ce0beca3fc
Preserve the new moduleID field
...
llvm-svn: 5835
2003-04-22 18:02:26 +00:00
Chris Lattner
21967df20a
Fix bug: 2003-01-30-LinkerRename.ll
...
llvm-svn: 5828
2003-04-21 21:15:04 +00:00
Chris Lattner
6da72fd92a
Fix linking a function with qualifiers to a external function declaration:
...
Fixed bug: Linker/2003-04-21-Linkage.ll
llvm-svn: 5827
2003-04-21 21:07:05 +00:00
Chris Lattner
a489b529fe
Fix bug where use still existed in dead code
...
llvm-svn: 5824
2003-04-21 19:15:26 +00:00
Chris Lattner
61d704329e
Fix bug: Mem2reg/2003-04-18-DeadBlockProblem.ll
...
llvm-svn: 5810
2003-04-18 19:25:22 +00:00
Chris Lattner
f171f30deb
Refactor CloneFunction to expose the new CloneBasicBlock function
...
llvm-svn: 5806
2003-04-18 03:50:09 +00:00
Chris Lattner
5403f79db0
New const_cast instead of c style cast
...
llvm-svn: 5805
2003-04-18 03:49:49 +00:00
Chris Lattner
fa4f750f3e
Add new linkage types to support a real frontend
...
llvm-svn: 5786
2003-04-16 20:28:45 +00:00
Chris Lattner
0ac391e6c8
* Fix bug: Mem2Reg/2003-04-10-DFNotFound.ll
...
* Make Mem2Reg assign version numbers now for renamed variables instead of
.mem2reg suffixes. This produces what people think of as SSA.
llvm-svn: 5771
2003-04-10 19:41:13 +00:00
Chris Lattner
44370a85d9
* We now preserve the no-critical-edge pass (because we cannot insert critical edges)
...
* Small modification to be more efficient
llvm-svn: 5757
2003-03-31 17:30:25 +00:00
Chris Lattner
9f2f48a648
Fix bug: SimplifyCFG/2003-03-07-DominateProblem.ll
...
llvm-svn: 5722
2003-03-07 18:13:41 +00:00
Chris Lattner
4a9f0be9dd
Implement CFGSimplify/PhiBlockMerge*.ll
...
llvm-svn: 5702
2003-03-05 21:36:33 +00:00
Chris Lattner
e025920ff8
Implement testcase CFGSimplify/EqualPHIEdgeBlockMerge.ll
...
llvm-svn: 5699
2003-03-05 21:01:52 +00:00
Chris Lattner
a49e96dda5
Change the mem2reg interface to accept a TargetData argument
...
llvm-svn: 5685
2003-03-03 17:25:18 +00:00
Chris Lattner
497c0d443c
Rename Instruction::hasSideEffects() -> mayWriteToMemory()
...
llvm-svn: 5620
2003-02-24 20:48:32 +00:00
Chris Lattner
2e4c1c8640
Split mem2reg promotion into two parts: a function which does the work, and
...
a pass which wraps the function. This allows other passes to use the functionality
llvm-svn: 5610
2003-02-22 23:57:48 +00:00
Chris Lattner
283d117dad
Clean up std namespace references
...
llvm-svn: 5608
2003-02-22 22:25:17 +00:00
Chris Lattner
f1f1b83cbe
* Fix linking of opaque types and their non-opaque versions
...
* Fix bug: Linker/2003-01-30-LinkerTypeRename.ll
llvm-svn: 5441
2003-01-30 20:53:43 +00:00
Chris Lattner
f9ace7ffb1
Eliminate using decls
...
llvm-svn: 5439
2003-01-30 19:53:34 +00:00
Chris Lattner
31a6321785
Add debugging helper
...
llvm-svn: 5235
2003-01-13 00:52:25 +00:00
Vikram S. Adve
a9966ae8ad
This file implements the function DemoteRegToStack(), which takes a
...
virtual register computed by an Instruction& X and replaces it with
a slot in the stack frame, allocated via alloca.
llvm-svn: 4964
2002-12-10 13:07:58 +00:00
Chris Lattner
fc15b7a661
Fix bug that was bugging bugpoint
...
llvm-svn: 4953
2002-12-07 21:27:16 +00:00
Chris Lattner
dd9d97436d
Fix big bug introduced with symbol table changes
...
llvm-svn: 4885
2002-12-03 18:32:30 +00:00
Chris Lattner
6aa0ec26d5
Initial checkin of Module cloning support stuff
...
llvm-svn: 4788
2002-11-20 20:47:41 +00:00
Chris Lattner
b5027095e5
- Eliminated the deferred symbol table stuff in Module & Function, it really
...
wasn't an optimization and it was causing lots of bugs.
llvm-svn: 4779
2002-11-20 18:36:02 +00:00
Chris Lattner
ec0df74910
Fix minor bugs
...
llvm-svn: 4778
2002-11-20 18:32:31 +00:00
Chris Lattner
62629300d3
Remove unneccesary #include
...
llvm-svn: 4772
2002-11-19 23:12:53 +00:00
Chris Lattner
4053d2dd12
Implement the CloneFunction function
...
llvm-svn: 4771
2002-11-19 23:12:22 +00:00
Chris Lattner
e5a05ec13b
Minor changes to cloning interface
...
llvm-svn: 4770
2002-11-19 22:54:01 +00:00
Chris Lattner
aff50cfe1d
Fix two fixmes: integrate with inlining, and document
...
llvm-svn: 4769
2002-11-19 22:04:49 +00:00
Chris Lattner
27bf5916fb
Rework inline pass to use cloning infrastructure to do the dirty work
...
llvm-svn: 4766
2002-11-19 21:54:07 +00:00
Chris Lattner
ccb8790bc4
Start using the new function cloning header
...
llvm-svn: 4764
2002-11-19 20:59:41 +00:00
Chris Lattner
1ec9725ef8
BreakCriticalEdges should update dominance frontier information as well as
...
other dominance stuff. Patch contributed by Casey Carter
llvm-svn: 4457
2002-10-31 02:44:36 +00:00
Misha Brukman
c9c721edf0
Fix spelling of `propagate'.
...
llvm-svn: 4423
2002-10-29 23:06:16 +00:00
Chris Lattner
b565d3ac5b
- Rename AnalysisUsage::preservesAll to getPreservesAll & preservesCFG to
...
setPreservesCFG to be less confusing.
llvm-svn: 4255
2002-10-21 20:00:28 +00:00
Chris Lattner
82f54dca49
- Change Function's so that their argument list is populated when they are
...
constructed. Before, external functions would have an empty argument list,
now a Function ALWAYS has a populated argument list.
llvm-svn: 4149
2002-10-13 20:57:00 +00:00
Chris Lattner
d68e6d1718
- Fix bug: cee/2002-10-07-NoImmediateDominator.ll
...
llvm-svn: 4081
2002-10-08 21:53:51 +00:00
Chris Lattner
9c236351fd
Changes to support PHINode::removeIncoming changes
...
llvm-svn: 4079
2002-10-08 21:36:33 +00:00
Chris Lattner
3cf20c3f14
Expose isCriticalEdge & SplitCriticalEdge methods from crit-edges pass
...
llvm-svn: 4075
2002-10-08 21:06:27 +00:00
Chris Lattner
7cf9f6f4b1
Updates to work with recent Statistic's changes:
...
* Renamed StatisticReporter.h/cpp to Statistic.h/cpp
* Broke constructor to take two const char * arguments instead of one, so
that indendation can be taken care of automatically.
* Sort the list by pass name when printing
* Make sure to print all statistics as a group, instead of randomly when
the statistics dtors are called.
* Updated ProgrammersManual with new semantics.
llvm-svn: 4002
2002-10-01 22:38:41 +00:00
Chris Lattner
f9676d651d
- Cleanup break-crit-edges pass by making SplitCriticalEdge a member method.
...
- break-crit-edges pass does not invalidate loop-preheader pass.
llvm-svn: 3944
2002-09-26 16:18:51 +00:00
Chris Lattner
2cf19d980a
- Fix bug: Mem2Reg/2002-05-01-ShouldNotPromoteThisAlloca.ll
...
llvm-svn: 3917
2002-09-24 21:19:41 +00:00
Chris Lattner
54cf78c786
Fix bug: SimplifyCFG/2002-09-24-PHIAssertion.ll
...
llvm-svn: 3913
2002-09-24 16:09:17 +00:00
Chris Lattner
a4f47fb77e
- Do not expose Critical Edge breaking mechanics outside the BCE pass, thus
...
removing it from Transforms/Local.h and from Transforms/Utils/*
llvm-svn: 3911
2002-09-24 15:52:01 +00:00
Chris Lattner
25ba5ac7ce
- Do not expose Critical Edge breaking mechanics outside the BCE pass, thus
...
removing it from Transforms/Local.h and from Transforms/Utils/*
llvm-svn: 3910
2002-09-24 15:51:56 +00:00
Chris Lattner
49588769e0
- Expose passinfo from BreakCriticalEdges pass so that it may be "Required"
...
by other passes. Make BCE pass be in anonymous namespace now.
llvm-svn: 3907
2002-09-24 15:43:12 +00:00
Chris Lattner
4e11d9e5de
Minor cleanups
...
llvm-svn: 3904
2002-09-24 00:09:26 +00:00
Chris Lattner
e62cdff96c
Add new BreakCriticalEdges pass
...
llvm-svn: 3903
2002-09-24 00:08:39 +00:00
Chris Lattner
aecb825629
Insert resolved constants into the global map so they are reused correctly.
...
This bug was exposed linking the SPEC benchmark suite.
llvm-svn: 3888
2002-09-23 18:14:15 +00:00
Chris Lattner
d6fed79df6
Fix bug I introduced with one of my previous changes.
...
Thanks fly out to Nick for noticing it! :)
llvm-svn: 3691
2002-09-12 19:00:43 +00:00
Chris Lattner
62bd3a248c
Fix bugs in previous checkins
...
llvm-svn: 3673
2002-09-10 23:31:28 +00:00
Chris Lattner
3b3e26bb63
Fix minor problems in previous checkin
...
llvm-svn: 3668
2002-09-10 22:52:49 +00:00
Chris Lattner
f2e4e61769
Clean up code due to auto-insert constructors
...
llvm-svn: 3666
2002-09-10 22:38:49 +00:00
Chris Lattner
37c3a1d80c
Clean up code due to auto-insert constructors
...
llvm-svn: 3665
2002-09-10 22:38:47 +00:00
Chris Lattner
bf38fcf5ee
Fix file header to be accurate, instead of something I just copied and pasted.
...
llvm-svn: 3591
2002-09-06 03:59:56 +00:00
Chris Lattner
78a3ebaa18
Fix bug with critical edge splitting code where it wouldn't update PHI nodes
...
in the old destination block to indicate that the value flows from the new
edge splitting block, not from the original multi-successor block.
llvm-svn: 3590
2002-09-06 03:51:45 +00:00
Chris Lattner
c3c754062f
Check in the implementation of critical edge detection and splitting
...
llvm-svn: 3588
2002-09-06 02:35:34 +00:00
Chris Lattner
20b85d96e4
Eliminated the MemAccessInst class, folding contents into GEP class.
...
llvm-svn: 3487
2002-08-22 23:37:20 +00:00
Chris Lattner
6c83ee57c1
- Do not expose ::ID from any of the analyses anymore.
...
llvm-svn: 3417
2002-08-21 17:09:49 +00:00
Chris Lattner
af538ea2c9
fixed bug: test/Regression/Linker/2002-08-20-ConstantExpr.ll
...
llvm-svn: 3412
2002-08-20 19:35:11 +00:00
Chris Lattner
6a9d88347a
Remove support for Not ConstantExpr. This simplifies the unary case to only
...
have to support the cast instruction, so the function is renamed to getCast.
llvm-svn: 3328
2002-08-14 18:24:09 +00:00
Chris Lattner
a21e315db4
- Cleaned up the interface to AnalysisUsage to take analysis class names
...
instead of ::ID's.
- Pass::getAnalysis<> now no longer takes an optional argument
llvm-svn: 3265
2002-08-08 19:01:30 +00:00
Chris Lattner
12b9a2a7e6
Cleanup ConstantExpr handling:
...
* Correctly delete TypeHandles in AsmParser. In addition to not leaking
memory, this prevents a bug that could have occurred when a type got
resolved that the constexpr was using
* Check for errors in the AsmParser instead of hitting assertion failures
deep in the code
* Simplify the interface to the ConstantExpr class, removing unneccesary
parameters to the ::get* methods.
* Rename the 'getelementptr' version of ConstantExpr::get to
ConstantExpr::getGetElementPtr
llvm-svn: 3160
2002-07-30 18:54:22 +00:00
Chris Lattner
902619d2f1
Remove FIXME's that aren't really needed after all.
...
llvm-svn: 3158
2002-07-30 16:38:54 +00:00
Chris Lattner
078c1024c0
Implement a new RemoveSuccessor function
...
llvm-svn: 3131
2002-07-29 22:32:08 +00:00
Chris Lattner
2f7ce877c5
Allow folding of basic blocks that have PHI nodes in them, fixing "bug":
...
test/Regression/Transforms/SimplifyCFG/2002-06-24-PHINode.ll
llvm-svn: 3128
2002-07-29 21:26:30 +00:00
Chris Lattner
3f47f1065b
* Standardize how analysis results/passes as printed with the print() virtual
...
methods
* Eliminate AnalysisID: Now it is just a typedef for const PassInfo*
* Simplify how AnalysisID's are initialized
* Eliminate Analysis/Writer.cpp/.h: incorporate printing functionality into
the analyses themselves.
llvm-svn: 3115
2002-07-27 01:12:15 +00:00
Chris Lattner
7a9eb848cd
* Add support for different "PassType's"
...
* Add new RegisterOpt/RegisterAnalysis templates for registering passes that
are to show up in opt or analyze
* Register Analyses now
* Change optimizations to use RegisterOpt instead of RegisterPass
* Add support for different "PassType's"
* Add new RegisterOpt/RegisterAnalysis templates for registering passes that
are to show up in opt or analyze
* Register Analyses now
* Change optimizations to use RegisterOpt instead of RegisterPass
* Remove getPassName implementations from various subclasses
llvm-svn: 3113
2002-07-26 21:12:46 +00:00
Chris Lattner
b934722f1b
* Add support for different "PassType's"
...
* Add new RegisterOpt/RegisterAnalysis templates for registering passes that
are to show up in opt or analyze
* Register Analyses now
* Change optimizations to use RegisterOpt instead of RegisterPass
* Add support for different "PassType's"
* Add new RegisterOpt/RegisterAnalysis templates for registering passes that
are to show up in opt or analyze
* Register Analyses now
* Change optimizations to use RegisterOpt instead of RegisterPass
* Remove getPassName implementations from various subclasses
llvm-svn: 3112
2002-07-26 21:12:44 +00:00
Chris Lattner
0702eb18e6
*** empty log message ***
...
llvm-svn: 3072
2002-07-24 22:40:39 +00:00
Chris Lattner
c482880f9e
*** empty log message ***
...
llvm-svn: 3016
2002-07-23 18:06:35 +00:00
Chris Lattner
24bcbdd155
*** empty log message ***
...
llvm-svn: 3002
2002-07-23 17:52:38 +00:00
Chris Lattner
d703fa0041
* Rewrite loop to be slightly more efficient (arguably)
...
* Fix a MAJOR thinko that was causing bad links to happen on Spec
llvm-svn: 2953
2002-07-18 02:31:03 +00:00
Chris Lattner
b121676038
Implement linking of ConstExprs
...
llvm-svn: 2946
2002-07-18 00:13:08 +00:00
Chris Lattner
a590093513
*** empty log message ***
...
llvm-svn: 2813
2002-06-30 16:25:25 +00:00
Anand Shukla
3ab9ffd5b1
changes to make it compatible with 64bit gcc
...
llvm-svn: 2795
2002-06-25 21:18:19 +00:00
Chris Lattner
dfd421a7df
MEGAPATCH checkin.
...
For details, See: docs/2002-06-25-MegaPatchInfo.txt
llvm-svn: 2779
2002-06-25 16:13:24 +00:00
Chris Lattner
cee706572b
*** empty log message ***
...
llvm-svn: 2777
2002-06-25 16:12:52 +00:00
Chris Lattner
b95dde758a
Simplify the interface to local DCE and Constant prop
...
llvm-svn: 2749
2002-05-26 20:18:18 +00:00
Chris Lattner
e7ce749d63
Add implementation of SimplifyCFG
...
llvm-svn: 2701
2002-05-21 20:50:24 +00:00
Chris Lattner
4b29ff417d
Simplify interface to ConstantFoldTerminator
...
llvm-svn: 2697
2002-05-21 20:04:50 +00:00
Chris Lattner
adba963886
Add support for printing out statistics information when -stats is added to
...
the command line
llvm-svn: 2601
2002-05-10 15:38:35 +00:00
Chris Lattner
ce6632281f
Give the unified exit node a name
...
llvm-svn: 2550
2002-05-07 22:14:45 +00:00
Chris Lattner
2a43c7c03d
Merge all individual .h files into a single Scalar.h file
...
llvm-svn: 2537
2002-05-07 20:03:00 +00:00
Chris Lattner
f7806b0212
Move UnifyFunctionExitNodes to Utils library: final resting place this time
...
llvm-svn: 2531
2002-05-07 19:18:48 +00:00
Chris Lattner
6ccbd5804a
Cleanup implementation a bit
...
llvm-svn: 2526
2002-05-07 18:51:25 +00:00
Chris Lattner
9e1c79995e
Updates to move some header files out of include/llvm/Transforms into
...
the Scalar and Utils subdirectories
llvm-svn: 2523
2002-05-07 18:36:35 +00:00
Chris Lattner
d5477af051
Add code pulled out of TransformInternals.cpp, ConstProp.cpp, and DCE.cpp
...
llvm-svn: 2513
2002-05-07 18:07:59 +00:00
Chris Lattner
8a6104c3cb
Fixed bug: test/Regression/Transforms/Mem2Reg/2002-05-01-ShouldNotPromoteThisAlloca.ll
...
llvm-svn: 2423
2002-05-01 15:38:23 +00:00
Chris Lattner
f5d07697e6
changes because iMemory.h no longer #includes DerivedTypes.h
...
This only requires Type.h anyway
llvm-svn: 2405
2002-04-29 18:48:30 +00:00
Chris Lattner
96e0c48175
Eliminate duplicate or unneccesary #include's
...
llvm-svn: 2397
2002-04-29 17:42:12 +00:00
Chris Lattner
589debc4ba
Add new optional getPassName() virtual function that a Pass can override
...
to make debugging output a lot nicer.
llvm-svn: 2395
2002-04-29 14:57:45 +00:00
Chris Lattner
ec70d92221
Tighten up the AnalysisUsage of lots of passes, primarily to correctly indicate whether or not they invalidate the CFGA
...
llvm-svn: 2386
2002-04-28 21:27:06 +00:00
Chris Lattner
321a8cf4ba
Split ConstantVals.h into Constant.h and Constants.h
...
llvm-svn: 2378
2002-04-28 19:55:58 +00:00
Chris Lattner
50a089867d
Eliminate the PromoteInstance class, incorporating it into the PromotePass
...
class.
llvm-svn: 2375
2002-04-28 19:12:38 +00:00
Chris Lattner
b8ade8715e
Eliminate visited, CurrentValue, and WriteSets as instance variables of
...
PromoteInstance. Make them local variables that are passed around as
appropriate. Especially in the case of CurrentValue, this makes the
code simpler.
llvm-svn: 2374
2002-04-28 18:54:01 +00:00
Chris Lattner
1d9e63dca0
* Fix bug: test/Regression/Transforms/Mem2Reg/2002-03-28-UninitializedVal.ll
...
* Minor cleanup that was missed in last patch
llvm-svn: 2373
2002-04-28 18:39:46 +00:00
Chris Lattner
246083577b
This huge changeset is a strictly cleanup change
...
Bugfixes will come in the next revision so that the diff is obvious.
llvm-svn: 2372
2002-04-28 18:27:55 +00:00
Chris Lattner
07fe96ca98
Eliminate the cfg namespace, moving LoopInfo, Dominators, Interval* classes
...
to the global namespace
llvm-svn: 2370
2002-04-28 16:21:30 +00:00
Chris Lattner
741453dd60
Change the Dominator info and LoopInfo classes to keep track of BasicBlock's, not
...
const BasicBlocks
llvm-svn: 2337
2002-04-28 00:15:57 +00:00
Chris Lattner
2f0ee1833d
s/Method/Function
...
llvm-svn: 2336
2002-04-27 07:27:19 +00:00
Chris Lattner
536cf1b13f
* Rename MethodPass class to FunctionPass
...
- Rename runOnMethod to runOnFunction
* Transform getAnalysisUsageInfo into getAnalysisUsage
- Method is now const
- It now takes one AnalysisUsage object to fill in instead of 3 vectors
to fill in
- Pass's now specify which other passes they _preserve_ not which ones
they modify (be conservative!)
- A pass can specify that it preserves all analyses (because it never
modifies the underlying program)
* s/Method/Function/g in other random places as well
llvm-svn: 2333
2002-04-27 06:56:12 +00:00
Chris Lattner
5e12c7caf5
Move FunctionArgument out of iOther.h into Argument.h and rename class to
...
be 'Argument' instead of FunctionArgument.
llvm-svn: 2216
2002-04-09 19:48:49 +00:00
Chris Lattner
7ae20d642d
Add #includes to make up for #includes pruned out of header files.
...
llvm-svn: 2207
2002-04-09 18:37:46 +00:00
Chris Lattner
31e5838296
s/Method/Function
...
Remove extraneous #includes of llvm/Assembly/Writer
llvm-svn: 2178
2002-04-08 22:03:00 +00:00
Chris Lattner
0cfa70b083
Eliminate explicit use of Writer library, using debug dump output instead.
...
llvm-svn: 2147
2002-04-07 22:31:23 +00:00
Chris Lattner
bc15ae64dd
Change references to the Method class to be references to the Function
...
class. The Method class is obsolete (renamed) and all references to it
are being converted over to Function.
llvm-svn: 2144
2002-04-07 20:49:59 +00:00
Chris Lattner
57dd5ed245
New clone function routine
...
llvm-svn: 2045
2002-03-29 19:03:54 +00:00
Chris Lattner
084601e6f4
s/Method/Function
...
llvm-svn: 2034
2002-03-29 03:44:36 +00:00
Cameron Buschardt
49c09d5b24
* Move classes around
...
* rename constructor function
* Move stuff into anonymous namespaces
llvm-svn: 2007
2002-03-27 23:28:40 +00:00
Cameron Buschardt
bcff69b0f4
Implemented promote mem->reg pass.
...
llvm-svn: 2005
2002-03-27 23:17:37 +00:00
Chris Lattner
849c762b02
Change references from Method to Function
...
change references from MethodARgument to FunctionArgument
llvm-svn: 1991
2002-03-26 18:01:55 +00:00
Chris Lattner
55aff5c433
Cleanup error message output a bit
...
llvm-svn: 1879
2002-03-15 20:21:29 +00:00
Chris Lattner
b4e6953fc0
Namespaces
...
llvm-svn: 1791
2002-02-24 23:03:09 +00:00
Chris Lattner
b0a2c5546b
Method.h no longer includes BasicBlock.h
...
Method::inst_* is now in llvm/Support/InstIterator.h
GraphTraits specializations for BasicBlock and Methods are now in llvm/Support/CFG.h
llvm-svn: 1746
2002-02-12 21:07:25 +00:00
Chris Lattner
5276164ac4
Add neccesary #include
...
llvm-svn: 1742
2002-02-12 20:19:06 +00:00
Chris Lattner
20edcad40a
I forgot to provide dominance frontier information. Now it's available.
...
Also add more comments.
llvm-svn: 1741
2002-02-12 18:27:41 +00:00
Chris Lattner
326b548cd4
Initial checkin of new memory -> register promotion pass
...
llvm-svn: 1739
2002-02-12 17:16:22 +00:00
Chris Lattner
43ed408912
General cleanup
...
llvm-svn: 1628
2002-02-01 04:53:48 +00:00
Chris Lattner
0d3eaa9575
Eliminate SimplifyCFG.h file, pull everything into the UnifyMethodExitNodes class
...
llvm-svn: 1613
2002-01-31 01:12:06 +00:00
Chris Lattner
15c05486cc
Convert analyses to new pass structure
...
llvm-svn: 1603
2002-01-31 00:42:27 +00:00
Chris Lattner
3dc9a2a61f
Changes to build successfully with GCC 3.02
...
llvm-svn: 1503
2002-01-20 22:54:45 +00:00
Chris Lattner
c4a5815033
Renamed inst_const_iterator -> const_inst_iterator
...
Renamed op_const_iterator -> const_op_iterator
Renamed PointerType::getValueType() -> PointerType::getElementType()
llvm-svn: 1408
2001-12-04 00:03:30 +00:00
Chris Lattner
f6b7da2bb5
Rename ConstPoolVal -> Constant
...
Rename ConstPool* -> Constant*
Rename ConstPoolVals.h -> ConstantVals.h
llvm-svn: 1407
2001-12-03 22:26:30 +00:00
Chris Lattner
bcf2df7058
Split the PHINode class out from the iOther.h file into the iPHINode.h file
...
llvm-svn: 1405
2001-12-03 18:02:31 +00:00
Chris Lattner
dce8511222
Implement support for internal methods
...
llvm-svn: 1380
2001-11-26 18:59:18 +00:00
Chris Lattner
e33afc1d46
Add #includes to enable buiding in Release mode
...
llvm-svn: 1174
2001-11-07 13:49:45 +00:00
Chris Lattner
b778b5bd90
Don't forget to link type names together too. Fix for Olden/mst benchmark
...
llvm-svn: 1094
2001-11-03 05:18:24 +00:00
Chris Lattner
b995f1c44f
Add extra code for debugging linker problems
...
llvm-svn: 1091
2001-11-03 03:27:29 +00:00
Chris Lattner
d8958859d9
Pull method symbols over when linking. Otherwise the result of the link will appear stripped
...
llvm-svn: 1033
2001-10-29 16:55:41 +00:00
Chris Lattner
42883552ec
Remove non linking related stuff
...
llvm-svn: 1015
2001-10-28 22:43:06 +00:00
Vikram S. Adve
2c1193dfdd
Added name-mangling routines for future use.
...
llvm-svn: 1003
2001-10-28 21:38:02 +00:00
Chris Lattner
307595fd40
Fix problem linking in a method prototype when a method body exists
...
llvm-svn: 965
2001-10-23 20:43:42 +00:00
Chris Lattner
fd1ab08cba
Rename ConstPoolPointerReference to ConstPoolPointerRef - My fingers get tired typing that much
...
llvm-svn: 822
2001-10-15 13:21:42 +00:00
Chris Lattner
9c144fbb72
Implement linking of global variable constant references
...
llvm-svn: 817
2001-10-15 03:12:52 +00:00
Chris Lattner
9f4d1bcb25
Implement linker. It's 95% working now.
...
llvm-svn: 810
2001-10-14 23:29:15 +00:00
Chris Lattner
9d7255f19c
Start of a linker
...
llvm-svn: 775
2001-10-13 07:03:50 +00:00
Chris Lattner
c00392210d
Broad superficial changes:
...
* Renamed getOpcode to getOpcodeName
* Changed getOpcodeName to return a const char * instead of string
* Added a getOpcode method to replace getInstType
* Changed code to use getOpcode instead of getInstType
llvm-svn: 152
2001-07-07 19:24:15 +00:00
Chris Lattner
dab02ca9e0
Add method to unify all exit nodes of a method
...
llvm-svn: 143
2001-07-06 16:58:36 +00:00