summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
* Implement capability to fold this:Chris Lattner2002-08-141-4/+11
| | | | | | | | | | | uint %test4(int %A, int %B) { %COND = setlt int %A, %B ; <bool> [#uses=1] %result = cast bool %COND to uint ; <uint> [#uses=1] ret uint %result } into a single cast instruction. llvm-svn: 3339
* Avoid creating 'load X, 0' instead of just 'load X'Chris Lattner2002-08-141-0/+3
| | | | | | | | This _trivial_ change causes GCSE and LICM to be much more effective at hoisting loads. Before it would not be able to eliminate 'load X' if there was just a dominating 'load X, 0' because the expressions were not identical. llvm-svn: 3337
* Avoid inserting an entry block unless we need itChris Lattner2002-08-141-5/+9
| | | | llvm-svn: 3336
* Remove support for Not ConstantExpr. This simplifies the unary case to onlyChris Lattner2002-08-141-3/+3
| | | | | | have to support the cast instruction, so the function is renamed to getCast. llvm-svn: 3328
* Fix bug introduced in last checkin due to CastInst not being visibleChris Lattner2002-08-142-3/+5
| | | | llvm-svn: 3327
* Remove support for NOT instructionChris Lattner2002-08-142-9/+6
| | | | llvm-svn: 3323
* Remove extra #includesChris Lattner2002-08-141-2/+0
| | | | llvm-svn: 3322
* Remove support for unary operatorsChris Lattner2002-08-141-6/+4
| | | | llvm-svn: 3318
* - Fix InstCombine pass to not generate or process NOT instructionsChris Lattner2002-08-141-15/+15
| | | | | | - Fixed testcases to not use them either. llvm-svn: 3315
* Remove support for NOT instructionChris Lattner2002-08-141-6/+0
| | | | llvm-svn: 3313
* - Rename ConstantGenericIntegral -> ConstantIntegralChris Lattner2002-08-131-3/+3
| | | | llvm-svn: 3300
* * Factor a bunch of code by using ReplaceInstUsesWithChris Lattner2002-08-121-163/+51
| | | | | | * Move isMaxValue, isMinValue, isAllOnesValue to Constants.h llvm-svn: 3290
* New functionality for instcombine:Chris Lattner2002-08-091-28/+213
| | | | | | | | | | | | | | | | | * New ReplaceInstUsesWith function to factor out tons of common code This needs to be used more in the future still, but it's a good start * New InsertNewInstBefore to allow multi-instruction replacements * Change getMaxValue functions to isAllOnesValue function, which doesn't have to CREATE/lookup a new constant. Also the name is accurate * Add new isMaxValue, isMinValue, isMaxValueMinusOne, isMinValuePlusOne functions: This should be moved to Constant* classes eventually * Implement xor X, ALLONES -> not X * Fold ALL setcc's of booleans away * Handle various SetCC's for integers against values at the end of their ranges, possibly off by one. This implements the setcc-strength-reduce.ll testcase. llvm-svn: 3286
* Initial checkin of the "Hello World" Pass.Chris Lattner2002-08-082-0/+40
| | | | llvm-svn: 3266
* - Cleaned up the interface to AnalysisUsage to take analysis class namesChris Lattner2002-08-0810-13/+13
| | | | | | | instead of ::ID's. - Pass::getAnalysis<> now no longer takes an optional argument llvm-svn: 3265
* - Cleaned up the interface to AnalysisUsage to take analysis class namesChris Lattner2002-08-081-1/+1
| | | | | | | instead of ::ID's. - Pass::getAnalysis<> now no longer takes an optional argument llvm-svn: 3264
* Remove extraneous #includesChris Lattner2002-08-081-2/+0
| | | | llvm-svn: 3262
* Eliminate cast instructions: use only GEPs in decomposed sequence.Vikram S. Adve2002-08-031-81/+70
| | | | | | | Don't decompose if there are 2 indices with 0 as first index. Compute Changed flag correctly in runOnBasicBlock(). llvm-svn: 3233
* Fix bug: test/Regression/Transforms/InstCombine/2002-08-02-CastTest.llChris Lattner2002-08-021-7/+37
| | | | | | Implement feature: Cast's can now be converted to bitwise AND expressions. llvm-svn: 3225
* * Cleanups of instcombineChris Lattner2002-08-021-80/+48
| | | | | | | | | - Reenable gep (gep x) -> x - Make instcombine do dead instruction elimination where it's really easy. Now visitors don't have to ensure they aren't not processing dead instructions. llvm-svn: 3222
* Fix bug: test/Regression/Transforms/GCSE/2002-05-21-NoSharedDominator.llChris Lattner2002-08-021-0/+29
| | | | llvm-svn: 3215
* Remove unneccesary #inlcudeChris Lattner2002-08-011-1/+0
| | | | llvm-svn: 3200
* Implement the other half of a feature advertised by OperandConvertableToType.Chris Lattner2002-07-311-6/+39
| | | | | | This fixes bug: test/Regression/Transforms/LevelRaise/2002-07-31-AssertionFailure.ll llvm-svn: 3193
* * Indent class into anonymous namespace, filling up the diff with garbageChris Lattner2002-07-301-30/+43
| | | | | | | | | * Internalize global variables with initializers * Add new stat to track global variable internalization * Only count functions that were not internal before in internalized function count llvm-svn: 3163
* Cleanup ConstantExpr handling:Chris Lattner2002-07-301-8/+2
| | | | | | | | | | | | | | * Correctly delete TypeHandles in AsmParser. In addition to not leaking memory, this prevents a bug that could have occurred when a type got resolved that the constexpr was using * Check for errors in the AsmParser instead of hitting assertion failures deep in the code * Simplify the interface to the ConstantExpr class, removing unneccesary parameters to the ::get* methods. * Rename the 'getelementptr' version of ConstantExpr::get to ConstantExpr::getGetElementPtr llvm-svn: 3160
* Remove FIXME's that aren't really needed after all.Chris Lattner2002-07-301-9/+0
| | | | llvm-svn: 3158
* Fix bug with last patch which would occur when a call returned void and weChris Lattner2002-07-301-1/+2
| | | | | | attempted to assign it a name. llvm-svn: 3142
* * Make sure the resolved function call instructions get the name from theChris Lattner2002-07-301-7/+15
| | | | | | | | old call instruction * Implement conversion of return values for calls. This fixes bug: test/Regression/Transforms/FunctionResolve/retmismatch3.ll llvm-svn: 3140
* * Fix bug: test/Regression/Transforms/ADCE/2002-07-17-AssertionFailure.llChris Lattner2002-07-301-21/+46
| | | | | | | | | | | which was caused by us not running the "drop references of dead instructions" code when there were no basic blocks that were dead. We still don't want to do some of the stuff we do if there are dead basic blocks, but we DO want to drop references of dead instructions, so we factor the common code out to a new method. llvm-svn: 3137
* Add code to ensure that no PHI nodes are left laying around with theirChris Lattner2002-07-291-2/+16
| | | | | | | arguments dropped. This fixes bug: test/Regression/Transforms/ADCE/2002-07-17-PHIAssertion.ll llvm-svn: 3134
* Implement a new RemoveSuccessor functionChris Lattner2002-07-291-4/+51
| | | | llvm-svn: 3131
* Fix bug: test/Regression/Transforms/ADCE/2002-07-29-Segfault.llChris Lattner2002-07-291-28/+60
| | | | llvm-svn: 3129
* Allow folding of basic blocks that have PHI nodes in them, fixing "bug":Chris Lattner2002-07-291-1/+11
| | | | | | test/Regression/Transforms/SimplifyCFG/2002-06-24-PHINode.ll llvm-svn: 3128
* * Standardize how analysis results/passes as printed with the print() virtualChris Lattner2002-07-272-3/+1
| | | | | | | | | | methods * Eliminate AnalysisID: Now it is just a typedef for const PassInfo* * Simplify how AnalysisID's are initialized * Eliminate Analysis/Writer.cpp/.h: incorporate printing functionality into the analyses themselves. llvm-svn: 3116
* * Standardize how analysis results/passes as printed with the print() virtualChris Lattner2002-07-271-2/+1
| | | | | | | | | | methods * Eliminate AnalysisID: Now it is just a typedef for const PassInfo* * Simplify how AnalysisID's are initialized * Eliminate Analysis/Writer.cpp/.h: incorporate printing functionality into the analyses themselves. llvm-svn: 3115
* * Add support for different "PassType's"Chris Lattner2002-07-2620-26/+26
| | | | | | | | | | | | | | | * Add new RegisterOpt/RegisterAnalysis templates for registering passes that are to show up in opt or analyze * Register Analyses now * Change optimizations to use RegisterOpt instead of RegisterPass * Add support for different "PassType's" * Add new RegisterOpt/RegisterAnalysis templates for registering passes that are to show up in opt or analyze * Register Analyses now * Change optimizations to use RegisterOpt instead of RegisterPass * Remove getPassName implementations from various subclasses llvm-svn: 3113
* * Add support for different "PassType's"Chris Lattner2002-07-269-16/+16
| | | | | | | | | | | | | | | * Add new RegisterOpt/RegisterAnalysis templates for registering passes that are to show up in opt or analyze * Register Analyses now * Change optimizations to use RegisterOpt instead of RegisterPass * Add support for different "PassType's" * Add new RegisterOpt/RegisterAnalysis templates for registering passes that are to show up in opt or analyze * Register Analyses now * Change optimizations to use RegisterOpt instead of RegisterPass * Remove getPassName implementations from various subclasses llvm-svn: 3112
* *** empty log message ***Chris Lattner2002-07-261-9/+8
| | | | llvm-svn: 3105
* *** empty log message ***Chris Lattner2002-07-254-4/+5
| | | | llvm-svn: 3075
* *** empty log message ***Chris Lattner2002-07-241-1/+1
| | | | llvm-svn: 3072
* Eliminate several include/llvm/Transforms/IPO/*.h files, moving their ↵Chris Lattner2002-07-244-4/+4
| | | | | | contents into IPO.h llvm-svn: 3043
* Merge ChangeAllocations into scalar.hChris Lattner2002-07-232-2/+2
| | | | llvm-svn: 3038
* Rename headerChris Lattner2002-07-231-1/+1
| | | | llvm-svn: 3037
* Cleanup and simplify codeChris Lattner2002-07-231-59/+22
| | | | llvm-svn: 3036
* Incorporate ConstantMerge.h into IPO.hChris Lattner2002-07-231-3/+2
| | | | llvm-svn: 3035
* Rename LevelChange.h to RaisePointerReferences.hChris Lattner2002-07-231-1/+1
| | | | llvm-svn: 3034
* *** empty log message ***Chris Lattner2002-07-2320-55/+48
| | | | llvm-svn: 3016
* * Remove getPassName implementationChris Lattner2002-07-235-12/+12
| | | | | | * Register all Passes llvm-svn: 3015
* * Cleanup the pass a bit more, making it more object oriented.Chris Lattner2002-07-231-65/+48
| | | | | | | * Split the two behaviors of the InsertTraceCode class into two subclasses * Register Passes llvm-svn: 3014
* * Break the two different behaviors of SimpleStructMutation into two subclassesChris Lattner2002-07-231-26/+42
| | | | | | * Register the passes llvm-svn: 3013
OpenPOWER on IntegriCloud