Chris Lattner
cb8c2d31c2
Straighten out makefiles after moving code to new Transform Utils library
...
llvm-svn: 2520
2002-05-07 18:18:26 +00:00
Chris Lattner
0b8c2d8b29
Factor code out to the Transform Utils library
...
llvm-svn: 2519
2002-05-07 18:18:00 +00:00
Chris Lattner
c5a6d978b8
Reduce dependance on TransformInternals.h, instead using the TransformUtils library
...
llvm-svn: 2518
2002-05-07 18:12:18 +00:00
Chris Lattner
a35a291f7b
Add #include no longer included by llvm/Transforms/Scalar/ConstantProp.h
...
llvm-svn: 2517
2002-05-07 18:11:30 +00:00
Chris Lattner
c099f62190
Factor code out to the TransformUtils library
...
llvm-svn: 2516
2002-05-07 18:10:55 +00:00
Chris Lattner
7b20305ef9
Factor code out of TransformInternals into the Transform Utils library
...
llvm-svn: 2515
2002-05-07 18:09:15 +00:00
Chris Lattner
e817245564
Build Transforms Utils library
...
llvm-svn: 2514
2002-05-07 18:08:50 +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
394781b660
* 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
4a830e1a4a
* 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
6b0fe18eb2
Finish up the updates to the language reference
...
llvm-svn: 2509
2002-05-06 22:08:29 +00:00
Chris Lattner
44c4a3f18f
Mark analyses that only depend on the CFG of a function
...
llvm-svn: 2507
2002-05-06 19:32:07 +00:00
Chris Lattner
06c3ae573f
Make functions that preserve the CFG not invalidate analyses that only depend
...
on the CFG of a function
llvm-svn: 2506
2002-05-06 19:31:52 +00:00
Chris Lattner
bd5095f570
Add support for passes to announce that they only depend on the CFG of a
...
function. This is crude but effective
llvm-svn: 2505
2002-05-06 19:31:16 +00:00
Chris Lattner
ca538273d4
Only do masking for unsigned values!
...
llvm-svn: 2504
2002-05-06 18:54:59 +00:00
Chris Lattner
ee7b1b29a9
GCSE is faster than SCCP, and it makes SCCP's job easier, so run it first.
...
llvm-svn: 2503
2002-05-06 18:54:12 +00:00
Chris Lattner
66ff017174
* 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
24ebec1273
Handle X = phi Y --> X = Y
...
llvm-svn: 2501
2002-05-06 18:06:38 +00:00
Chris Lattner
8866ffa232
Make the testcase more interesting so that DCE does not eliminate it.
...
Use DIE instead of DCE anyway
llvm-svn: 2500
2002-05-06 17:59:23 +00:00
Chris Lattner
7d13e2f392
Move a bunch of code to a .cpp file, don't #include Instruction.h
...
llvm-svn: 2499
2002-05-06 17:54:50 +00:00
Chris Lattner
e2242ebf8e
Move code out of header file
...
llvm-svn: 2498
2002-05-06 17:54:27 +00:00
Chris Lattner
910ca80941
* 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
47fb300c56
Add #include removed from ConstantHandling.h
...
llvm-svn: 2496
2002-05-06 17:53:10 +00:00
Chris Lattner
8d68e13ccb
New testcase for PHI folding
...
llvm-svn: 2495
2002-05-06 17:43:38 +00:00
Chris Lattner
b40c1bf6f7
Clean up ADCE by removing extraneous wrapper class
...
llvm-svn: 2494
2002-05-06 17:27:57 +00:00
Chris Lattner
c5279917bc
Combine not (not X) -> X
...
llvm-svn: 2493
2002-05-06 17:03:21 +00:00
Chris Lattner
a067255180
New testcase to make sure not instructions get combined
...
llvm-svn: 2492
2002-05-06 17:00:47 +00:00
Chris Lattner
6ba1c2d113
Instruction Combination can create a ton of trivially dead instructions. Remove
...
them with an DIE pass before more expensive optimizations are run.
llvm-svn: 2491
2002-05-06 16:52:15 +00:00
Chris Lattner
24a94a50d8
Support more cases...
...
llvm-svn: 2490
2002-05-06 16:49:18 +00:00
Chris Lattner
a7c5a80fa8
More tests
...
llvm-svn: 2489
2002-05-06 16:44:53 +00:00
Chris Lattner
f5ca08da87
Add testcase for -(-A)
...
llvm-svn: 2488
2002-05-06 16:19:16 +00:00
Chris Lattner
8898eec72c
Change usage of isPointerType to use isa
...
llvm-svn: 2487
2002-05-06 16:15:49 +00:00
Chris Lattner
fd8d5b852c
Replace all usages of Type::isPointerType with isa<PointerType>
...
llvm-svn: 2486
2002-05-06 16:15:30 +00:00
Chris Lattner
17ac289374
Implement getPrimitiveSize()
...
don't use isPointerType()
llvm-svn: 2485
2002-05-06 16:14:39 +00:00
Chris Lattner
24ebdf3f74
Add many more instruction combination simplifications
...
llvm-svn: 2484
2002-05-06 16:14:14 +00:00
Chris Lattner
3bab8f6123
* Add getPrimitiveSize method
...
* Remove isPointerType, isMethodType, etc... methods. Use isa<> instead
* Added specialization of isa for pointer types so that DerivedTypes.h doesn't
have to be #included to use isa<PointerType>(..)
llvm-svn: 2483
2002-05-06 16:12:53 +00:00
Chris Lattner
a81c619d2b
Fix testcase, the 'shift out all bits' doesn't apply to signed types.
...
llvm-svn: 2482
2002-05-06 16:11:31 +00:00
Chris Lattner
07c6629280
Void and Label values cannot be acted on directly so they have zero size
...
llvm-svn: 2481
2002-05-06 15:10:15 +00:00
Chris Lattner
4e94e9328e
More testcases I don't want to forget about
...
llvm-svn: 2480
2002-05-06 05:51:26 +00:00
Chris Lattner
c019944886
New testcases so I don't forget about these algebraic simplifications
...
llvm-svn: 2479
2002-05-06 05:43:36 +00:00
Chris Lattner
36af244bcb
New testcase so I don't forget about this.
...
llvm-svn: 2478
2002-05-06 05:35:20 +00:00
Chris Lattner
34a909060c
Testcase for missed merge opportunity
...
llvm-svn: 2477
2002-05-06 03:11:32 +00:00
Chris Lattner
0ba1f2e45f
Run DCE AFTER SCCP and GCSE!
...
llvm-svn: 2476
2002-05-06 03:04:17 +00:00
Chris Lattner
bc54decdc7
Build CFGsimplify directory
...
llvm-svn: 2475
2002-05-06 03:03:55 +00:00
Chris Lattner
c0699e7040
Updated documentation a _LOT_
...
llvm-svn: 2474
2002-05-06 03:03:22 +00:00
Chris Lattner
728a84e0f7
Remove dead code
...
llvm-svn: 2473
2002-05-06 03:03:09 +00:00
Chris Lattner
ef7f8fc474
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
d12eac0b1b
Implement constant propogation of shift instructions
...
llvm-svn: 2471
2002-05-06 03:01:37 +00:00
Chris Lattner
5b5663b806
Implement constant propogation of shifts
...
llvm-svn: 2470
2002-05-06 03:00:54 +00:00
Chris Lattner
dfb7d63b15
Print functions with curly braces instead of begin/end
...
llvm-svn: 2469
2002-05-06 03:00:40 +00:00