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
Chris Lattner
2d5135d9bd
Add a range remove method
...
llvm-svn: 2468
2002-05-06 02:59:52 +00:00
Chris Lattner
1d4e297a65
Implement two iterator remove method
...
llvm-svn: 2467
2002-05-06 02:59:34 +00:00
Chris Lattner
3b5ee47ef6
Initial testcases for CFG simplify (which is part of DCE for now)
...
llvm-svn: 2466
2002-05-06 02:37:38 +00:00
Chris Lattner
4362f06ccf
Test moved to SCCP test directory
...
llvm-svn: 2465
2002-05-06 00:52:06 +00:00
Chris Lattner
7c3c3eefcc
Implement remainder
...
Fix implementation of Not
llvm-svn: 2464
2002-05-03 21:41:07 +00:00
Chris Lattner
a0965456d0
Implement remainder
...
llvm-svn: 2463
2002-05-03 21:40:37 +00:00
Chris Lattner
578cb6582b
New testcase for bugs in the constant propogator
...
llvm-svn: 2462
2002-05-03 20:25:40 +00:00
Chris Lattner
bc361e36af
Add tests for floating point remainder elimination
...
llvm-svn: 2461
2002-05-03 20:16:29 +00:00
Chris Lattner
36afb8ee65
New testcase to see if constant propogation of remainder is implemented
...
llvm-svn: 2460
2002-05-03 20:14:21 +00:00
Chris Lattner
e7533432aa
This testcase is a sanity check
...
llvm-svn: 2459
2002-05-03 20:12:31 +00:00
Chris Lattner
0c91866478
Fix bug: test/Regression/Transforms/SCCP/2002-05-03-NotOperator.ll
...
by using the ~ operator instead of !
llvm-svn: 2458
2002-05-03 20:09:52 +00:00
Chris Lattner
6635b10155
Add new testcase for general constant prop.
...
llvm-svn: 2457
2002-05-03 19:58:17 +00:00
Chris Lattner
3acc1de80e
Add const prop pass to eliminate dead branches
...
llvm-svn: 2456
2002-05-03 19:57:16 +00:00
Chris Lattner
beb2a36b9e
Implement the NOT operator.
...
llvm-svn: 2455
2002-05-03 19:52:30 +00:00
Chris Lattner
ecd7d90e2c
We currently don't allow unresolved opaque types!
...
llvm-svn: 2453
2002-05-03 18:32:40 +00:00
Chris Lattner
09a356bd6a
Add -d switch to test AsmWriter as well
...
llvm-svn: 2452
2002-05-03 18:31:30 +00:00
Chris Lattner
5369a645e6
Allow open/closing curly braces instead of begin/end to define the body of a function
...
llvm-svn: 2451
2002-05-03 18:23:48 +00:00
Chris Lattner
0faae7983c
Eliminate usage of function level constant pool
...
llvm-svn: 2450
2002-05-02 21:52:35 +00:00
Chris Lattner
432dc486c2
Use unified diffs with gnu diff instead of old diffs
...
llvm-svn: 2449
2002-05-02 21:51:55 +00:00
Chris Lattner
9606fd4830
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
de442f70ac
Oops, disable debugging code all the way. :)
...
llvm-svn: 2447
2002-05-02 21:47:40 +00:00
Chris Lattner
7d4f3ed1f2
* 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
b30088a50d
* 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
4ffce19c71
More testcases for SCCP
...
llvm-svn: 2444
2002-05-02 20:41:39 +00:00
Chris Lattner
28a8acc476
* 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
4d656517dc
Additional testcase
...
llvm-svn: 2442
2002-05-02 20:19:11 +00:00