summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
Commit message (Collapse)AuthorAgeFilesLines
* don't hoist FP additions into unconditional adds + selects. This Chris Lattner2008-01-031-0/+2
| | | | | | | could theoretically introduce a trap, but is also a performance issue. This speeds up ptrdist/ks by 8%. llvm-svn: 45533
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* If succ has succ itself as one of the predecessors then doDevang Patel2007-12-221-2/+2
| | | | | | | not merge current bb and succ even if bb's terminator is unconditional branch to succ. llvm-svn: 45305
* Fix PR1146: parameter attributes are longer part ofDuncan Sands2007-11-271-0/+2
| | | | | | | | | | | | the function type, instead they belong to functions and function calls. This is an updated and slightly corrected version of Reid Spencer's original patch. The only known problem is that auto-upgrading of bitcode files doesn't seem to work properly (see test/Bitcode/AutoUpgradeIntrinsics.ll). Hopefully a bitcode guru (who might that be? :) ) will fix it. llvm-svn: 44359
* New CallInst interface to address GLIBCXX_DEBUG errors caused byDavid Greene2007-08-011-2/+2
| | | | | | | | indexing an empty std::vector. Updates to all clients. llvm-svn: 40660
* Minor comment cleanups.Dan Gohman2007-05-241-1/+1
| | | | llvm-svn: 37321
* remove use of Instruction::getNextChris Lattner2007-04-171-3/+5
| | | | llvm-svn: 36199
* reduce use of std::setChris Lattner2007-04-021-6/+7
| | | | llvm-svn: 35576
* Change uses of Function::front to Function::getEntryBlock for readability.Dan Gohman2007-03-221-1/+2
| | | | llvm-svn: 35265
* 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
OpenPOWER on IntegriCloud