aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Add new cleanup pass:Chris Lattner2001-11-031-7/+73
| | | | | | | | | | | | | | | | | | | // 1. PHI nodes with multiple entries for the same predecessor. GCC sometimes // generates code that looks like this: // // bb7: br bool %cond1004, label %bb8, label %bb8 // bb8: %reg119 = phi uint [ 0, %bb7 ], [ 1, %bb7 ] // // which is completely illegal LLVM code. To compensate for this, we insert // an extra basic block, and convert the code to look like this: // // bb7: br bool %cond1004, label %bbX, label %bb8 // bbX: br label bb8 // bb8: %reg119 = phi uint [ 0, %bbX ], [ 1, %bb7 ] // git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1114 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a helper function to PHI nodeChris Lattner2001-11-031-0/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1113 91177308-0d34-0410-b5e6-96231b3b80d8
* Added support for correct spilling of %ccrRuchira Sasanka2001-11-034-122/+58
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1112 91177308-0d34-0410-b5e6-96231b3b80d8
* Added code to support correct saving of %ccr across callsRuchira Sasanka2001-11-034-21/+158
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1111 91177308-0d34-0410-b5e6-96231b3b80d8
* * Export method to merge identically named methodsChris Lattner2001-11-031-3/+80
| | | | | | | | | | | | | | | * 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; } git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1110 91177308-0d34-0410-b5e6-96231b3b80d8
* Expose method to merge identically named methodsChris Lattner2001-11-031-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1109 91177308-0d34-0410-b5e6-96231b3b80d8
* Arranged stack frame - needs furhter organizationRuchira Sasanka2001-11-032-0/+36
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1108 91177308-0d34-0410-b5e6-96231b3b80d8
* Moved InsertCallerSaveInstr to the SparcRegInfo.cpp and made machine independentRuchira Sasanka2001-11-033-7/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1107 91177308-0d34-0410-b5e6-96231b3b80d8
* Arranged stack frame - needs furhter organizationRuchira Sasanka2001-11-034-4/+133
| | | | | | | Moved InsertCallerSaveInstr to the SparcRegInfo.cpp git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1106 91177308-0d34-0410-b5e6-96231b3b80d8
* Commented out code so that copies are inserted for all phi argsRuchira Sasanka2001-11-031-8/+19
| | | | | | | CahedCopyMap was disabled to insert phi elimination code for all phi args git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1105 91177308-0d34-0410-b5e6-96231b3b80d8
* Be lenient on types so that programs that are not very typesafe will workChris Lattner2001-11-031-14/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1104 91177308-0d34-0410-b5e6-96231b3b80d8
* Changes to compile the TSP benchmark successfully. Favor warning instead of ↵Chris Lattner2001-11-031-38/+51
| | | | | | assertion failures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1103 91177308-0d34-0410-b5e6-96231b3b80d8
* Add code to link method together with the same name if one is vararg and the ↵Chris Lattner2001-11-031-42/+203
| | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1102 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't forget to link type names together too. Fix for Olden/mst benchmarkChris Lattner2001-11-033-0/+135
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1094 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove debugging infoChris Lattner2001-11-031-10/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1093 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix major bugs in type resolutionChris Lattner2001-11-035-32/+165
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1092 91177308-0d34-0410-b5e6-96231b3b80d8
* Add extra code for debugging linker problemsChris Lattner2001-11-033-6/+57
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1091 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the linker. This bug was not fun to track down. grrChris Lattner2001-11-031-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1090 91177308-0d34-0410-b5e6-96231b3b80d8
* Dramatically simplify recursive type processing. Fixed a few bugs, a few ↵Chris Lattner2001-11-021-108/+47
| | | | | | | | | still remain :( Why does this stuff have to come up NOW? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1089 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve some debugging codeChris Lattner2001-11-021-6/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1088 91177308-0d34-0410-b5e6-96231b3b80d8
* Support floating point numbers in expodential form so that small numbers ↵Chris Lattner2001-11-011-1/+1
| | | | | | don't get truncated, which broke the health benchmark git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1087 91177308-0d34-0410-b5e6-96231b3b80d8
* Print floating point numbers in expodential form so that small numbers don't ↵Chris Lattner2001-11-011-1/+1
| | | | | | get truncated, which broke the health benchmark git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1086 91177308-0d34-0410-b5e6-96231b3b80d8
* * Add comments for peepholesChris Lattner2001-11-011-3/+91
| | | | | | | | | | | | | | | * 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. :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1085 91177308-0d34-0410-b5e6-96231b3b80d8
* Add DCE as integral part of the level raising to avoid processing ↵Chris Lattner2001-11-011-4/+9
| | | | | | instructions that are dead git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1084 91177308-0d34-0410-b5e6-96231b3b80d8
* Expose the low level DCE mechanism to external usersChris Lattner2001-11-011-10/+20
| | | | | | | Refactor code to support it git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1083 91177308-0d34-0410-b5e6-96231b3b80d8
* Expose the low level DCE mechanism to external usersChris Lattner2001-11-011-0/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1082 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement new simpler constructors for if you don't have a index listChris Lattner2001-11-011-0/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1081 91177308-0d34-0410-b5e6-96231b3b80d8
* * Implement expression type conversion for constant valuesChris Lattner2001-11-011-11/+76
| | | | | | | | | | | | | | | | * 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1080 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify DCE code a lotChris Lattner2001-11-011-26/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1079 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement constant propogation of null pointer values.Chris Lattner2001-11-014-1/+88
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1078 91177308-0d34-0410-b5e6-96231b3b80d8
* Add simpler to use ctors. Add getType() overload to specialize ↵Chris Lattner2001-11-011-0/+10
| | | | | | getelementptr's type git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1077 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new isNullValue methodChris Lattner2001-11-011-1/+32
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1076 91177308-0d34-0410-b5e6-96231b3b80d8
* * Convert getelementptr/store pairs into a single storeChris Lattner2001-11-011-1/+26
| | | | | | | * Convert getelementptr/load pairs into a single load git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1075 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial checkin of level raising code, after move and cleanup and expands ↵Chris Lattner2001-11-011-0/+592
| | | | | | from the opt directory git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1074 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial checkin of level raising codeChris Lattner2001-11-011-0/+35
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1073 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the Raise xform from opt to transformsChris Lattner2001-11-014-5/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1072 91177308-0d34-0410-b5e6-96231b3b80d8
* Propogate name to the malloc itself instead of to the castChris Lattner2001-11-011-1/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1071 91177308-0d34-0410-b5e6-96231b3b80d8
* Move level change xfor into the transforms directoryChris Lattner2001-11-012-90/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1070 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some useful accessorsChris Lattner2001-11-012-0/+20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1069 91177308-0d34-0410-b5e6-96231b3b80d8
* crunch the output of GCC a bit to make it nicerChris Lattner2001-10-311-2/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1068 91177308-0d34-0410-b5e6-96231b3b80d8
* Start testing the new cleangcc passChris Lattner2001-10-311-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1067 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the correct prototype for malloc and freeChris Lattner2001-10-311-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1066 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement code to convert %malloc and %free FUNCTION CALLS into the ↵Chris Lattner2001-10-312-3/+126
| | | | | | instruction equivalent git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1065 91177308-0d34-0410-b5e6-96231b3b80d8
* Implemented constant propogation of cast instructionsChris Lattner2001-10-316-4/+49
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1064 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix dumb copy and paste typosChris Lattner2001-10-311-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1063 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial version of GCC cleanup pass: just removes extraneous global symbol ↵Chris Lattner2001-10-312-0/+68
| | | | | | table entries for types git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1062 91177308-0d34-0410-b5e6-96231b3b80d8
* New GCC cleanup pass interfaceChris Lattner2001-10-311-0/+24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1061 91177308-0d34-0410-b5e6-96231b3b80d8
* Add hook for GCC cleanup passChris Lattner2001-10-311-1/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1060 91177308-0d34-0410-b5e6-96231b3b80d8
* Build new gccas toolChris Lattner2001-10-311-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1059 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial checkin of GCCASChris Lattner2001-10-312-0/+80
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1058 91177308-0d34-0410-b5e6-96231b3b80d8