summaryrefslogtreecommitdiff
path: root/lib/Transforms
Commit message (Collapse)AuthorAge
...
* Use the expression map correctly.Chris Lattner2001-11-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1140 91177308-0d34-0410-b5e6-96231b3b80d8
* New file for expression tree conversionChris Lattner2001-11-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1128 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor code to share stuffChris Lattner2001-11-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1127 91177308-0d34-0410-b5e6-96231b3b80d8
* * Relax restriction that prevented malloc promotion in certain casesChris Lattner2001-11-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1125 91177308-0d34-0410-b5e6-96231b3b80d8
* * Disable debug outputChris Lattner2001-11-04
| | | | | | | | * fix minor bug with taking datasize of unsized array type * Insert code to support speculative changes later git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1122 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert backward conversion of expression trees into a new more powerful ↵Chris Lattner2001-11-04
| | | | | | bidirectional approach. Add transforms for more instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1121 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor method renameChris Lattner2001-11-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1119 91177308-0d34-0410-b5e6-96231b3b80d8
* Add transformations for Load and GetElementPtr. Fix broken transform with shr.Chris Lattner2001-11-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1118 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix cast instructions that end up in bad places in GCC outputChris Lattner2001-11-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1117 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid making a broken transformation!Chris Lattner2001-11-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1115 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new cleanup pass:Chris Lattner2001-11-03
| | | | | | | | | | | | | | | | | | | // 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
* * Export method to merge identically named methodsChris Lattner2001-11-03
| | | | | | | | | | | | | | | * 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
* Commented out code so that copies are inserted for all phi argsRuchira Sasanka2001-11-03
| | | | | | | 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
* Changes to compile the TSP benchmark successfully. Favor warning instead of ↵Chris Lattner2001-11-03
| | | | | | 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-03
| | | | | | | | | | | | | 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-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1094 91177308-0d34-0410-b5e6-96231b3b80d8
* Add extra code for debugging linker problemsChris Lattner2001-11-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1091 91177308-0d34-0410-b5e6-96231b3b80d8
* * Add comments for peepholesChris Lattner2001-11-01
| | | | | | | | | | | | | | | * 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-01
| | | | | | 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-01
| | | | | | | Refactor code to support it git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1083 91177308-0d34-0410-b5e6-96231b3b80d8
* * Implement expression type conversion for constant valuesChris Lattner2001-11-01
| | | | | | | | | | | | | | | | * 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-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1079 91177308-0d34-0410-b5e6-96231b3b80d8
* * Convert getelementptr/store pairs into a single storeChris Lattner2001-11-01
| | | | | | | * 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-01
| | | | | | from the opt directory git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1074 91177308-0d34-0410-b5e6-96231b3b80d8
* Propogate name to the malloc itself instead of to the castChris Lattner2001-11-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1071 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the correct prototype for malloc and freeChris Lattner2001-10-31
| | | | 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-31
| | | | | | 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-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1064 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial version of GCC cleanup pass: just removes extraneous global symbol ↵Chris Lattner2001-10-31
| | | | | | table entries for types git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1062 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug when inlining a method that refers to a global variableChris Lattner2001-10-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1056 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix broken assertion. Didn't allow for pointer caseChris Lattner2001-10-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1034 91177308-0d34-0410-b5e6-96231b3b80d8
* Pull method symbols over when linking. Otherwise the result of the link ↵Chris Lattner2001-10-29
| | | | | | will appear stripped git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1033 91177308-0d34-0410-b5e6-96231b3b80d8
* Make newlines be newlines! This should now work in both lli and native code.Vikram S. Adve2001-10-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1016 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove non linking related stuffChris Lattner2001-10-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1015 91177308-0d34-0410-b5e6-96231b3b80d8
* Added name-mangling routines for future use.Vikram S. Adve2001-10-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1003 91177308-0d34-0410-b5e6-96231b3b80d8
* Use separate functions for printing values of each type.Vikram S. Adve2001-10-28
| | | | | | | | Put trace code before condition-generating instruction in basic blocks that end in a conditional branch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1002 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix problem linking in a method prototype when a method body existsChris Lattner2001-10-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@965 91177308-0d34-0410-b5e6-96231b3b80d8
* Refix bugs, stop using deprecated strstream headerChris Lattner2001-10-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@898 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial checkinChris Lattner2001-10-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@897 91177308-0d34-0410-b5e6-96231b3b80d8
* Only print values live at BB or method exit, and insert loads at eachVikram S. Adve2001-10-18
| | | | | | | | | BB exit to read and print values stored in that BB. Note that only these stored values are live at method exit!. Also, print messages at method entry and exit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@892 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle multiple exit blocks correctly.Vikram S. Adve2001-10-18
| | | | | | | | | Restore string variable cache. Resurrect code to use formatted printing instead of PrintVal but leave it turned off for now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@888 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert to be compatible with lli.Chris Lattner2001-10-18
| | | | | | | Need to eliminate duplicate \n entries git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@883 91177308-0d34-0410-b5e6-96231b3b80d8
* Massive hacks to try to fix subtle logic bugs. I think it's all working now,Chris Lattner2001-10-18
| | | | | | | | at least what used to. I should disable method exit code completely because it's broken (doesn't insert just post dominating values) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@881 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert to new simpler pass itfChris Lattner2001-10-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@880 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert optimizations to the pass infrastructureChris Lattner2001-10-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@873 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new Pass infrastructure and some examplesChris Lattner2001-10-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@836 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename ConstPoolPointerReference to ConstPoolPointerRef - My fingers get ↵Chris Lattner2001-10-15
| | | | | | tired typing that much git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@822 91177308-0d34-0410-b5e6-96231b3b80d8
* * getExitNode() doesn't exist in method anymoreChris Lattner2001-10-15
| | | | | | | * Make local functions static git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@820 91177308-0d34-0410-b5e6-96231b3b80d8
* Added Instrumentation subdirectory.Vikram S. Adve2001-10-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@819 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement linking of global variable constant referencesChris Lattner2001-10-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@817 91177308-0d34-0410-b5e6-96231b3b80d8