Chris Lattner
b621decdad
remove deprecated getInstType() method
...
llvm-svn: 2595
2002-05-10 13:28:47 +00:00
Chris Lattner
35cc0d2027
Expose the pi node insertion pass.
...
llvm-svn: 2594
2002-05-10 05:41:49 +00:00
Chris Lattner
014ee634ce
Initial checkin of the PiNodeInsertion pass
...
llvm-svn: 2593
2002-05-10 05:41:34 +00:00
Chris Lattner
f3d6e41d29
Add prototype for the PiNodeInserter pass
...
llvm-svn: 2592
2002-05-10 05:40:37 +00:00
Chris Lattner
3b13b58ef0
Test the Pi node inserter
...
llvm-svn: 2591
2002-05-10 05:38:39 +00:00
Chris Lattner
6a4fa1c8b5
Initial checkin of testcases for Pi node inserter
...
llvm-svn: 2590
2002-05-10 05:38:18 +00:00
Chris Lattner
e291226f02
Last minor cleanups, this code still does not work for all cases, but it
...
works much better than it used to.
llvm-svn: 2588
2002-05-09 21:31:18 +00:00
Chris Lattner
d4c569c973
Two Cleanups to generated C code:
...
1. Avoid printing *(&globalvariable), instead print globalvariable alone
as a special case.
2. Inline subexpressions into expressions as much as legal that preserves
execution characteristics of expressions. Now we get nice (but
over-parenthesized, oh well) things like:
ltmp_428_7 = spec__putc(((unsigned char )((bsBuff) >> 24)), (bsStream));
instead of five seperate instructions (bsBuff & bsStream are globals).
llvm-svn: 2587
2002-05-09 21:18:38 +00:00
Chris Lattner
5d190e2192
* Remove CInstPrintVisitor class, incorporating it into the CWriter class
...
* Reorder code in the file to make it more logically laid out.
llvm-svn: 2586
2002-05-09 20:53:56 +00:00
Chris Lattner
2051c06119
Remove CLocalVars data structure entirely, instead of building stuff and
...
then printing it out, just print as we go.
llvm-svn: 2585
2002-05-09 20:39:03 +00:00
Chris Lattner
5166d35e5d
Simplify code by removing InstLocalVarsVisitor, replacing it with a simple
...
inst_iterator.
llvm-svn: 2584
2002-05-09 20:33:35 +00:00
Chris Lattner
30ad3a3238
* Clean up how PHI nodes are handled
...
* Correct global variable references
* Fix loads & stores with zero indices
* Do not emit an else part of a branch if there is no code (no phi node
and a fallthrough branch), makes code more readable to get:
if (l2_cond240) {
goto l13_bb10;
}
with no else{} branch
llvm-svn: 2583
2002-05-09 20:14:10 +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
ce59a3d5f5
New testcase for wierd combine opportunity found in bzip2 benchmark
...
llvm-svn: 2580
2002-05-09 19:52:36 +00:00
Chris Lattner
48cd6330d7
Emit:
...
l3_reg109 = l81_this->field0;
Instead of:
l3_reg109 = l81_this[0u].field0;
where possible
llvm-svn: 2579
2002-05-09 15:59:50 +00:00
Chris Lattner
4933e7e02d
* Print structures types correctly
...
* Clean up generated code to not emit basic block labels and goto
instructions if they are unneccesary (for example, fall throughs)
llvm-svn: 2578
2002-05-09 15:49:41 +00:00
Chris Lattner
132ba2a411
* Continue cleanup of type printing code
...
* Print a newline after a malloc instruction
* Convert unprintable characters to x_ instead of _x so that we don't
generate identifiers that start with underscores
llvm-svn: 2577
2002-05-09 15:18:52 +00:00
Chris Lattner
eed155e6a0
Gut the type printing code so there is only one copy of it instead of 3
...
llvm-svn: 2576
2002-05-09 14:40:11 +00:00
Chris Lattner
c99a44eb25
* Remove dead "constant printing" code
...
* Mangle names with only a prefix so that they are easier on the eyes.
* Put spaces around binary operators with low precedence to make them easier to read
* Don't prefix function names with &, although it's correct, it's unnecesary and
easier to read without it.
llvm-svn: 2575
2002-05-09 05:16:40 +00:00
Chris Lattner
1532dbfead
Remove gross "Operand" instance variable
...
Remove lots of unneccesary arguments to methods
llvm-svn: 2574
2002-05-09 04:39:00 +00:00
Chris Lattner
c897bddb17
Simplify and clean up function calls.
...
Now indirect function calls work, except that function pointer types are not correct.
llvm-svn: 2573
2002-05-09 04:21:21 +00:00
Chris Lattner
2fca988a57
* Remove dead function
...
* Print C strings correctly
* Expand C escape sequences nicely (ie \n \t, etc get generated instead of hex escapes)
llvm-svn: 2572
2002-05-09 03:56:52 +00:00
Chris Lattner
af14c8d51f
Make Getelementptr, load & store all work the right way.
...
Handle global variables correctly.
llvm-svn: 2571
2002-05-09 03:50:42 +00:00
Chris Lattner
7fbd831ce5
Many random fixes:
...
* Use binary operator logic for shifts instead of cloning code
* Unary not is '~' not '!'
llvm-svn: 2570
2002-05-09 03:28:37 +00:00
Chris Lattner
ec8243a8d4
Incorporate and purge function before and after printing them so unnamed values
...
have some hope of working right.
Function calls do not try to emit an lvalue if they return void.
llvm-svn: 2569
2002-05-09 03:12:34 +00:00
Chris Lattner
234ad49817
Factor out the code to print a value to ONE place.
...
It turns out that unnamed values DO NOT work at all, that's next on the list.
llvm-svn: 2568
2002-05-09 03:06:06 +00:00
Chris Lattner
eabc647e7c
First wave of cleanups, looks like the first of many.
...
llvm-svn: 2567
2002-05-09 02:28:59 +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
c5a41d8af1
Fix broken testcase
...
llvm-svn: 2565
2002-05-09 01:28:30 +00:00
Chris Lattner
e693f33937
Clean up dis so that it does not print out code in various traversal orders.
...
Now it only output llvm or C code.
llvm-svn: 2564
2002-05-09 01:25:55 +00:00
Chris Lattner
936e9f0e49
Add two new patterns that instcombine should or does handle
...
llvm-svn: 2563
2002-05-08 23:15:01 +00:00
Chris Lattner
f5cbf64ed2
Print out post dominance data structures more nicely
...
llvm-svn: 2562
2002-05-08 23:11:08 +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
90f5d5a5b1
New testcase for LICM reassociation
...
llvm-svn: 2560
2002-05-08 22:20:55 +00:00
Chris Lattner
c0f5800678
Initial checkin of expression reassociation pass
...
llvm-svn: 2559
2002-05-08 22:19:27 +00:00
Chris Lattner
5fbada2e21
Add expr reassociation pass prototype
...
llvm-svn: 2558
2002-05-08 22:19:01 +00:00
Chris Lattner
a2f3b65dec
Expose expression reassociation
...
llvm-svn: 2557
2002-05-08 22:18:34 +00:00
Chris Lattner
356ef11e5a
Run expression reassociation as part of gccas
...
llvm-svn: 2556
2002-05-08 22:18:20 +00:00
Chris Lattner
5a2dbc2b3e
Add some simple test of reassociation
...
llvm-svn: 2555
2002-05-08 21:34:22 +00:00
Chris Lattner
d75d5d19ab
run reassociate tests
...
llvm-svn: 2554
2002-05-08 21:34:11 +00:00
Chris Lattner
338a462110
Verify that function call arguments match the function signature
...
llvm-svn: 2553
2002-05-08 19:49:50 +00:00
Sumant Kowshik
cf3afd9dc5
*** empty log message ***
...
llvm-svn: 2552
2002-05-08 18:09:58 +00:00
Chris Lattner
b4bf0c1422
Spell aggressive correctly
...
llvm-svn: 2551
2002-05-07 22:15:01 +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
f1b3d4f27a
Spell aggressive right
...
llvm-svn: 2549
2002-05-07 22:12:52 +00:00
Chris Lattner
e3fdc3355a
Fix misspelling
...
llvm-svn: 2548
2002-05-07 22:12:36 +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
38e019c267
New testcase for adce
...
llvm-svn: 2546
2002-05-07 21:05:36 +00:00
Chris Lattner
bcdd44937c
Build the ADCE tests
...
llvm-svn: 2545
2002-05-07 20:52:15 +00:00