Chris Lattner
160b51de7d
New testcase for wierd combine opportunity found in bzip2 benchmark
...
llvm-svn: 2580
2002-05-09 19:52:36 +00:00
Chris Lattner
94e4578db4
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
97ae8c039e
* 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
93fb65370c
* 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
b3acea93cf
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
619c55baec
* 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
cde698978f
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
e8573f21c7
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
72286b8a3b
* 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
c7b3367aad
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
2a4f66f21d
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
87d656d2a6
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
80f7e2db14
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
558771c658
First wave of cleanups, looks like the first of many.
...
llvm-svn: 2567
2002-05-09 02:28:59 +00:00
Chris Lattner
172488eb68
Add ability to transform (x - (y - z)) into (x + (z - y))
...
llvm-svn: 2566
2002-05-09 01:29:19 +00:00
Chris Lattner
890652c8a2
Fix broken testcase
...
llvm-svn: 2565
2002-05-09 01:28:30 +00:00
Chris Lattner
c95479a283
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
70dd3548b3
Add two new patterns that instcombine should or does handle
...
llvm-svn: 2563
2002-05-08 23:15:01 +00:00
Chris Lattner
a39fc03021
Print out post dominance data structures more nicely
...
llvm-svn: 2562
2002-05-08 23:11:08 +00:00
Chris Lattner
34d5891f0a
* Combine: A-(-B) -> A + B
...
* Bugfix: A + -B and -A + B
llvm-svn: 2561
2002-05-08 22:46:53 +00:00
Chris Lattner
8fdec5f127
New testcase for LICM reassociation
...
llvm-svn: 2560
2002-05-08 22:20:55 +00:00
Chris Lattner
c38d2de2b5
Initial checkin of expression reassociation pass
...
llvm-svn: 2559
2002-05-08 22:19:27 +00:00
Chris Lattner
1212eabe1f
Add expr reassociation pass prototype
...
llvm-svn: 2558
2002-05-08 22:19:01 +00:00
Chris Lattner
0c171e22a8
Expose expression reassociation
...
llvm-svn: 2557
2002-05-08 22:18:34 +00:00
Chris Lattner
fd2ecfc2a5
Run expression reassociation as part of gccas
...
llvm-svn: 2556
2002-05-08 22:18:20 +00:00
Chris Lattner
313f5a5fe0
Add some simple test of reassociation
...
llvm-svn: 2555
2002-05-08 21:34:22 +00:00
Chris Lattner
240027fdba
run reassociate tests
...
llvm-svn: 2554
2002-05-08 21:34:11 +00:00
Chris Lattner
6453305616
Verify that function call arguments match the function signature
...
llvm-svn: 2553
2002-05-08 19:49:50 +00:00
Sumant Kowshik
64cf4b95c9
*** empty log message ***
...
llvm-svn: 2552
2002-05-08 18:09:58 +00:00
Chris Lattner
07a6a20a96
Spell aggressive correctly
...
llvm-svn: 2551
2002-05-07 22:15:01 +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
abf9a50ee5
Spell aggressive right
...
llvm-svn: 2549
2002-05-07 22:12:52 +00:00
Chris Lattner
2573cd6d56
Fix misspelling
...
llvm-svn: 2548
2002-05-07 22:12:36 +00:00
Chris Lattner
bbd8a94a9b
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
ae618ed6b8
New testcase for adce
...
llvm-svn: 2546
2002-05-07 21:05:36 +00:00
Chris Lattner
eb560983ad
Build the ADCE tests
...
llvm-svn: 2545
2002-05-07 20:52:15 +00:00
Chris Lattner
4e234c9a1f
ADCE tests
...
llvm-svn: 2544
2002-05-07 20:51:59 +00:00
Chris Lattner
c636f5427b
Implement constant propogation of PHI instructions like this:
...
X = phi(0, 0, 0)
llvm-svn: 2543
2002-05-07 20:44:59 +00:00
Chris Lattner
49ac9debec
Oops, forgot to check in makefile
...
llvm-svn: 2542
2002-05-07 20:39:18 +00:00
Chris Lattner
73b676d645
Add check that phi nodes get constant propogated away
...
llvm-svn: 2541
2002-05-07 20:32:19 +00:00
Chris Lattner
8916b11c77
constprop doesn't delete dead instructions, it just makes them dead.
...
llvm-svn: 2540
2002-05-07 20:25:44 +00:00
Chris Lattner
fdae27abc0
Add testcase for not expressions
...
llvm-svn: 2539
2002-05-07 20:22:12 +00:00
Chris Lattner
466c66f47a
Merge all include/llvm/Transforms/Scalar/* into a single Scalar.h
...
llvm-svn: 2538
2002-05-07 20:03:27 +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
e615c275c5
This doesn't use DCE!
...
llvm-svn: 2536
2002-05-07 20:02:44 +00:00
Chris Lattner
c038503630
Extend TargetData::getIndexedOffset to support arrays and pointers!
...
llvm-svn: 2535
2002-05-07 20:00:33 +00:00
Chris Lattner
5b99f25879
These files are supersumed by include/llvm/Transforms/Scalar.h
...
llvm-svn: 2534
2002-05-07 19:38:42 +00:00
Chris Lattner
bb3896eed3
New header file to replace all of the Scalar/*.h files.
...
llvm-svn: 2533
2002-05-07 19:37:18 +00:00
Chris Lattner
5cae7abf34
Fix makefiles after shuffling passes around the libraries
...
llvm-svn: 2532
2002-05-07 19:27:33 +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