Chris Lattner
ab038d44b0
Simplify the interface to local DCE and Constant prop
...
llvm-svn: 2749
2002-05-26 20:18:18 +00:00
Chris Lattner
eef79f1af4
Do not remove type names that contain a .
...
llvm-svn: 2747
2002-05-26 20:17:35 +00:00
Chris Lattner
1eb9e6cc47
Fix "unimplemented features":
...
test/Regression/Transforms/FunctionResolve/retmismatch[12].ll
This makes it much more useful for running benchmarks that are missing
prototypes for some functions.
llvm-svn: 2745
2002-05-24 21:33:26 +00:00
Chris Lattner
5aa9e3e702
Split the FunctionResolution pass out of CleanGCCOutput.cpp.
...
llvm-svn: 2742
2002-05-24 20:42:13 +00:00
Chris Lattner
e80124df80
Fix comments to reflect reality
...
llvm-svn: 2741
2002-05-24 20:41:51 +00:00
Chris Lattner
e3da2980ad
Support programs that do not #include <malloc.h> or give a full prototype
...
for malloc and free. Lots of crufty benchmarks are using stuff like:
char *malloc();
void free();
to forward declare malloc and free. Now we recognize and raise these forms
llvm-svn: 2740
2002-05-24 20:29:18 +00:00
Chris Lattner
9c2765d4aa
Fold add X, 0 for floating point types as well
...
llvm-svn: 2734
2002-05-23 17:11:38 +00:00
Chris Lattner
e1fc2d965f
Convert code to use the DEBUG macro so that debug code can simply be
...
enabled with the -debug command line option.
llvm-svn: 2721
2002-05-22 21:56:32 +00:00
Chris Lattner
559f0ee9c9
Fix and implement ADCE to finally work!
...
llvm-svn: 2720
2002-05-22 21:32:16 +00:00
Chris Lattner
acd4599e57
Convert transforms over to standardize debugging output on -debug option
...
llvm-svn: 2714
2002-05-22 17:27:12 +00:00
Chris Lattner
71cbd42b98
Use the new DEBUG(x) macro to allow debugging code to be enabled on the commandline
...
llvm-svn: 2713
2002-05-22 17:17:27 +00:00
Chris Lattner
a482d52ff4
Fix bug: test/Regression/Transforms/SCCP/2002-05-21-InvalidSimplify.ll
...
Improperly handling edges... by not marking them alive properly
llvm-svn: 2707
2002-05-22 16:07:20 +00:00
Chris Lattner
466a049b67
Add implementation of SimplifyCFG
...
llvm-svn: 2701
2002-05-21 20:50:24 +00:00
Chris Lattner
fa7dad8cd5
New CFG Simplification pass: removed from the old DCE pass
...
llvm-svn: 2700
2002-05-21 20:49:37 +00:00
Chris Lattner
4b009adc77
Simplify interface to ConstantFoldTerminator
...
llvm-svn: 2697
2002-05-21 20:04:50 +00:00
Chris Lattner
ace7b8d3bd
* Change commandline options a bit to be nicer
...
* Insert accurate prototypes for functions
* Insert casts to use accurate prototypes
llvm-svn: 2677
2002-05-20 21:43:59 +00:00
Chris Lattner
b710b1fb22
Fix bug: test/Regression/Transforms/SCCP/2002-05-20-MissedIncomingValue.ll
...
That was causing a miscompilation of strtol/atoi plus others
llvm-svn: 2669
2002-05-20 20:48:03 +00:00
Vikram S. Adve
47f37c3404
Hash pointer values to a sequence number to get identical results from
...
lli and llc. This is controlled with options -tracehash on|off.
Also, added an option to specify which functions should be traced.
Particularly useful to reduce output volume in basic-block tracing.
llvm-svn: 2646
2002-05-19 15:39:02 +00:00
Chris Lattner
7bc532dded
* Make debug output conditional on #define
...
* Add optimization to rank computation to not recursively search when
unneccesary.
* More agressively negate expressions to open reassociation opportunities.
* Linearize (A+B)+(C+D) into ((A+B)+C)+D
llvm-svn: 2637
2002-05-16 04:37:07 +00:00
Chris Lattner
cd9837d32e
* Fix bug: test/Regression/Transforms/GCSE/2002-05-14-OperandSwap.ll
...
By making sure to consider binary expressions identical if their operands
are backwards, but swappable.
llvm-svn: 2629
2002-05-14 19:57:25 +00:00
Chris Lattner
170ed7b6a3
Fix bug: test/Regression/Transforms/InstCombine/2002-05-14-SubFailure.ll
...
llvm-svn: 2627
2002-05-14 16:44:07 +00:00
Chris Lattner
053c0939e3
Fix bug: test/Regression/Transforms/InstCombine/2002-05-14-TouchDeletedInst.ll
...
"This testcase caused instcombine to fail because it got the same instruction on
it's worklist more than once (which is ok), but then deleted the instruction.
Since the inst stayed on the worklist, as soon as it came back up to be
processed, bad things happened, and opt asserted."
llvm-svn: 2623
2002-05-14 15:24:07 +00:00
Chris Lattner
a3c3456e7f
Fix a major source of "type unsafety", where a cast is neccesary, but can
...
be put either before or after a load. We chose to cast the value loaded
instead of the pointer to load from.
Fixes bug: test/Regression/Transforms/LevelRaise/2002-05-10-LoadPeephole.ll
llvm-svn: 2621
2002-05-14 05:23:45 +00:00
Chris Lattner
d38ddb1164
Implement elimination of loads
...
llvm-svn: 2620
2002-05-14 05:02:40 +00:00
Chris Lattner
7ab51787ca
Trivial cleanups
...
llvm-svn: 2617
2002-05-13 22:04:46 +00:00
Chris Lattner
6ec05f551c
Initial checkin of LICM pass
...
llvm-svn: 2615
2002-05-10 22:44:58 +00:00
Chris Lattner
0b18c1d64e
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
bad1b4dfce
Fix some bugs, straighten stuff out, more work needs to be done.
...
llvm-svn: 2600
2002-05-10 15:37:35 +00:00
Chris Lattner
da2eddd5c4
* Add support for the -stats command line option to report how much is changed
...
* Make cast-of-self-ty DCE the dead cast instruction immediately instead of
waiting for it to be DCE'd by another sweep over the function. This speeds
this up noticably.
llvm-svn: 2597
2002-05-10 15:29:25 +00:00
Chris Lattner
014ee634ce
Initial checkin of the PiNodeInsertion pass
...
llvm-svn: 2593
2002-05-10 05:41:34 +00:00
Chris Lattner
1fc23f382e
Handle setcc <global*>, 0 instructions, Global pointers are never null!
...
llvm-svn: 2582
2002-05-09 20:11:54 +00:00
Chris Lattner
6bd7ac6205
Give the longer name to the instruction that will probably be eliminated later
...
llvm-svn: 2581
2002-05-09 20:11:23 +00:00
Chris Lattner
ad3c495225
Add ability to transform (x - (y - z)) into (x + (z - y))
...
llvm-svn: 2566
2002-05-09 01:29:19 +00:00
Chris Lattner
147e975c43
* Combine: A-(-B) -> A + B
...
* Bugfix: A + -B and -A + B
llvm-svn: 2561
2002-05-08 22:46:53 +00:00
Chris Lattner
c0f5800678
Initial checkin of expression reassociation pass
...
llvm-svn: 2559
2002-05-08 22:19:27 +00:00
Chris Lattner
bbcb8914e6
Give the unified exit node a name
...
llvm-svn: 2550
2002-05-07 22:14:45 +00:00
Chris Lattner
c1496bda61
Fix bug: test/Regression/Transforms/ADCE/2002-01-31-UseStuckAround.ll
...
Cleanup code a lot
llvm-svn: 2547
2002-05-07 22:11:39 +00:00
Chris Lattner
b4cfa7ff97
Merge all individual .h files into a single Scalar.h file
...
llvm-svn: 2537
2002-05-07 20:03:00 +00:00
Chris Lattner
4eaf9f70e0
This doesn't use DCE!
...
llvm-svn: 2536
2002-05-07 20:02:44 +00:00
Chris Lattner
15435fd550
Move UnifyFunctionExitNodes to Utils library: final resting place this time
...
llvm-svn: 2531
2002-05-07 19:18:48 +00:00
Chris Lattner
03453a0e39
fix comments and documentation in file
...
llvm-svn: 2530
2002-05-07 19:04:39 +00:00
Chris Lattner
77f791dd5b
Split ChangeAllocations.cpp into Raise & LowerAllocations.cpp
...
llvm-svn: 2529
2002-05-07 19:02:48 +00:00
Chris Lattner
64d1334ba7
Cleanup implementation a bit
...
llvm-svn: 2526
2002-05-07 18:51:25 +00:00
Chris Lattner
7608a46cbe
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
9b55e5a2f4
Reduce dependance on TransformInternals.h, instead using the TransformUtils library
...
llvm-svn: 2518
2002-05-07 18:12:18 +00:00
Chris Lattner
3d86d49604
Add #include no longer included by llvm/Transforms/Scalar/ConstantProp.h
...
llvm-svn: 2517
2002-05-07 18:11:30 +00:00
Chris Lattner
560da70f8c
Factor code out to the TransformUtils library
...
llvm-svn: 2516
2002-05-07 18:10:55 +00:00
Chris Lattner
6a51585155
Factor code out of TransformInternals into the Transform Utils library
...
llvm-svn: 2515
2002-05-07 18:09:15 +00:00
Chris Lattner
664d085cb3
Build Transforms Utils library
...
llvm-svn: 2514
2002-05-07 18:08:50 +00:00
Chris Lattner
28537dff72
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
d66a6e33e9
* Convert InstWorkList to vector instead of set, because on big programs it
...
is empirically faster by a noticable margin, even though duplicates can
happen.
llvm-svn: 2511
2002-05-07 04:29:32 +00:00
Chris Lattner
87e8806f05
* Remove all cfg simplification stuff for a new cfg simplify pass (todo)
...
* Convert to worklist instead of iterative algorithm
llvm-svn: 2510
2002-05-07 04:24:11 +00:00
Chris Lattner
a6e047a5d9
Only do masking for unsigned values!
...
llvm-svn: 2504
2002-05-06 18:54:59 +00:00
Chris Lattner
e548507e8c
* Eliminate dead code that should have been removed in last revision
...
* Convert main constant propogation pass to be worklist driven instead of
iterative.
* -constprop pass no longer "constant propogates" terminator instructions
- CFG is now preserved!
llvm-svn: 2502
2002-05-06 18:21:31 +00:00
Chris Lattner
bbbdd852b8
Handle X = phi Y --> X = Y
...
llvm-svn: 2501
2002-05-06 18:06:38 +00:00
Chris Lattner
4c3366405a
* Use simplified interface to constant propogation stuff.
...
* Remove dead PHI case (which could not work due to getNumOperands rather than
getNumIncomingValues. This really belongs in InstCombine, anyway so we'll
move it there.
llvm-svn: 2497
2002-05-06 17:54:10 +00:00
Chris Lattner
019f3649bd
Clean up ADCE by removing extraneous wrapper class
...
llvm-svn: 2494
2002-05-06 17:27:57 +00:00
Chris Lattner
5d6bec5e26
Combine not (not X) -> X
...
llvm-svn: 2493
2002-05-06 17:03:21 +00:00
Chris Lattner
9fa53de7e9
Support more cases...
...
llvm-svn: 2490
2002-05-06 16:49:18 +00:00
Chris Lattner
f4cdbf34e5
Add many more instruction combination simplifications
...
llvm-svn: 2484
2002-05-06 16:14:14 +00:00
Chris Lattner
66e25b8b62
Merge blocks like this:
...
void "test3"(bool %T) {
br bool %T, label %BB1, label %BB1
BB1:
ret void
}
llvm-svn: 2472
2002-05-06 03:02:02 +00:00
Chris Lattner
940daedc22
Implement constant propogation of shift instructions
...
llvm-svn: 2471
2002-05-06 03:01:37 +00:00
Chris Lattner
7b80b53ab9
Ok, really it only takes me 3 times to get this right!
...
Now use #if 0 instead of #ifdef 0
llvm-svn: 2448
2002-05-02 21:49:50 +00:00
Chris Lattner
dd390e1736
Oops, disable debugging code all the way. :)
...
llvm-svn: 2447
2002-05-02 21:47:40 +00:00
Chris Lattner
fe6c9eeae3
* Finish the implementation of isEdgeFeasible this fixes bug:
...
test/Regression/Transforms/SCCP/2002-05-02-EdgeFailure.ll
* SCCP now preserves the CFG: It leaves conditional branches the way they
are in the program, not simplifying them. A seperate pass should eliminate
the potentially dead basic blocks and edges in the CFG.
llvm-svn: 2446
2002-05-02 21:44:00 +00:00
Chris Lattner
13b52e71d8
* Enable SCCP debugging to be turned on with a simple change of #define
...
* Change worklist to a set so that duplicates cannot happen
* Add support for the invoke instruction
* Avoid marking store and free instructions as overdefined, since they
cannot produce a value anyway.
* Inline the OperandChangedState implementation
* Add isEdgeFeasible in preparation to fix a bug. Right now it behaves
exactly as before.
* Remove obsolete comment about constant pools
llvm-svn: 2445
2002-05-02 21:18:01 +00:00
Chris Lattner
5364d1a74a
* Simplify the code by not bothering to name the folded constant
...
* Do not skip the instruction immediately after a folded instruction. This
was causing the testcase failure:
test/Regression/Transforms/SCCP/2002-05-02-MissSecondInst.ll
llvm-svn: 2443
2002-05-02 20:32:51 +00:00
Chris Lattner
05cd52199d
ExprTypeConvert will already do this transformation, no need to specialize
...
it here.
llvm-svn: 2431
2002-05-02 17:38:55 +00:00
Chris Lattner
39db871f86
Be a little more efficient, do not generate loads and stores with indices in them.
...
llvm-svn: 2430
2002-05-02 17:38:14 +00:00
Chris Lattner
94dcd411a5
Fix bug: test/Regression/Transforms/LevelRaise/2002-05-02-BadCastElimination.ll
...
llvm-svn: 2429
2002-05-02 17:37:34 +00:00
Chris Lattner
48a44f7e23
* Add ability to eliminate a bunch of different cascading cast variations
...
* Allow elimination of getelementptr X, uint 0 (which is a noop)
llvm-svn: 2428
2002-05-02 17:06:02 +00:00
Chris Lattner
b3e81510d7
Fixed bug: test/Regression/Transforms/Mem2Reg/2002-05-01-ShouldNotPromoteThisAlloca.ll
...
llvm-svn: 2423
2002-05-01 15:38:23 +00:00
Chris Lattner
f328577307
Remove unneccesary pass
...
llvm-svn: 2420
2002-04-30 20:52:49 +00:00
Chris Lattner
31ba129cbe
Add folding rules for mul X, 0 and mul X, 2
...
llvm-svn: 2417
2002-04-29 22:24:47 +00:00
Chris Lattner
7d3253876a
Significantly clean up SCCP pass. Now the two classes are merged and in
...
an anonymous namespace where they belong.
llvm-svn: 2415
2002-04-29 21:26:08 +00:00
Chris Lattner
27eeecbb69
Range insertion now returns an iterator
...
llvm-svn: 2414
2002-04-29 21:25:34 +00:00
Chris Lattner
09bbb5c015
Remove unused files: This is the old induction varaible cannonicalization
...
pass built on top of interval analysis
llvm-svn: 2411
2002-04-29 20:18:00 +00:00
Chris Lattner
767210feb7
Fix for problem when allocating something like this:
...
malloc(100-i);
llvm-svn: 2409
2002-04-29 20:09:21 +00:00
Chris Lattner
15e8f4c012
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
b4de02df67
Eliminate dead global variables
...
llvm-svn: 2400
2002-04-29 18:13:11 +00:00
Chris Lattner
d5a847057b
Eliminate duplicate or unneccesary #include's
...
llvm-svn: 2397
2002-04-29 17:42:12 +00:00
Chris Lattner
2dfc667a7d
Remove broken assertion.
...
llvm-svn: 2396
2002-04-29 16:20:25 +00:00
Chris Lattner
37104aace8
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
8d843f6b77
More cleanups
...
llvm-svn: 2392
2002-04-29 01:58:47 +00:00
Chris Lattner
fc1a433dae
Code cleanups
...
llvm-svn: 2391
2002-04-29 01:22:55 +00:00
Chris Lattner
f12cc842b3
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
ca14237696
Split ConstantVals.h into Constant.h and Constants.h
...
llvm-svn: 2378
2002-04-28 19:55:58 +00:00
Chris Lattner
b3d1caf947
Eliminate the PromoteInstance class, incorporating it into the PromotePass
...
class.
llvm-svn: 2375
2002-04-28 19:12:38 +00:00
Chris Lattner
13dbfe5217
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
ff8a62589c
* 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
421873de24
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
78dd56fe62
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
ee2e78b86c
Be careful not to make "external" function internal
...
llvm-svn: 2363
2002-04-28 05:48:34 +00:00
Chris Lattner
1b94c007dc
Initial checkin of new "Internalize" pass for GCCLD
...
llvm-svn: 2362
2002-04-28 05:43:27 +00:00
Chris Lattner
1467f64f01
Initial checkin of simple&fast SSA based GCSE algorithm
...
llvm-svn: 2338
2002-04-28 00:47:11 +00:00
Chris Lattner
99b6f5cac4
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
f998685cd9
s/Method/Function
...
llvm-svn: 2336
2002-04-27 07:27:19 +00:00
Chris Lattner
c8e665431b
* 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
66cfaf1da2
Changes because the Terminator::getSuccessor function now FAILS if successor
...
IDX is out of range instead of returning null.
llvm-svn: 2332
2002-04-27 03:15:45 +00:00
Chris Lattner
0e0c15b17a
* Change Constant::getNullConstant to Constant::getNullValue
...
* Add support for pool allocating array allocations of varying size
llvm-svn: 2329
2002-04-27 02:29:32 +00:00
Chris Lattner
2716b5e524
Change Constant::getNullConstant to Constant::getNullValue
...
llvm-svn: 2323
2002-04-27 02:25:14 +00:00
Chris Lattner
271255b087
Programs that actually free memory were broken
...
llvm-svn: 2307
2002-04-18 22:11:30 +00:00
Chris Lattner
1c8d3f8996
Add a fixme so that we don't forget this is broken.
...
llvm-svn: 2298
2002-04-18 18:52:03 +00:00
Chris Lattner
260ab20422
Significantly rework InstructionCombining to work better and to be cleaner.
...
We now use an InstVisitor to delegate to different cases that we are
interested in handling. We also fix the FIXME's by adding users to the
worklist when appropriate.
llvm-svn: 2292
2002-04-18 17:39:14 +00:00
Chris Lattner
6e56079654
Convert SCCP over to use InstVisitor instead of hand crafted switch
...
llvm-svn: 2286
2002-04-18 15:13:15 +00:00
Chris Lattner
5873900709
GEP instructions can never be constant propogated.
...
llvm-svn: 2284
2002-04-18 14:44:13 +00:00
Chris Lattner
f40379e403
Store instructions always return void, so they never get a name
...
llvm-svn: 2283
2002-04-18 14:43:54 +00:00
Chris Lattner
3e78deaafd
Correctly transform dependant arguments, allowing the perimeter bm to work.
...
llvm-svn: 2282
2002-04-18 14:43:30 +00:00
Chris Lattner
cf73caa5e8
Add casts for documentation
...
llvm-svn: 2272
2002-04-16 22:10:52 +00:00
Chris Lattner
28a01b2069
* Clean up the code a bit
...
* Allow structs with negative offsets. This enables the em3d benchmark to
be made typesafe. In this case, the struct had an array as the first
element, so a negative index was ok (the expr was -8 + 8x)
llvm-svn: 2271
2002-04-16 22:10:36 +00:00
Chris Lattner
457e1accb2
run an extra pass after a function has been transformed to eliminate
...
obviously duplicate loads of the pool base.
llvm-svn: 2255
2002-04-15 22:42:23 +00:00
Chris Lattner
3a60d04722
Eliminate cast of same type instructions.
...
llvm-svn: 2251
2002-04-15 19:45:29 +00:00
Chris Lattner
7e35890072
* s/Method/Function
...
* Fix bug where the character after a % was being discarded
llvm-svn: 2248
2002-04-14 06:15:24 +00:00
Chris Lattner
acf1902ea9
Turn off debug output
...
llvm-svn: 2247
2002-04-14 06:14:41 +00:00
Chris Lattner
50e3d32d7b
* Allow datasize to be specified on the commandline
...
* Build new datatypes correctly
* Transform instructions that return null pointers from functions to return
a null index.
llvm-svn: 2244
2002-04-13 23:13:18 +00:00
Chris Lattner
5da145b962
* Give alloca's for pool descriptors better names than "pool<n>".
...
* Fill in the pool descriptor links in the pool descriptors.
llvm-svn: 2239
2002-04-13 19:52:54 +00:00
Chris Lattner
8f796d6310
* Add names to the symbol table for pool types and modified types
...
* Handle more complex structure so that power works almost
* Fix bug with pooldestroy call where we passed in the size of the object
instead of the pool to destroy. bisort is now pool allocated successfully!
llvm-svn: 2238
2002-04-13 19:25:57 +00:00
Chris Lattner
441e16f735
Implement function rewriting to use offsets instead of pointers in programs.
...
This now works with treeadd at least, and perhaps other programs as well.
llvm-svn: 2233
2002-04-12 20:23:15 +00:00
Chris Lattner
011ab80ed6
* Add documentation
...
* Split the CleanGCC pass into two passes, a global pass and an IP pass.
Before it was just a global pass, but it did illegal things to the
module, which broke other passes that were being scheduled with it by
gccld.
llvm-svn: 2224
2002-04-10 20:33:11 +00:00
Chris Lattner
fc6737835b
Implement TODO, fixing bug:
...
test/Regression/Transforms/LevelRaise/2002-04-09-MissedRaise.ll
llvm-svn: 2219
2002-04-09 20:53:36 +00:00
Chris Lattner
2e9fa6d101
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
06be180225
Add explicit #includes of Function.h to make up for the removed #include
...
in iOther.h
llvm-svn: 2209
2002-04-09 19:08:28 +00:00
Chris Lattner
d92b01c385
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
f8e4dc33ab
s/Method/Function
...
Remove extraneous #includes of llvm/Assembly/Writer
llvm-svn: 2178
2002-04-08 22:03:00 +00:00
Chris Lattner
65b529fe6d
ConstantHandling moved into VMCore library
...
llvm-svn: 2165
2002-04-08 20:18:09 +00:00
Chris Lattner
0d4858a4eb
Eliminate explicit use of Writer library, using debug dump output instead.
...
llvm-svn: 2147
2002-04-07 22:31:23 +00:00
Chris Lattner
62b7fd136e
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
e2f2f54f0c
s/MethodType/FunctionType
...
llvm-svn: 2115
2002-04-04 22:19:18 +00:00
Chris Lattner
a8bef43fbb
PATypeHolder is now not a template
...
llvm-svn: 2106
2002-04-04 19:24:34 +00:00
Chris Lattner
1ec764b309
Allow scalars that point to multiple nodes when building the scalar map.
...
llvm-svn: 2087
2002-04-01 01:26:53 +00:00
Chris Lattner
cf09a2a2cd
Add extra case here to avoid getting spurious output
...
llvm-svn: 2086
2002-04-01 00:45:33 +00:00
Chris Lattner
0dc225cbf6
Add debug output
...
llvm-svn: 2066
2002-03-31 07:17:46 +00:00
Chris Lattner
847b6e2ee7
* Catch and ignore (for now) return instructions in tranformed functions
...
* Add more debugging output
* Fix problems refering to wrong versions of various graphs
* Build the pool descriptor map!
* Clear the nodemapping map after building pool descriptor to avoid assert
* Transform the NEw function body, not the old one...
* Matrix.ll now works!
llvm-svn: 2058
2002-03-30 20:53:14 +00:00
Chris Lattner
ca9f4d39f3
* Clean up data structures [AllocDSNode -> DSNode]
...
* TransformFunctionInfo now has call field form field mapping. May be
removed in the future.
* Moved the computation of "Scalars" into transformFunctionBody so
transformFunction didn't have to recompute it.
* Implement the node mapping calculation in preparation to calculate
PoolDescriptors to pass to transformFunctionBody
* Print out the node mapping [it looks right!]
* Other minor changes
llvm-svn: 2056
2002-03-30 09:12:35 +00:00
Chris Lattner
396d5d7c62
Maintain enough information so that the pools for all of the nodes of
...
the graph can be passed around.
llvm-svn: 2053
2002-03-30 04:02:31 +00:00
Chris Lattner
f32d65d5ca
Implement the first batch of transformations to the methods. So far it:
...
* Converts malloc instructions to poolalloc
* Converts free instructions to poolfree
* Convert calls to call the new cloned hacked up versions
Note that this does not modify hacked up stuff yet, just the top level
function
llvm-svn: 2052
2002-03-29 21:25:19 +00:00
Chris Lattner
291a1b1eb2
Correctly clone the function with the extra argument types. Now we need
...
to modify the function next.
This also properly recycles functions so that we don't get exponential
code blowup in the common case.
llvm-svn: 2049
2002-03-29 19:05:48 +00:00
Chris Lattner
f50cffce10
s/Method/Function
...
llvm-svn: 2048
2002-03-29 19:04:45 +00:00
Chris Lattner
16bfdb5f02
New clone function routine
...
llvm-svn: 2045
2002-03-29 19:03:54 +00:00
Chris Lattner
692ad5d9bd
Find out which calls in the function we need to transform and how.
...
Next step is to start hacking functions up.
llvm-svn: 2044
2002-03-29 17:13:46 +00:00
Chris Lattner
15deaa0ab9
s/Method/Function
...
llvm-svn: 2043
2002-03-29 17:08:29 +00:00
Chris Lattner
66df97d436
Modularize code a bit
...
llvm-svn: 2040
2002-03-29 06:21:38 +00:00
Chris Lattner
e0618ca2bd
Implement the first step of pool allocation - Creating, initialization, and
...
destruction of the pools.
llvm-svn: 2039
2002-03-29 05:50:20 +00:00
Chris Lattner
91db58298a
s/Method/Function
...
llvm-svn: 2034
2002-03-29 03:44:36 +00:00
Chris Lattner
c46dcca220
Simplify code a bit by using Module::getOrInsertFunction
...
llvm-svn: 2032
2002-03-29 03:43:24 +00:00
Chris Lattner
175f37c47b
Flesh out a bunch more code, print allocations that are poolable.
...
llvm-svn: 2031
2002-03-29 03:40:59 +00:00
Chris Lattner
ca1500607e
s/method/function
...
llvm-svn: 2030
2002-03-29 03:40:25 +00:00
Chris Lattner
870b1a2799
s/Method/Function/g
...
llvm-svn: 2029
2002-03-29 03:39:36 +00:00
Chris Lattner
c13563d5c0
Simplify code a lot by using the Module::getFunction & getOrInsertFunction
...
llvm-svn: 2028
2002-03-29 03:38:05 +00:00
Chris Lattner
64fd935489
Initial checkin of Noop pass that will be the pool allocator
...
llvm-svn: 2014
2002-03-28 18:08:31 +00:00
Cameron Buschardt
fea5661d49
* Move classes around
...
* rename constructor function
* Move stuff into anonymous namespaces
llvm-svn: 2007
2002-03-27 23:28:40 +00:00
Cameron Buschardt
baef5b2ee2
Implemented promote mem->reg pass.
...
llvm-svn: 2005
2002-03-27 23:17:37 +00:00
Chris Lattner
57698e2c0b
Change references from Method to Function
...
change references from MethodARgument to FunctionArgument
llvm-svn: 1991
2002-03-26 18:01:55 +00:00
Vikram S. Adve
e583c40316
Moved to directory Scalar/ and renamed.
...
llvm-svn: 1977
2002-03-24 03:55:06 +00:00
Vikram S. Adve
1ee0658a07
Major overhaul to support arbitrary mixed array and structure indices.
...
Also moved to the Scalar/ directory and renamed to "MultiDim".
llvm-svn: 1961
2002-03-24 03:21:18 +00:00
Chris Lattner
4e8c4877aa
Rename Method to Function
...
llvm-svn: 1957
2002-03-23 22:51:58 +00:00
Vikram S. Adve
5d218dff24
New pass to decompose multi-dimensional array references into
...
a sequence of 1-D references, using a sequence of getElementPtrs.
llvm-svn: 1948
2002-03-23 20:43:39 +00:00
Chris Lattner
b39971dfa8
Fix bug test/Regression/Transforms/LevelRaise/2002-03-21-MissedRaise3.ll
...
llvm-svn: 1943
2002-03-21 23:02:37 +00:00
Chris Lattner
dc960a6d4d
Fix test/Regression/Transforms/LevelRaise/2002-03-21-MissedRaise2.ll
...
llvm-svn: 1941
2002-03-21 22:39:59 +00:00
Chris Lattner
50f08078e6
Fix test/Regression/Other/2002-03-21-LevelRaiseMiss.ll
...
llvm-svn: 1933
2002-03-21 21:21:13 +00:00
Chris Lattner
06707765fa
Make ConvertableToGEP handle cases where the user is indexing into the
...
first element of a structure type. Before this would not be handled because
getStructOffset would either stop immediately (because StopEarly was true
and Offset = 0), or blast past the level we wanted.
Now ConvertableToGEP steps down through the type one level at a time, checking
the Offset and Scale conditions at each step
llvm-svn: 1931
2002-03-21 06:27:20 +00:00
Chris Lattner
b874cd9560
Implement the new InsertInstBeforeInst function
...
llvm-svn: 1930
2002-03-21 06:24:00 +00:00
Chris Lattner
0d984ef719
Fix the: test/Regression/Other/2002-03-20-LevelRaiseCrash.ll bug. It turned
...
out that almost always the result of the add was the same as the GEP that
would be generated. In this case, however, it wasn't, so bad things happened.
llvm-svn: 1929
2002-03-21 06:22:23 +00:00
Chris Lattner
14d5ae1ac5
Declare the new InsertInstBeforeInst function
...
llvm-svn: 1927
2002-03-21 06:15:53 +00:00
Chris Lattner
f6c6be2891
1. Fix bug test/Regression/Other/2002-03-20-LevelRaiseBadCodegen.ll
...
2. Allow negative scales in ConvertableToGEP, so that this loop from
alloc_tree in the Olden health benchmark is correctly raised:
for (i = 3; i >= 0; i--)
fval[i] = alloc_tree(level - 1, label*4 + i + 1, new);
Stepping through the array backwards caused a negative scale.
llvm-svn: 1922
2002-03-21 03:04:38 +00:00
Chris Lattner
14fe4c60d4
Namespace qualify debugging code
...
llvm-svn: 1921
2002-03-21 03:02:07 +00:00
Vikram S. Adve
9f129ffe56
Just a comment.
...
llvm-svn: 1908
2002-03-18 03:40:25 +00:00
Vikram S. Adve
98a0150582
New pass to decompose multi-dimensional array references into
...
a sequence of 1-D references, using a sequence of getElementPtrs.
llvm-svn: 1907
2002-03-18 03:39:09 +00:00
Chris Lattner
205373ff74
Remove code designed to compensate for a bug in GCC. The bug has since
...
been fixed.
llvm-svn: 1881
2002-03-15 20:35:21 +00:00
Chris Lattner
60ab10bbef
Cleanup error message output a bit
...
llvm-svn: 1879
2002-03-15 20:21:29 +00:00
Chris Lattner
4ca6cd403f
Fix bug: test/Regression/Other/2002-03-14-LevelRaiseHang.ll
...
llvm-svn: 1869
2002-03-14 16:37:04 +00:00
Chris Lattner
bee86626e1
Fix bug: test/Regression/Other/2002-03-11-InstCombineHang.ll
...
llvm-svn: 1864
2002-03-11 23:28:45 +00:00
Chris Lattner
7e91634005
update comments
...
llvm-svn: 1862
2002-03-11 22:21:04 +00:00
Chris Lattner
7287d698bf
* Fix bug: test/Regression/Other/2002-03-11-LevelRaiseIterInvalidate.ll
...
* Use more concise form of ReplaceInstWithInst to make code simpler
* Output nicer message for dead code eliminated when debugging
llvm-svn: 1861
2002-03-11 22:19:48 +00:00
Chris Lattner
477fe0845a
Fix bug: test/Regression/Other/2002-03-11-ConstPropCrash.ll
...
llvm-svn: 1858
2002-03-11 22:11:07 +00:00
Chris Lattner
7fd7b30727
Fix bug: test/Regression/Other/2002-03-11-LevelRaiseCalls.ll
...
llvm-svn: 1844
2002-03-11 17:27:34 +00:00
Chris Lattner
d7789cb819
We were not correctly burrowing down multiple levels to get to a leaf. Fix this now
...
llvm-svn: 1833
2002-03-07 21:18:00 +00:00
Chris Lattner
717dba9474
Support changing the pointer type of a store for the case where we are
...
storing into the first element of the structure type.
llvm-svn: 1832
2002-03-07 21:17:35 +00:00
Chris Lattner
8032732948
Take CallGraph out of the CFG namespace. It has nothing to do with CFGs
...
llvm-svn: 1820
2002-03-06 17:16:43 +00:00
Chris Lattner
04805fa29c
Change over to use new style pass mechanism, now passes only expose small
...
creation functions in their public header file, unless they can help it.
llvm-svn: 1816
2002-02-26 21:46:54 +00:00
Chris Lattner
d209550828
Move ProfilePaths class into ProfilePaths library, only expose a creation function
...
llvm-svn: 1812
2002-02-26 20:04:59 +00:00
Chris Lattner
570b8e1da8
Pass stuff by reference instead of by copy. Copying entire graphs seems like
...
a bad idea
llvm-svn: 1810
2002-02-26 19:49:45 +00:00
Chris Lattner
18ff945065
Move processGraph down lower in the file so all of the forward declarations
...
can be eliminated.
llvm-svn: 1809
2002-02-26 19:43:49 +00:00
Chris Lattner
5328c6fd97
* Changes to compile successfully with GCC 3.0
...
* Eliminated memory leak in processGraph
* Pass vectors by const reference to moveDummyCode instead of by copy
llvm-svn: 1808
2002-02-26 19:40:28 +00:00
Anand Shukla
a9b9636aca
Makefile for profile-paths
...
llvm-svn: 1807
2002-02-26 19:36:43 +00:00
Anand Shukla
854c302594
Initial checkin: functions on Graph used for path profile pass
...
llvm-svn: 1806
2002-02-26 19:02:16 +00:00
Anand Shukla
70a61383eb
Initial checkin: instrument code to get path execution frequency
...
llvm-svn: 1805
2002-02-26 19:00:48 +00:00
Anand Shukla
d0f8c88e91
Initial checkin: helper file to insert instrumentation code along edges
...
llvm-svn: 1804
2002-02-26 18:59:46 +00:00
Anand Shukla
d3d1fcd08d
Initial check in of graph.cpp: implements graph interface used in path profiles
...
llvm-svn: 1803
2002-02-26 18:58:39 +00:00
Anand Shukla
61a1c1ee56
New makefile to include ProfilePaths dir
...
llvm-svn: 1799
2002-02-26 18:20:27 +00:00
Chris Lattner
f20671a6b6
When inlining basic blocks and instructions, give them a name!
...
llvm-svn: 1796
2002-02-25 00:31:02 +00:00
Chris Lattner
93a0341dbf
Namespaces
...
llvm-svn: 1791
2002-02-24 23:03:09 +00:00
Chris Lattner
ccb9e604de
Handle more cases in the linker
...
llvm-svn: 1771
2002-02-18 19:05:15 +00:00
Chris Lattner
4ed4caf44a
Bug fix for test/Regression/Other/2002-02-14-LevelRaiseBadAssert.ll
...
llvm-svn: 1767
2002-02-14 22:21:40 +00:00
Chris Lattner
aca1090da2
Implement conversion of method pointer parameter in Call instruction
...
to clean up MST benchmark.
llvm-svn: 1763
2002-02-14 19:44:09 +00:00
Chris Lattner
a5ee9139ba
* Check in fix for: llvm/test/Regression/Other/2002-02-14-LevelRaiseInstDelete.ll
...
* Minor reformatting.
llvm-svn: 1760
2002-02-14 18:55:22 +00:00
Chris Lattner
83d485b310
* Pull BasicBlock::pred_* and BasicBlock::succ_* out of BasicBlock.h and into
...
llvm/Support/CFG.h
* Make pred & succ iterators for intervals global functions
* Add #includes that are now neccesary because BasicBlock.h doesn't include
InstrTypes.h anymore
llvm-svn: 1750
2002-02-12 22:39:50 +00:00
Chris Lattner
60a6591d83
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
429a20af4c
Add neccesary #include
...
llvm-svn: 1742
2002-02-12 20:19:06 +00:00
Chris Lattner
50a45782ec
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
12f155a6f0
Initial checkin of new memory -> register promotion pass
...
llvm-svn: 1739
2002-02-12 17:16:22 +00:00
Chris Lattner
86595ae342
General cleanup
...
llvm-svn: 1628
2002-02-01 04:53:48 +00:00
Chris Lattner
f9f2896c48
Eliminate SimplifyCFG.h file, pull everything into the UnifyMethodExitNodes class
...
llvm-svn: 1613
2002-01-31 01:12:06 +00:00
Chris Lattner
352151e222
MethodPass's are now guaranteed to not be run on external methods!
...
llvm-svn: 1611
2002-01-31 00:51:24 +00:00
Chris Lattner
d5d56780e2
Convert xforms over to new pass structure.
...
llvm-svn: 1605
2002-01-31 00:45:11 +00:00
Chris Lattner
ccf571a408
Convert analyses to new pass structure
...
llvm-svn: 1603
2002-01-31 00:42:27 +00:00
Chris Lattner
d5851db315
Remove extraneous #includes
...
llvm-svn: 1588
2002-01-26 22:47:32 +00:00
Chris Lattner
7209dc2446
Remove opt namespace
...
llvm-svn: 1587
2002-01-26 22:47:07 +00:00
Chris Lattner
ccbd4e4643
Implement new DeadInstElmination pass
...
remove old comment
llvm-svn: 1555
2002-01-23 05:48:24 +00:00
Chris Lattner
70090079e7
Don't insert a useless cast
...
llvm-svn: 1527
2002-01-22 03:30:06 +00:00
Chris Lattner
3787ee6be6
Rename LowerAllocations.h to ChangeAllocations.h since it now contains the
...
RaiseAllocations pass as well.
llvm-svn: 1525
2002-01-22 01:04:08 +00:00
Chris Lattner
4f0f09757d
Pull RaiseAllocations stuff out of the CleanGCC pass into it's own pass in
...
the ChangeAllocations.h header file.
llvm-svn: 1522
2002-01-22 00:13:51 +00:00
Chris Lattner
d07471d6c3
LowerAllocations is really a BasicBlock pass. Make it so.
...
llvm-svn: 1521
2002-01-21 23:34:02 +00:00
Chris Lattner
ee965abc36
Move stuff out of the Optimizations directories into the appropriate Transforms
...
directories. Eliminate the opt namespace.
llvm-svn: 1520
2002-01-21 23:17:48 +00:00
Chris Lattner
8cc83611e6
Elminate an unused variable
...
llvm-svn: 1518
2002-01-21 23:16:30 +00:00
Chris Lattner
c940c536ab
Rename SwapStructureContents -> IPO/SimpleStructMutation
...
Move MutateStructTypes.(cpp|h) -> IPO/MutateStructTypes.(cpp|h)
llvm-svn: 1510
2002-01-21 07:52:35 +00:00
Chris Lattner
0686e435d1
Implement a more powerful, simpler, pass system. This pass system can figure
...
out how to run a collection of passes optimially given their behaviors and
charactaristics.
Convert code to use it.
llvm-svn: 1507
2002-01-21 07:31:50 +00:00
Chris Lattner
7f74a56e24
Changes to build successfully with GCC 3.02
...
llvm-svn: 1503
2002-01-20 22:54:45 +00:00
Chris Lattner
ca081257e5
initial checkin
...
llvm-svn: 1480
2001-12-14 16:52:21 +00:00
Chris Lattner
3655cfb4e2
* isFirstClassType is now provided by the Type class
...
* Add ReplaceInstWithInst
llvm-svn: 1468
2001-12-14 16:39:22 +00:00
Chris Lattner
9dedd32ff4
* add ReplaceInstWithInst
...
* Add support for pointer indexing
* Fix minor bugs that are majorly annoying
llvm-svn: 1467
2001-12-14 16:38:59 +00:00
Chris Lattner
b3364fc169
Remove unsized array support
...
llvm-svn: 1466
2001-12-14 16:38:04 +00:00
Chris Lattner
b457653c6f
* Support pointer indexing
...
* Unsized arrays are a thing of the past, remove DoInsertArrayCast family
* Remove cases were we would get into infinite loops because we would insert a cast
which would then be removed, inserting a different cast, ad infinitum...
* Remove some code that should be redundant with ExprTypeConvert code
llvm-svn: 1465
2001-12-14 16:37:52 +00:00
Chris Lattner
3e88b44afc
Many many changes and bugfixes:
...
* Remove support for unsized arrays
* Add pointer indexing support
* Allow more arbitrary malloc type changes (which are too generous currently
and should be fixed in the future)
* Allow more and better conversions
llvm-svn: 1464
2001-12-14 16:35:53 +00:00
Chris Lattner
11439b2360
The proper prototype for malloc returns a pointer, not an unsized array
...
llvm-svn: 1463
2001-12-14 16:32:20 +00:00
Chris Lattner
f1197b0d43
* Refactor trace values to work as a proper pass. Before it used to add
...
methods while the pass was running which was a no no. Now it adds the
printf method at pass initialization
* Revamp code to use printf calls instead of the old style print_<type>
calls.
* Simplify code
llvm-svn: 1457
2001-12-14 16:26:05 +00:00
Chris Lattner
f5c6f65e7f
Assertion could never fail because another one would in it's place. :)
...
llvm-svn: 1449
2001-12-13 00:45:40 +00:00
Chris Lattner
e51379766b
Implement more general conversions for getelementptr instructions
...
llvm-svn: 1432
2001-12-07 04:40:30 +00:00
Chris Lattner
dae4d63ddf
Remove code that is superceeded by code in ExprTypeConvert.cpp
...
llvm-svn: 1431
2001-12-07 04:39:01 +00:00
Chris Lattner
72da4460b3
Don't insert scales of 1 :)
...
llvm-svn: 1430
2001-12-07 04:26:02 +00:00
Chris Lattner
71ffba7b70
We can do cast-add elimination even on casts that reinterpret
...
llvm-svn: 1427
2001-12-06 18:06:13 +00:00
Chris Lattner
b1995e1e69
Fix bug that caused invalid transformations to be applied
...
llvm-svn: 1426
2001-12-06 18:05:55 +00:00
Chris Lattner
674394077f
Actually return true when a change has been made
...
llvm-svn: 1425
2001-12-05 19:41:33 +00:00
Chris Lattner
8d16760c21
Handle more complex array indexing expressions
...
llvm-svn: 1424
2001-12-05 19:41:16 +00:00
Chris Lattner
1d244625c0
Fix pessimizations on sized arrays
...
llvm-svn: 1423
2001-12-05 19:40:32 +00:00
Chris Lattner
ad08d2fd8e
Fix a few bugs. Fix pessimization handling sized arrays
...
llvm-svn: 1422
2001-12-05 19:39:15 +00:00
Chris Lattner
cd7fb504a5
Hrm, don't do debugging output when debugging is off. :(
...
llvm-svn: 1420
2001-12-05 06:40:17 +00:00
Chris Lattner
617aaaad86
Fixes to type conversion stuff to match induction variables more frequently
...
llvm-svn: 1417
2001-12-05 06:34:00 +00:00
Chris Lattner
25b151dfdf
Fix a bug introduced by "internal linkage" work.
...
llvm-svn: 1415
2001-12-04 18:01:49 +00:00
Chris Lattner
d23d752dc5
Fix bugs, don't do external methods which causes segv.
...
llvm-svn: 1414
2001-12-04 08:13:06 +00:00
Chris Lattner
4c160c39b4
Remove printouts
...
llvm-svn: 1413
2001-12-04 08:12:53 +00:00
Chris Lattner
91daaabb56
Implement induction variable simplification
...
llvm-svn: 1411
2001-12-04 04:32:29 +00:00
Chris Lattner
2413b160ec
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
3462ae3ad7
Rename ConstPoolVal -> Constant
...
Rename ConstPool* -> Constant*
Rename ConstPoolVals.h -> ConstantVals.h
llvm-svn: 1407
2001-12-03 22:26:30 +00:00
Chris Lattner
fb5ae02e1a
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
476e6df794
Initial checkin of indvar stuff
...
llvm-svn: 1404
2001-12-03 17:28:42 +00:00
Chris Lattner
f55d8013d9
Compile the scalar directory
...
llvm-svn: 1403
2001-12-03 17:28:15 +00:00
Chris Lattner
5de2204fe8
Create a new #include "Support/..." directory structure to move things
...
from "llvm/Support/..." that are not llvm dependant.
Move files and fix #includes
llvm-svn: 1400
2001-11-27 00:03:19 +00:00
Chris Lattner
54d5928569
Turn off debug info
...
llvm-svn: 1396
2001-11-26 19:36:58 +00:00
Chris Lattner
302014f2e7
Make strings be internal
...
llvm-svn: 1384
2001-11-26 19:14:33 +00:00
Chris Lattner
1416a2992e
Remove debugging output
...
llvm-svn: 1383
2001-11-26 19:14:16 +00:00
Chris Lattner
4219baafb5
Support internal linkage
...
llvm-svn: 1382
2001-11-26 19:14:03 +00:00
Chris Lattner
660c2f0e6f
Build IPO directory
...
llvm-svn: 1381
2001-11-26 18:59:30 +00:00
Chris Lattner
22fd21ed16
Implement support for internal methods
...
llvm-svn: 1380
2001-11-26 18:59:18 +00:00
Chris Lattner
ee568eb459
Include const prop as part of -raise
...
llvm-svn: 1379
2001-11-26 18:58:55 +00:00
Chris Lattner
c4ad64cb9c
Misc cleanups
...
llvm-svn: 1377
2001-11-26 18:57:38 +00:00
Chris Lattner
1f86880af4
Expose constant propogation of an instruction in a clean way
...
llvm-svn: 1376
2001-11-26 18:57:12 +00:00
Chris Lattner
bd422e6686
Implement DCE of global values
...
llvm-svn: 1360
2001-11-26 18:42:17 +00:00
Chris Lattner
330dc57305
Support array indexing
...
llvm-svn: 1345
2001-11-26 17:00:43 +00:00
Chris Lattner
c43c461ca6
Support Composite's, not just structs
...
llvm-svn: 1344
2001-11-26 17:00:13 +00:00
Chris Lattner
03386ec88b
losslessCastableTypes is moved to Type class
...
getStructOffsetType supports array indexing
llvm-svn: 1343
2001-11-26 16:59:47 +00:00
Chris Lattner
2cc6d418fa
Support selectable structure transformations
...
llvm-svn: 1342
2001-11-26 16:59:10 +00:00
Chris Lattner
f80013a917
Support mutation of array indexing
...
llvm-svn: 1341
2001-11-26 16:58:33 +00:00
Chris Lattner
f9378e7d2d
Clean up code, implement array indexing stuff
...
llvm-svn: 1340
2001-11-26 16:58:14 +00:00
Chris Lattner
1df615c834
Implement array indexing reverse engineering
...
llvm-svn: 1339
2001-11-26 16:57:31 +00:00
Vikram S. Adve
b601fda7ce
Print incoming arguments and return values.
...
llvm-svn: 1315
2001-11-15 15:00:16 +00:00
Chris Lattner
02c43c8609
-cleangcc pass now remove type names that are never referenced and type names for pointers to primitive types.
...
llvm-svn: 1312
2001-11-15 04:34:46 +00:00
Chris Lattner
1237e86597
Remove much cruft from the MemAccessInst instruction
...
llvm-svn: 1298
2001-11-14 11:27:58 +00:00
Chris Lattner
abf40ba6e8
Better heuristics for handling arrays
...
llvm-svn: 1296
2001-11-14 11:02:49 +00:00
Chris Lattner
0cd962fa61
* Change ExpressionConvertableToType to more closely match map behavior of
...
ConvertExpressionToType
* Make ValueHandle's remove instruction from maps when they are deleted so that
no false map hits occur if a subsequent instruction is allocated to the same
space in memory. This was a VERY VERY VERY EVIL NASTY BUG to track down. :-P
llvm-svn: 1288
2001-11-13 05:01:36 +00:00
Chris Lattner
4f8e9468cb
Avoid assertion failure when taking size of unsized array. Todo item herE
...
llvm-svn: 1286
2001-11-13 04:59:41 +00:00
Chris Lattner
1643e8ec7b
Fix minor bug
...
llvm-svn: 1273
2001-11-12 20:13:04 +00:00
Ruchira Sasanka
cc3da8c107
Changed insert instructions only for CONSTANTS - back to original
...
llvm-svn: 1271
2001-11-12 19:32:04 +00:00
Chris Lattner
49ec72411e
Initail checking of structure swapper
...
llvm-svn: 1248
2001-11-10 07:28:25 +00:00
Chris Lattner
5dada09565
Initial checkin of structure mutator
...
llvm-svn: 1246
2001-11-10 07:26:31 +00:00
Chris Lattner
0043cc1109
Remove false optimization that basically broke everything
...
llvm-svn: 1219
2001-11-09 01:08:10 +00:00
Chris Lattner
54e9f453c9
* Add better caching of data to avoid silly recusions
...
* Only check to see if uses of instructions can be converted for expressions... so we don't look at all of the uses of a constant. This was making the code unnecessarily conservative
llvm-svn: 1218
2001-11-08 22:06:31 +00:00
Chris Lattner
583e95e0b2
Improve raising significantly
...
llvm-svn: 1214
2001-11-08 20:19:56 +00:00
Vikram S. Adve
3b193679f0
Bug fix: cannot modify Phi operands while iterating over them!
...
llvm-svn: 1203
2001-11-08 05:25:33 +00:00
Chris Lattner
3b7199e36c
Add #includes to enable buiding in Release mode
...
llvm-svn: 1174
2001-11-07 13:49:45 +00:00
Chris Lattner
6c4681ca28
Fix minor bug for shifts
...
llvm-svn: 1160
2001-11-06 21:51:48 +00:00
Chris Lattner
0136101e37
Fix bugs
...
llvm-svn: 1152
2001-11-06 08:34:29 +00:00
Chris Lattner
4031cdde57
Fix many bugs. Implement PHI transforms & other cycles
...
llvm-svn: 1151
2001-11-06 08:34:17 +00:00
Chris Lattner
710c3861b5
Fix bug with ADD nodes and malloc promotion
...
llvm-svn: 1144
2001-11-05 21:13:30 +00:00
Chris Lattner
7e89a616e6
Don't print spurious linking warnings about methods that are never used.
...
Cleanup ExprTypeConvert a bit.
llvm-svn: 1141
2001-11-05 19:43:10 +00:00
Chris Lattner
0ecba60d26
Use the expression map correctly.
...
llvm-svn: 1140
2001-11-05 18:30:53 +00:00
Chris Lattner
db750679a3
New file for expression tree conversion
...
llvm-svn: 1128
2001-11-04 23:24:20 +00:00
Chris Lattner
3084cb65ff
Refactor code to share stuff
...
llvm-svn: 1127
2001-11-04 23:24:06 +00:00
Chris Lattner
cb3da314d9
* Relax restriction that prevented malloc promotion in certain cases
...
llvm-svn: 1125
2001-11-04 22:11:10 +00:00
Chris Lattner
36c5a79153
* Disable debug output
...
* fix minor bug with taking datasize of unsized array type
* Insert code to support speculative changes later
llvm-svn: 1122
2001-11-04 21:32:11 +00:00
Chris Lattner
40a2d9076b
Convert backward conversion of expression trees into a new more powerful bidirectional approach. Add transforms for more instructions.
...
llvm-svn: 1121
2001-11-04 20:21:12 +00:00
Chris Lattner
33d9cb9903
Minor method rename
...
llvm-svn: 1119
2001-11-04 08:08:34 +00:00
Chris Lattner
f00563d39d
Add transformations for Load and GetElementPtr. Fix broken transform with shr.
...
llvm-svn: 1118
2001-11-04 07:42:17 +00:00
Chris Lattner
eb7b620d58
Fix cast instructions that end up in bad places in GCC output
...
llvm-svn: 1117
2001-11-04 07:40:51 +00:00
Chris Lattner
033324fc0c
Avoid making a broken transformation!
...
llvm-svn: 1115
2001-11-03 21:30:22 +00:00
Chris Lattner
ec83fc091e
Add new cleanup pass:
...
// 1. PHI nodes with multiple entries for the same predecessor. GCC sometimes
// generates code that looks like this:
//
// bb7: br bool %cond1004, label %bb8, label %bb8
// bb8: %reg119 = phi uint [ 0, %bb7 ], [ 1, %bb7 ]
//
// which is completely illegal LLVM code. To compensate for this, we insert
// an extra basic block, and convert the code to look like this:
//
// bb7: br bool %cond1004, label %bbX, label %bb8
// bbX: br label bb8
// bb8: %reg119 = phi uint [ 0, %bbX ], [ 1, %bb7 ]
//
llvm-svn: 1114
2001-11-03 21:08:59 +00:00
Chris Lattner
784c623efb
* Export method to merge identically named methods
...
* Add code to fix PHI nodes that are missing arguments. These PHI nodes can
be generated by GCC if there is an uninitialized variable flowing into a merge
point. For example:
int foo(int y) {
int X;
if (y) X = 1;
return X;
}
llvm-svn: 1110
2001-11-03 19:51:56 +00:00
Ruchira Sasanka
629a15247a
Commented out code so that copies are inserted for all phi args
...
CahedCopyMap was disabled to insert phi elimination code for all phi args
llvm-svn: 1105
2001-11-03 17:09:59 +00:00
Chris Lattner
629d7a7849
Changes to compile the TSP benchmark successfully. Favor warning instead of assertion failures.
...
llvm-svn: 1103
2001-11-03 10:04:22 +00:00
Chris Lattner
1f3947c1d1
Add code to link method together with the same name if one is vararg and the other isn't.
...
This resolves definitions like this:
%list * "foo"(...)
%list * "foo"(int)
together which can often occur because C programmers don't put prototypes in like they should. GRR
llvm-svn: 1102
2001-11-03 09:19:00 +00:00
Chris Lattner
3855f2c806
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
1e60d6b762
Add extra code for debugging linker problems
...
llvm-svn: 1091
2001-11-03 03:27:29 +00:00
Chris Lattner
9bc6b190cc
* Add comments for peepholes
...
* Implement new peephole:
// Peephole optimize the following instructions:
// %t1 = cast {<...>} * %StructPtr to <ty> *
//
// Into: %t2 = getelementptr {<...>} * %StructPtr, <0, 0, 0, ...>
// %t1 = cast <eltype> * %t1 to <ty> *
This peephole eliminated 9 evil casts in the health benchmark, and
completely turned the addList method around. :)
llvm-svn: 1085
2001-11-01 17:05:27 +00:00
Chris Lattner
71c842cddf
Add DCE as integral part of the level raising to avoid processing instructions that are dead
...
llvm-svn: 1084
2001-11-01 07:00:51 +00:00
Chris Lattner
7567f6c15f
Expose the low level DCE mechanism to external users
...
Refactor code to support it
llvm-svn: 1083
2001-11-01 07:00:27 +00:00
Chris Lattner
9a13ececd8
* Implement expression type conversion for constant values
...
* Fix a problem setting a name on a constant value that died because no symbol table was passed in
* Add some comments describing the passes
* Implement a new peephole:
// Peephole optimize the following instructions:
// %t = cast <T1>* %P to <T2> * ;; If T1 is losslessly convertable to T2
// store <T2> %V, <T2>* %t
//
// Into:
// %t = cast <T2> %V to <T1>
// store <T1> %t2, <T1>* %P
llvm-svn: 1080
2001-11-01 05:57:59 +00:00
Chris Lattner
04648a4cc6
Simplify DCE code a lot
...
llvm-svn: 1079
2001-11-01 05:55:29 +00:00
Chris Lattner
1267be2319
* Convert getelementptr/store pairs into a single store
...
* Convert getelementptr/load pairs into a single load
llvm-svn: 1075
2001-11-01 03:12:34 +00:00
Chris Lattner
025f9fcf80
Initial checkin of level raising code, after move and cleanup and expands from the opt directory
...
llvm-svn: 1074
2001-11-01 02:42:08 +00:00
Chris Lattner
246f157af4
Propogate name to the malloc itself instead of to the cast
...
llvm-svn: 1071
2001-11-01 02:40:36 +00:00
Chris Lattner
7e6a0d8c17
Use the correct prototype for malloc and free
...
llvm-svn: 1066
2001-10-31 06:36:23 +00:00
Chris Lattner
20726ed31b
Implement code to convert %malloc and %free FUNCTION CALLS into the instruction equivalent
...
llvm-svn: 1065
2001-10-31 06:35:59 +00:00
Chris Lattner
9db8b765cd
Implemented constant propogation of cast instructions
...
llvm-svn: 1064
2001-10-31 05:07:57 +00:00
Chris Lattner
34b9518c88
Initial version of GCC cleanup pass: just removes extraneous global symbol table entries for types
...
llvm-svn: 1062
2001-10-31 04:33:19 +00:00
Chris Lattner
2a2b531294
Fix bug when inlining a method that refers to a global variable
...
llvm-svn: 1056
2001-10-31 02:27:26 +00:00
Chris Lattner
cba9036e34
Fix broken assertion. Didn't allow for pointer case
...
llvm-svn: 1034
2001-10-29 17:27:38 +00:00
Chris Lattner
3e95c716aa
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
Vikram S. Adve
66aea7a58c
Make newlines be newlines! This should now work in both lli and native code.
...
llvm-svn: 1016
2001-10-28 22:44:02 +00:00
Chris Lattner
fc361b1d55
Remove non linking related stuff
...
llvm-svn: 1015
2001-10-28 22:43:06 +00:00
Vikram S. Adve
6e26c8b0fc
Added name-mangling routines for future use.
...
llvm-svn: 1003
2001-10-28 21:38:02 +00:00
Vikram S. Adve
96f6ac9ffc
Use separate functions for printing values of each type.
...
Put trace code before condition-generating instruction in basic blocks
that end in a conditional branch.
llvm-svn: 1002
2001-10-28 21:37:25 +00:00
Chris Lattner
b046867a97
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
e2c61267ad
Refix bugs, stop using deprecated strstream header
...
llvm-svn: 898
2001-10-18 20:06:03 +00:00
Chris Lattner
4816d63844
Initial checkin
...
llvm-svn: 897
2001-10-18 20:05:37 +00:00
Vikram S. Adve
a0db1c9a0e
Only print values live at BB or method exit, and insert loads at each
...
BB exit to read and print values stored in that BB. Note that only
these stored values are live at method exit!. Also, print messages at
method entry and exit.
llvm-svn: 892
2001-10-18 18:16:11 +00:00
Vikram S. Adve
7ac553aa12
Handle multiple exit blocks correctly.
...
Restore string variable cache.
Resurrect code to use formatted printing instead of PrintVal
but leave it turned off for now.
llvm-svn: 888
2001-10-18 13:49:22 +00:00
Chris Lattner
5309e10be1
Convert to be compatible with lli.
...
Need to eliminate duplicate \n entries
llvm-svn: 883
2001-10-18 06:03:05 +00:00
Chris Lattner
a0a8b5bc26
Massive hacks to try to fix subtle logic bugs. I think it's all working now,
...
at least what used to. I should disable method exit code completely because
it's broken (doesn't insert just post dominating values)
llvm-svn: 881
2001-10-18 05:28:08 +00:00
Chris Lattner
6fea0324d7
Convert to new simpler pass itf
...
llvm-svn: 880
2001-10-18 05:27:33 +00:00
Chris Lattner
5398a6eb6c
Convert optimizations to the pass infrastructure
...
llvm-svn: 873
2001-10-18 01:32:34 +00:00
Chris Lattner
1bb5f8e4ee
Add new Pass infrastructure and some examples
...
llvm-svn: 836
2001-10-15 17:31:51 +00:00
Chris Lattner
162ed4d6cc
Rename ConstPoolPointerReference to ConstPoolPointerRef - My fingers get tired typing that much
...
llvm-svn: 822
2001-10-15 13:21:42 +00:00
Chris Lattner
1afbdc0ea5
* getExitNode() doesn't exist in method anymore
...
* Make local functions static
llvm-svn: 820
2001-10-15 13:07:21 +00:00
Vikram S. Adve
9a35320053
Added Instrumentation subdirectory.
...
llvm-svn: 819
2001-10-15 12:01:05 +00:00
Chris Lattner
c306f18c3e
Implement linking of global variable constant references
...
llvm-svn: 817
2001-10-15 03:12:52 +00:00
Chris Lattner
a972919f92
Minor cleanup
...
llvm-svn: 812
2001-10-14 23:29:30 +00:00
Chris Lattner
1090dc96ff
Implement linker. It's 95% working now.
...
llvm-svn: 810
2001-10-14 23:29:15 +00:00
Vikram S. Adve
a200a6c583
Insert code to trace values at basic block and method exits.
...
Current version does not check for liveness.
llvm-svn: 800
2001-10-14 23:18:45 +00:00
Chris Lattner
1362299644
Check in makefile
...
llvm-svn: 788
2001-10-13 16:57:03 +00:00
Chris Lattner
b7b537f192
Start of a linker
...
llvm-svn: 775
2001-10-13 07:03:50 +00:00
Chris Lattner
f0b68888af
Support the invoke instruction
...
llvm-svn: 765
2001-10-13 06:52:41 +00:00
Chris Lattner
cfc2f446a6
Support indirect calls
...
llvm-svn: 764
2001-10-13 06:52:31 +00:00
Chris Lattner
da55810666
Commit more code over to new cast style
...
llvm-svn: 697
2001-10-02 03:41:24 +00:00
Chris Lattner
3856934386
Convert more code to use new style casts
...
Eliminate old style casts from value.h
llvm-svn: 696
2001-10-01 20:11:19 +00:00
Chris Lattner
8f19112923
Add more support for new style casts
...
Convert more code to use them
llvm-svn: 695
2001-10-01 18:26:53 +00:00
Chris Lattner
4b717c0edc
Add support for new style casts
...
llvm-svn: 694
2001-10-01 16:18:37 +00:00
Chris Lattner
ba1c1f2fb6
Pull predecessor and successor iterators out of the CFG*.h files, and plop them into
...
the BasicBlock class where they should be. pred_begin/pred_end become methods on BasicBlock,
and the cfg namespace isn't used anymore.
llvm-svn: 691
2001-10-01 13:19:53 +00:00
Chris Lattner
bb09a10929
Pull iterators out of CFG.h and CFGdecls and put them in Support directory
...
llvm-svn: 664
2001-09-28 22:56:31 +00:00
Chris Lattner
b271be3185
ADCE is broken but at least we know why
...
llvm-svn: 656
2001-09-28 00:06:42 +00:00
Chris Lattner
acfd27d502
Make ADCE more robust, it still has problems, but it's getting closer
...
llvm-svn: 521
2001-09-09 22:26:47 +00:00
Chris Lattner
d707ec62b6
Types and constants are wierd things in symbol tables now
...
llvm-svn: 457
2001-09-07 16:43:50 +00:00
Chris Lattner
dae05dc937
* Eliminate reference to ConstantPool class
...
* Constants are global objects that are not allocated or freed
llvm-svn: 456
2001-09-07 16:43:22 +00:00
Chris Lattner
e57fc205f4
Constant pool is dead
...
llvm-svn: 455
2001-09-07 16:42:51 +00:00
Chris Lattner
6d7bce9f3c
Constants are now global unique objects
...
llvm-svn: 454
2001-09-07 16:42:26 +00:00
Chris Lattner
07e158de3c
* Eliminate constant pool dependancies:
...
* Eliminate DoRemoveUnusedConstants
llvm-svn: 453
2001-09-07 16:42:08 +00:00
Chris Lattner
030772df99
* Supoprt global constants
...
* Remove support for local constant pools
* Eliminate constant pool merging method, which is no longer neccesary
* Disable invalid optimization (todo: fix it)
llvm-svn: 452
2001-09-07 16:41:30 +00:00
Chris Lattner
b62b602fe2
Enable the elimination of method prototypes that are not referenced
...
llvm-svn: 325
2001-07-28 17:51:49 +00:00
Chris Lattner
e2472bbf6c
Moved inline/llvm/Tools/* to include/llvm/Support/*
...
llvm-svn: 279
2001-07-23 17:46:59 +00:00
Chris Lattner
3e37ec7c0a
Support external methods
...
llvm-svn: 200
2001-07-15 21:43:45 +00:00
Chris Lattner
5451c9e977
Add knowledge about the struct form of the GetElementPtr instruction
...
llvm-svn: 183
2001-07-14 06:11:51 +00:00
Chris Lattner
5b1200bf8e
Remove dependency on the structure of ValueHolder.
...
llvm-svn: 182
2001-07-14 06:11:26 +00:00
Chris Lattner
d6c5a769ea
Don't clean out the type plane of the constant pool... this is a hack. FIXME
...
llvm-svn: 172
2001-07-09 19:38:52 +00:00
Chris Lattner
31feae8550
Implement checking for new instructions
...
llvm-svn: 163
2001-07-08 21:18:49 +00:00
Chris Lattner
fb8ed0cf3a
Use the CDG to mark branches alive on demand.
...
llvm-svn: 159
2001-07-08 18:38:36 +00:00
Chris Lattner
a682182f64
Neg instruction removed. Cast instruction implemented.
...
llvm-svn: 156
2001-07-08 04:57:15 +00:00
Chris Lattner
b1ca9cbceb
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
a073acb22d
Changed the fundemental architecture of Operands for Instructions. Now
...
Operands are maintained as a vector<Use> in the User class, and operator
iterators are provided as before. Getting an operand no longer requires
a virtual function call.
WARNING: getOperand(x) where x >= getNumOperands() will now assert instead
of returning null!
llvm-svn: 149
2001-07-07 08:36:50 +00:00
Chris Lattner
29aae157f7
Add method to unify all exit nodes of a method
...
llvm-svn: 143
2001-07-06 16:58:36 +00:00
Chris Lattner
8024bde7c7
Update to include right file
...
llvm-svn: 138
2001-07-06 16:32:07 +00:00
Chris Lattner
b28986ffc7
Initial checkin. Should print dead instructions, except it doesn't do
...
control dependencies. :(
llvm-svn: 119
2001-06-30 06:39:11 +00:00
Chris Lattner
1960b3c6d2
Rename DoSparseConditionalConstantProp -> DoSCCP
...
llvm-svn: 117
2001-06-30 06:37:43 +00:00
Chris Lattner
d42d492734
Optimizations got their own header files
...
Optimizations now live in the 'opt' namespace
include/llvm/Opt was renamed include/llvm/Optimizations
llvm-svn: 113
2001-06-30 04:36:40 +00:00
Chris Lattner
7ce8b17e60
Export ConstantFoldTerminator, allow it to fold conditional branches to
...
the same label.
llvm-svn: 107
2001-06-29 23:56:58 +00:00
Chris Lattner
10b250eb4d
Added documentation. Constant fold terminators.
...
llvm-svn: 106
2001-06-29 23:56:23 +00:00
Chris Lattner
84f07396d3
* Factored RemovePredecessorFromBlock into BasicBlock::removePredecessor
...
* Avoid messing around with this case:
br label %A
%A: br label %A
* Enable optimizations that are correct now.
llvm-svn: 102
2001-06-29 05:24:28 +00:00
Chris Lattner
e4abb60948
We need to make sure to remove PHI nodes in the successor that cannot be
...
executed when removing branch dest.
llvm-svn: 101
2001-06-29 05:23:10 +00:00
Chris Lattner
4cee8d8ffb
Miscellaneous cleanups:
...
* Convert post to pre-increment for for loops
* Use generic programming more
* Use new Value::cast* instructions
* Use new Module, Method, & BasicBlock forwarding methods
* Use new facilities in STLExtras.h
* Use new Instruction::isPHINode() method
llvm-svn: 96
2001-06-27 23:41:11 +00:00
Chris Lattner
347389dae8
Add a new Sparse Conditional Constant Propogation pass
...
llvm-svn: 95
2001-06-27 23:38:11 +00:00
Chris Lattner
1a67fb8860
Misc cleanup
...
llvm-svn: 91
2001-06-27 23:36:09 +00:00
Chris Lattner
f222bf33c3
* Expose DoConstantPoolMerging
...
* Cleanups (post->pre increment, new cleaner API, etc)
* Moved stuff into ConstantHandling.h
llvm-svn: 90
2001-06-27 23:35:26 +00:00
Chris Lattner
dbdaaef7d5
Implement induction variable injection!
...
llvm-svn: 75
2001-06-25 07:32:19 +00:00
Chris Lattner
c3a6f546de
A silly stupid test of the loop depth calculator was added. REMOVE in the
...
future.
llvm-svn: 72
2001-06-25 03:55:37 +00:00
Chris Lattner
f64a8936e5
#include a different header due to Intervals.h splitting up
...
llvm-svn: 63
2001-06-24 04:05:45 +00:00
Chris Lattner
4c4f178723
Implement a lot more functionality. Now loop invariant and linear
...
induction variables are correctly identified.
llvm-svn: 57
2001-06-22 02:24:38 +00:00
Chris Lattner
b20a15d334
Moved printing code to the Assembly/Writer library.
...
Code now detects looping intervals
llvm-svn: 52
2001-06-21 05:27:22 +00:00
Chris Lattner
778de94723
Get rid of a silly printout that isn't needed right now
...
llvm-svn: 45
2001-06-20 23:09:39 +00:00
Chris Lattner
f86e38e452
Add capability to print a derived interval graph
...
llvm-svn: 42
2001-06-20 22:44:38 +00:00
Chris Lattner
d286a997d3
Add a test case for interval code
...
llvm-svn: 36
2001-06-20 19:27:11 +00:00
Chris Lattner
5ba5f88c35
Updates to work with new cfg namespace
...
llvm-svn: 29
2001-06-13 19:55:22 +00:00
Chris Lattner
874ddadf72
Updates to support
...
* Changes in PHI node structure
llvm-svn: 25
2001-06-11 15:04:40 +00:00
Chris Lattner
7e0d6e05ac
Updated to work with new CFG.h file.
...
llvm-svn: 15
2001-06-07 21:18:45 +00:00
Chris Lattner
d821c2af37
Significant rework. DCE is still not done (see #ifdef'd out parts)
...
but at least the stuff that is checked in, now works.
llvm-svn: 10
2001-06-07 16:59:26 +00:00
Chris Lattner
2f7c963559
Initial revision
...
llvm-svn: 2
2001-06-06 20:29:01 +00:00