summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Make sorting of ConstantInt be APInt clean through use of ult function.Reid Spencer2007-03-021-1/+1
| | | | llvm-svn: 34853
* Eliminate use of ctors that take vectors.Chris Lattner2007-02-131-5/+7
| | | | llvm-svn: 34219
* simplify code by using Value::takeNameChris Lattner2007-02-111-21/+17
| | | | llvm-svn: 34177
* Adjust #includes to match movement of constant folding code from ↵Chris Lattner2007-01-301-0/+1
| | | | | | transformutils to libanalysis. llvm-svn: 33680
* For PR1043:Reid Spencer2007-01-191-0/+1
| | | | | | | | | | | | | | This is the final patch for this PR. It implements some minor cleanup in the use of IntegerType, to wit: 1. Type::getIntegerTypeMask -> IntegerType::getBitMask 2. Type::Int*Ty changed to IntegerType* from Type* 3. ConstantInt::getType() returns IntegerType* now, not Type* This also fixes PR1120. Patch by Sheng Zhou. llvm-svn: 33370
* rename Type::isIntegral to Type::isInteger, eliminating the old Type::isInteger.Chris Lattner2007-01-151-1/+1
| | | | | | | | | rename Type::getIntegralTypeMask to Type::getIntegerTypeMask. This makes naming much more consistent. For example, there are now no longer any instances of IntegerType that are not considered isInteger! :) llvm-svn: 33225
* Eliminate calls to isInteger, generalizing code and tightening checks as needed.Chris Lattner2007-01-151-1/+1
| | | | llvm-svn: 33218
* Implement review feedback for the ConstantBool->ConstantInt merge. ChrisReid Spencer2007-01-121-9/+10
| | | | | | | | recommended that getBoolValue be replaced with getZExtValue and that get(bool) be replaced by get(const Type*, uint64_t). This implements those changes. llvm-svn: 33110
* Rename BoolTy as Int1Ty. Patch by Sheng Zhou.Reid Spencer2007-01-111-2/+2
| | | | llvm-svn: 33076
* For PR1043:Zhou Sheng2007-01-111-5/+8
| | | | | | | Merge ConstantIntegral and ConstantBool into ConstantInt. Remove ConstantIntegral and ConstantBool from LLVM. llvm-svn: 33073
* For PR950:Reid Spencer2006-12-231-25/+24
| | | | | | | | This patch removes the SetCC instructions and replaces them with the ICmp and FCmp instructions. The SetCondInst instruction has been removed and been replaced with ICmpInst and FCmpInst. llvm-svn: 32751
* For PR950:Reid Spencer2006-11-271-5/+0
| | | | | | | | | | The long awaited CAST patch. This introduces 12 new instructions into LLVM to replace the cast instruction. Corresponding changes throughout LLVM are provided. This passes llvm-test, llvm/test, and SPEC CPUINT2000 with the exception of 175.vpr which fails only on a slight floating point output difference. llvm-svn: 31931
* Remove #include <iostream> and use llvm_* streams instead.Bill Wendling2006-11-261-21/+20
| | | | llvm-svn: 31925
* Do not convert massive blocks on phi nodes into select statements. InsteadChris Lattner2006-11-181-0/+27
| | | | | | | only do these transformations if there are a small number of phi's. This speeds up Ptrdist/ks from 2.35s to 2.19s on my mac pro. llvm-svn: 31853
* For PR950:Reid Spencer2006-11-081-1/+2
| | | | | | | | This patch converts the old SHR instruction into two instructions, AShr (Arithmetic) and LShr (Logical). The Shr instructions now are not dependent on the sign of their operands. llvm-svn: 31542
* For PR786:Reid Spencer2006-11-021-3/+2
| | | | | | | | | | Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. llvm-svn: 31380
* Fix SimplifyCFG/2006-10-29-InvokeCrash.ll, a crash compiling QT.Chris Lattner2006-10-291-1/+1
| | | | llvm-svn: 31284
* For PR950:Reid Spencer2006-10-201-1/+1
| | | | | | | | This patch implements the first increment for the Signless Types feature. All changes pertain to removing the ConstantSInt and ConstantUInt classes in favor of just using ConstantInt. llvm-svn: 31063
* Fix SimplifyCFG/2006-10-19-UncondDiv.ll by disabling a bad xform.Chris Lattner2006-10-201-23/+40
| | | | llvm-svn: 31061
* Fix PR867 (and maybe 868) and testcsae:Chris Lattner2006-08-031-6/+25
| | | | | | Transforms/SimplifyCFG/2006-08-03-Crash.ll llvm-svn: 29515
* Fix an infinite loop on Transforms/SimplifyCFG/2006-06-12-InfLoop.llChris Lattner2006-06-121-1/+10
| | | | llvm-svn: 28758
* remove some dead code identified by coverityChris Lattner2006-05-141-1/+1
| | | | llvm-svn: 28289
* remove dead variablesChris Lattner2006-05-141-2/+0
| | | | llvm-svn: 28286
* Fix Transforms/SimplifyCFG/2006-02-17-InfiniteUnroll.llChris Lattner2006-02-181-2/+8
| | | | llvm-svn: 26275
* Add explicit #includes of <iostream>Chris Lattner2006-01-221-0/+1
| | | | llvm-svn: 25509
* Fix SimplifyCFG/2005-12-03-IncorrectPHIFold.llChris Lattner2005-12-031-8/+14
| | | | llvm-svn: 24581
* Clean up the code a bit. Use isInstructionTriviallyDead to be more aggressiveChris Lattner2005-10-031-4/+8
| | | | | | | and more correct than use_empty(). This fixes PR635 and SimplifyCFG/2005-10-02-InvokeSimplify.ll llvm-svn: 23616
* remove some debugging codeChris Lattner2005-09-231-1/+0
| | | | llvm-svn: 23411
* Fold two consequtive branches that share a common destination between them.Chris Lattner2005-09-231-33/+119
| | | | | | | This implements SimplifyCFG/branch-fold.ll, and is useful on ?:/min/max heavy code llvm-svn: 23410
* simplify some logic furtherChris Lattner2005-09-231-6/+1
| | | | llvm-svn: 23408
* pull a bunch of logic out of SimplifyCFG into a helper fnChris Lattner2005-09-231-112/+112
| | | | llvm-svn: 23407
* Start threading across blocks with code in them, so long as the code doesChris Lattner2005-09-201-15/+64
| | | | | | | | | not define a value that is used outside of it's block. This catches many more simplifications, e.g. 854 in 176.gcc, 137 in vpr, etc. This implements branch-phi-thread.ll:test3.ll llvm-svn: 23397
* Implement merging of blocks with the same condition if the block has multipleChris Lattner2005-09-201-21/+59
| | | | | | predecessors. This implements branch-phi-thread.ll::test1 llvm-svn: 23395
* Reject a case we don't handle yetChris Lattner2005-09-191-1/+3
| | | | llvm-svn: 23393
* remove debugging code :-/Chris Lattner2005-09-191-2/+0
| | | | llvm-svn: 23392
* Implement SimplifyCFG/branch-phi-thread.ll, the most trivial case of threadingChris Lattner2005-09-191-0/+73
| | | | | | | control across branches with determined outcomes. More generality to follow. This triggers a couple thousand times in specint. llvm-svn: 23391
* Fix Transforms/SimplifyCFG/2005-08-03-PHIFactorCrash.ll, a problem thatChris Lattner2005-08-031-2/+3
| | | | | | occurred while bugpointing another testcase llvm-svn: 22621
* Finally, add the required constraint checks to fix ↵Chris Lattner2005-08-031-2/+29
| | | | | | | | Transforms/SimplifyCFG/2005-08-01-PHIUpdateFail.ll the right way llvm-svn: 22615
* Simplify some code, add the correct pred checksChris Lattner2005-08-031-16/+25
| | | | llvm-svn: 22613
* Refactor code out of PropagatePredecessorsForPHIs, turning it into a pure ↵Chris Lattner2005-08-031-37/+36
| | | | | | function with no side-effects llvm-svn: 22612
* use splice instead of remove/insert to avoid some symtab operationsChris Lattner2005-08-031-2/+2
| | | | llvm-svn: 22611
* move two functions up in the file, use SafeToMergeTerminators to eliminateChris Lattner2005-08-031-61/+45
| | | | | | some duplicated code llvm-svn: 22610
* Rip some code out of the main SimplifyCFG function into a subfunction andChris Lattner2005-08-031-78/+72
| | | | | | call it from the only place it is live. No functionality changes. llvm-svn: 22609
* Disable this patch:Chris Lattner2005-08-021-1/+1
| | | | | | | | | http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20050801/027345.html This breaks real programs and only fixes an obscure regression testcase. A real fix is in development. llvm-svn: 22606
* Change a place to use an arbitrary value instead of null, when possibleChris Lattner2005-08-021-3/+3
| | | | llvm-svn: 22605
* This code was very close, but not quite right. It did not take intoChris Lattner2005-08-021-3/+10
| | | | | | | | consideration the case where a reference in an unreachable block could occur. This fixes Transforms/SimplifyCFG/2005-08-01-PHIUpdateFail.ll, something I ran into while bugpoint'ing another pass. llvm-svn: 22584
* Don't crash on: X = phi (X, X).Chris Lattner2005-06-171-6/+9
| | | | | | This fixes PR584 and Transforms/SimplifyCFG/2005-06-16-PHICrash.ll llvm-svn: 22232
* Fix Transforms/SimplifyCFG/switch-simplify-crash.llChris Lattner2005-05-201-0/+7
| | | | llvm-svn: 22158
* Make sure to preserve the calling convention when changing an invoke intoChris Lattner2005-05-141-0/+2
| | | | | | | a call. This fixes Prolangs-C++/deriv2, kimwitu++, and Misc-C++/bigfib on X86 with -enable-x86-fastcc. llvm-svn: 22023
* Remove trailing whitespaceMisha Brukman2005-04-211-39/+39
| | | | llvm-svn: 21427
OpenPOWER on IntegriCloud