Ruchira Sasanka
20c3c4be28
Added code to support correct saving of %ccr across calls
...
llvm-svn: 1111
2001-11-03 19:59:59 +00:00
Chris Lattner
bcdf581aec
* 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
116fbe7fc7
Arranged stack frame - needs furhter organization
...
llvm-svn: 1108
2001-11-03 17:14:44 +00:00
Ruchira Sasanka
7673c5f6e0
Arranged stack frame - needs furhter organization
...
Moved InsertCallerSaveInstr to the SparcRegInfo.cpp
llvm-svn: 1106
2001-11-03 17:13:27 +00:00
Ruchira Sasanka
ee84dc6f89
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
38732a00f5
Be lenient on types so that programs that are not very typesafe will work
...
llvm-svn: 1104
2001-11-03 10:15:32 +00:00
Chris Lattner
30050d95ae
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
fb0626b9ed
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
b778b5bd90
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
a9bdcbf060
Remove debugging info
...
llvm-svn: 1093
2001-11-03 03:31:39 +00:00
Chris Lattner
d61e4631f5
Fix major bugs in type resolution
...
llvm-svn: 1092
2001-11-03 03:27:53 +00:00
Chris Lattner
b995f1c44f
Add extra code for debugging linker problems
...
llvm-svn: 1091
2001-11-03 03:27:29 +00:00
Chris Lattner
e40fa529cd
Dramatically simplify recursive type processing. Fixed a few bugs, a few still remain :(
...
Why does this stuff have to come up NOW?
llvm-svn: 1089
2001-11-02 07:51:31 +00:00
Chris Lattner
8573672b7f
Improve some debugging code
...
llvm-svn: 1088
2001-11-02 07:46:26 +00:00
Chris Lattner
5ee08db6ce
Support floating point numbers in expodential form so that small numbers don't get truncated, which broke the health benchmark
...
llvm-svn: 1087
2001-11-01 22:06:08 +00:00
Chris Lattner
7682955ac0
* 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
06e4402e71
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
a621bac2a6
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
2e9e90e235
Implement new simpler constructors for if you don't have a index list
...
llvm-svn: 1081
2001-11-01 05:58:42 +00:00
Chris Lattner
8b30d77212
* 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
3b2c78da03
Simplify DCE code a lot
...
llvm-svn: 1079
2001-11-01 05:55:29 +00:00
Chris Lattner
1942341fd4
Implement constant propogation of null pointer values.
...
llvm-svn: 1078
2001-11-01 05:55:13 +00:00
Chris Lattner
261785f670
* 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
01dc694896
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
cd8bcd33aa
Propogate name to the malloc itself instead of to the cast
...
llvm-svn: 1071
2001-11-01 02:40:36 +00:00
Chris Lattner
986e273442
Use the correct prototype for malloc and free
...
llvm-svn: 1066
2001-10-31 06:36:23 +00:00
Chris Lattner
009d9de81c
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
91fc057638
Implemented constant propogation of cast instructions
...
llvm-svn: 1064
2001-10-31 05:07:57 +00:00
Chris Lattner
a9dacc1925
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
98ce708757
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
1474ad4c46
Implement xor operator
...
llvm-svn: 1050
2001-10-30 20:54:36 +00:00
Chris Lattner
5ea831acc4
callExternalMethod now returns the return value of the function
...
llvm-svn: 1048
2001-10-30 20:28:23 +00:00
Chris Lattner
b773a4e59d
Implement a gross function name map that must be used when linking statically
...
This is for use with purify
llvm-svn: 1047
2001-10-30 20:28:00 +00:00
Chris Lattner
d85d2dfcba
* Add some assertions for checking internal error conditions
...
* Implement the 'rem' instruction
* Fix getelementptr to work right
* Copy the return result of an external function call into the receiving value
* Convert stuff to new style casts
llvm-svn: 1046
2001-10-30 20:27:31 +00:00
Chris Lattner
727495d6dc
Don't fail to load runtime if running LLI from the current directory
...
llvm-svn: 1044
2001-10-30 16:40:37 +00:00
Chris Lattner
7f8034b73b
Initialize isRecursive. Found by Purify
...
llvm-svn: 1043
2001-10-30 16:39:16 +00:00
Chris Lattner
84d4bc52df
Print out a label if we step into the first instruction of a basic block
...
llvm-svn: 1038
2001-10-29 20:44:34 +00:00
Chris Lattner
b4899254c0
* Fix pow wrapper to actually work
...
* Implement rudimentary printf support for lli
llvm-svn: 1037
2001-10-29 20:27:45 +00:00
Chris Lattner
3f63736182
Implement getelementptr instruction as well as the load and store forms
...
that incorporate gep
llvm-svn: 1036
2001-10-29 19:32:19 +00:00
Chris Lattner
37164a34d5
Fix broken assertion. Didn't allow for pointer case
...
llvm-svn: 1034
2001-10-29 17:27:38 +00:00
Chris Lattner
d8958859d9
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
Chris Lattner
ee3536a8e6
Fix blatent bugs in checkin
...
llvm-svn: 1032
2001-10-29 16:40:32 +00:00
Chris Lattner
2c6b9de3ca
Expose the WriteTypeSymbolic function from the library. Refactor code to make
...
this function explicit. Cause WriteAsOperand to use symbolic types as available.
llvm-svn: 1031
2001-10-29 16:37:48 +00:00
Chris Lattner
29a0fa2839
Be careful to output symbolic type name if possible for a type. This makes
...
debugging the Olden/health benchmark actually possible.
llvm-svn: 1029
2001-10-29 16:05:51 +00:00
Chris Lattner
c476c9b156
Remember to print out the next instruction if stepping over an external method call
...
llvm-svn: 1028
2001-10-29 16:05:19 +00:00
Chris Lattner
3f9f8e34ca
Fix problem next'ing over an external method
...
llvm-svn: 1027
2001-10-29 14:08:33 +00:00
Chris Lattner
1153a795eb
Check in to use moved stringizing code
...
llvm-svn: 1024
2001-10-29 13:39:38 +00:00
Chris Lattner
2d8ab10610
Remove C string capability from VMCore library. Move to Support
...
llvm-svn: 1021
2001-10-29 13:27:09 +00:00
Vikram S. Adve
3af80d1a15
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
42883552ec
Remove non linking related stuff
...
llvm-svn: 1015
2001-10-28 22:43:06 +00:00