summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Check to see if a two-entry PHI block can be simplifiedDan Gohman2008-03-111-6/+6
| | | | | | | | before trying to merge the block into its predecessors. This allows two-entry-phi-return.ll to be simplified into a single basic block. llvm-svn: 48252
* Turn unwind_to into "unwinds to".Nick Lewycky2008-03-101-1/+1
| | | | llvm-svn: 48123
* Firstly, having a BranchInst isn't exclusive with having an unwind_to.Nick Lewycky2008-03-091-5/+8
| | | | | | | Secondly, we have to check whether the branch is actually pointing to the block with the unwind in it. We could have gotten here because of the unwind_to alone. llvm-svn: 48099
* A BB that unwind_to an "unwind" inst is that same as one that doesn't unwind_toNick Lewycky2008-03-091-1/+4
| | | | | | at all. llvm-svn: 48096
* Update the inliner and simplifycfg to handle unwind_to.Nick Lewycky2008-03-091-1/+9
| | | | llvm-svn: 48086
* Make Transforms to be 4.3 warnings-cleanAnton Korobeynikov2008-02-201-6/+10
| | | | llvm-svn: 47371
* switch simplifycfg from using vectors for most things to smallvectors,Chris Lattner2008-02-181-14/+12
| | | | | | this speeds it up 2.3% on eon. llvm-svn: 47261
* 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
OpenPOWER on IntegriCloud