summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
...
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-1110-59/+66
| | | | | | | | | Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. llvm-svn: 75379
* Convert more assert(0)+abort() -> LLVM_UNREACHABLE,Torok Edwin2009-07-115-9/+14
| | | | | | and abort()/exit() -> llvm_report_error(). llvm-svn: 75363
* Move a method that creates constant ranges relative to another constant rangeNick Lewycky2009-07-111-54/+5
| | | | | | | | | | per icmp predicate out of predsimplify and into ConstantRange. Add another utility method that determines whether one range is a subset of another. Combine with the former to determine whether icmp pred range, range is known to be true or not. llvm-svn: 75357
* Push LLVMContext through the PatternMatch API.Owen Anderson2009-07-102-111/+134
| | | | llvm-svn: 75255
* This started as a small change, I swear. Unfortunately, lots of things call ↵Owen Anderson2009-07-0923-206/+225
| | | | | | the [I|F]CmpInst constructors. Who knew!? llvm-svn: 75200
* A little bit more LLVMContextification.Owen Anderson2009-07-091-2/+4
| | | | llvm-svn: 75159
* There's no need to consider PHI nodes in the same block as the instructionNick Lewycky2009-07-091-0/+4
| | | | | | we're inserting sigma/phi functions for. Patch by Andre Tavares. llvm-svn: 75138
* Add some statistics to SSI so we can see what it's up to.Nick Lewycky2009-07-091-0/+43
| | | | | | Add an -ssi-everything pass which calls createSSI on everything in the function. llvm-svn: 75135
* Push LLVMContext _back_ through IRBuilder.Owen Anderson2009-07-081-1/+1
| | | | llvm-svn: 75040
* Tell ScalarEvolution to forget a loop before starting to delete it.Dan Gohman2009-07-081-6/+6
| | | | | | | This way ScalarEvolution can examine the loop to determine what state it needs to update, if it chooses. llvm-svn: 75029
* Switch GlobalVariable ctors to a sane API, where *either* a context or a ↵Owen Anderson2009-07-088-48/+37
| | | | | | module is required. llvm-svn: 75025
* Remove the vicmp and vfcmp instructions. Because we never had a release withNick Lewycky2009-07-081-20/+20
| | | | | | | these instructions, no autoupgrade or backwards compatibility support is provided. llvm-svn: 74991
* Push LLVMContext through GlobalVariables and IRBuilder.Owen Anderson2009-07-088-20/+33
| | | | llvm-svn: 74985
* Change all SCEV* to SCEV *.Dan Gohman2009-07-073-116/+116
| | | | llvm-svn: 74918
* "LLVMContext* " --> "LLVMContext *"Owen Anderson2009-07-0616-78/+78
| | | | llvm-svn: 74878
* Finish LLVMContext-ing lib/Analysis. This required pushing LLVMContext's ↵Owen Anderson2009-07-062-2/+2
| | | | | | through the ValueTracking API. llvm-svn: 74873
* Thread LLVMContext through the constant folding APIs, which touches a lot of ↵Owen Anderson2009-07-0614-68/+92
| | | | | | files. llvm-svn: 74844
* More LLVMContext-ification.Owen Anderson2009-07-0611-135/+181
| | | | llvm-svn: 74811
* More LLVMContext-ification.Owen Anderson2009-07-0517-93/+135
| | | | llvm-svn: 74807
* Fix build.Mike Stump2009-07-031-0/+1
| | | | llvm-svn: 74782
* Even more passes being LLVMContext'd.Owen Anderson2009-07-037-179/+232
| | | | llvm-svn: 74781
* Add Static Single Information construction pass written by André Tavares!Nick Lewycky2009-07-031-0/+390
| | | | | | | Use it by requiring it through the pass manager, then calling its createSSI method on the variables that you want in SSI form. llvm-svn: 74780
* Add newline at end of file.Duncan Sands2009-07-031-1/+1
| | | | llvm-svn: 74773
* Second batch of passes using LLVMContext.Owen Anderson2009-07-035-37/+46
| | | | llvm-svn: 74753
* Convert the first batch of passes to use LLVMContext.Owen Anderson2009-07-034-625/+711
| | | | llvm-svn: 74748
* fix inverted logic pointed out by John McCall, noticed by inspection.Chris Lattner2009-07-021-1/+1
| | | | | | | This was considering vector intrinsics to have cost 2, but non-vector intrinsics to have cost 1, which is backward. llvm-svn: 74698
* Fix a bunch of other places that used operator[] to test whetherDan Gohman2009-07-022-11/+19
| | | | | | a key is present in a std::map or DenseMap to use find instead. llvm-svn: 74676
* Request LCSSA after LoopSimplify. This fixes a problem in which theDan Gohman2009-07-011-1/+1
| | | | | | | PassManager was scheduling LCSSA before LoopSimplify, which does not preserve LCSSA. llvm-svn: 74661
* Fix an instcombine abort on a scalar-to-vector bitcast. This fixes PR4487.Dan Gohman2009-07-011-1/+15
| | | | llvm-svn: 74646
* Add a pointer to the owning LLVMContext to Module. This requires threading ↵Owen Anderson2009-07-011-1/+1
| | | | | | | | | | LLVMContext through a lot of the bitcode reader and ASM parser APIs, as well as supporting it in all of the tools. Patches for Clang and LLVM-GCC to follow. llvm-svn: 74614
* improve the APIs for creating struct and function types with no ↵Chris Lattner2009-07-013-9/+5
| | | | | | | | arguments/elements to not have to create a temporary vector (in the API at least). Patch by Jay Foad! llvm-svn: 74584
* Minor code simplification.Dan Gohman2009-06-301-3/+2
| | | | llvm-svn: 74491
* Don't try to split a loop when the controlling icmp instructionDan Gohman2009-06-271-0/+3
| | | | | | doesn't have an IV-based operand. This fixes PR4471. llvm-svn: 74399
* Remove the block from the LoopInfo, rather than just the Loop.Dan Gohman2009-06-271-1/+1
| | | | | | | LoopInfo will handle removing it from the Loop, as well as updating its own tables. llvm-svn: 74398
* Teach LoopSimplify how to merge multiple loop exits into a single exit,Dan Gohman2009-06-272-1/+76
| | | | | | | | | | | | | | | | when one of them can be converted to a trivial icmp and conditional branch. This addresses what is essentially a phase ordering problem. SimplifyCFG knows how to do this transformation, but it doesn't do so if the primary block has any instructions in it other than an icmp and a branch. In the given testcase, the block contains other instructions, however they are loop-invariant and can be hoisted. SimplifyCFG doesn't have LoopInfo though, so it can't hoist them. And, it's important that the blocks be merged before LoopRotation, as it doesn't support multiple-exit loops. llvm-svn: 74396
* More minor code simplifications.Dan Gohman2009-06-271-14/+9
| | | | llvm-svn: 74395
* When a value is used multiple times within a single PHI, instructionsDan Gohman2009-06-271-3/+15
| | | | | | | | inserted to replace that value must dominate all of of the basic blocks associated with the uses of the value in the PHI, not just one of them. llvm-svn: 74376
* Incorporate the insertion point into the key of SCEVExpander's CSE map.Dan Gohman2009-06-261-121/+43
| | | | | | | | | | | | | | This helps it avoid reusing an instruction that doesn't dominate all of the users, in cases where the original instruction was inserted before all of the users were known. This may result in redundant expansions of sub-expressions that depend on loop-unpredictable values in some cases, however this isn't very common, and it primarily impacts IndVarSimplify, so GVN can be expected to clean these up. This eliminates the need for IndVarSimplify's FixUsesBeforeDefs, which fixes several bugs. llvm-svn: 74352
* Remove unused routines.Devang Patel2009-06-261-41/+0
| | | | llvm-svn: 74351
* Constify this value.Owen Anderson2009-06-261-3/+2
| | | | llvm-svn: 74330
* Fix linking of llvm-ld and lli with CMake, from Xerxes RånbyDouglas Gregor2009-06-262-0/+4
| | | | llvm-svn: 74285
* Remove debug info anchors - llvm.dbg.compile_units, llvm.dbg.subprogramsDevang Patel2009-06-261-1/+20
| | | | | | and llvm.dbg.global_variables. llvm-svn: 74251
* Change this code to a form about which VC++ reportedly isn't unhappy.Dan Gohman2009-06-261-1/+2
| | | | llvm-svn: 74243
* Fix LCSSA to avoid emitting a PHI node for the unwind destination ofDan Gohman2009-06-261-2/+11
| | | | | | | an invoke instruction, since the value isn't really live across that edge. llvm-svn: 74242
* Minor code simplification.Dan Gohman2009-06-261-7/+3
| | | | llvm-svn: 74240
* Reword a few comments.Dan Gohman2009-06-251-17/+17
| | | | llvm-svn: 74146
* When inserting code into a loop preheader, insert it before theDan Gohman2009-06-241-3/+6
| | | | | | | | terminator, instead of after the last phi. This fixes a bug exposed by ScalarEvolution analyzing more kinds of loops. This fixes PR4436. llvm-svn: 74072
* Extend ScalarEvolution's multiple-exit support to compute exactDan Gohman2009-06-242-37/+21
| | | | | | | | | | | | | | | trip counts in more cases. Generalize ScalarEvolution's isLoopGuardedByCond code to recognize And and Or conditions, splitting the code out into an isNecessaryCond helper function so that it can evaluate Ands and Ors recursively, and make SCEVExpander be much more aggressive about hoisting instructions out of loops. test/CodeGen/X86/pr3495.ll has an additional instruction now, but it appears to be due to an arbitrary register allocation difference. llvm-svn: 74048
* Don't emit a redundant BitCastInst if the value to be defined in theDan Gohman2009-06-241-1/+2
| | | | | | preheader is already an instruction. llvm-svn: 74031
* Fix a few minor issues that were exposed by the removal of SCEVHandle.Dan Gohman2009-06-221-1/+0
| | | | llvm-svn: 73910
OpenPOWER on IntegriCloud