summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
...
* Convert instcombine from using using getAnalysis<TargetData> toDan Gohman2009-07-211-46/+62
| | | | | | getAnalysisIfAvailable<TargetData>. llvm-svn: 76676
* Rename getConstantInt{True|False} to get{True|False} at Chris' behest.Owen Anderson2009-07-217-107/+107
| | | | llvm-svn: 76598
* Update CMake files.Ted Kremenek2009-07-212-5/+6
| | | | llvm-svn: 76595
* Move a bit more state over to the LLVMContext.Owen Anderson2009-07-211-14/+17
| | | | llvm-svn: 76533
* use ExpandInlineAsm on TargetLowering instead of TargetAsmInfo.Chris Lattner2009-07-201-14/+10
| | | | llvm-svn: 76442
* Revert the addition of hasNoPointerOverflow to GEPOperator.Dan Gohman2009-07-201-84/+1
| | | | | | | | | | | | Getelementptrs that are defined to wrap are virtually useless to optimization, and getelementptrs that are undefined on any kind of overflow are too restrictive -- it's difficult to ensure that all intermediate addresses are within bounds. I'm going to take a different approach. Remove a few optimizations that depended on this flag. llvm-svn: 76437
* implement a new magic global "llvm.compiler.used" which is like llvm.used, butChris Lattner2009-07-202-21/+18
| | | | | | doesn't cause ".no_dead_strip" to be emitted on darwin. llvm-svn: 76399
* Add plumbing for the `linker_private' linkage type. This type is meant forBill Wendling2009-07-201-0/+1
| | | | | | | | | "private" symbols which the assember shouldn't strip, but which the linker may remove after evaluation. This is mostly useful for Objective-C metadata. This is plumbing, so we don't have a use of it yet. More to come, etc. llvm-svn: 76385
* Canonicalize bitcasts between types like <1 x i64> and i64 to Eli Friedman2009-07-181-0/+24
| | | | | | | | | | insertelement/extractelement. I'm not entirely sure this is precisely what we want to do: should we prefer bitcast(insertelement) or insertelement(bitcast)? Similarly. should we prefer extractelement(bitcast) or bitcast(extractelement)? llvm-svn: 76345
* Back out 76300; apparently the preference is to canonicalize the other Eli Friedman2009-07-181-16/+6
| | | | | | way (bitcast -> insert/extractelement). llvm-svn: 76325
* add a fixmeChris Lattner2009-07-181-0/+5
| | | | llvm-svn: 76324
* Add combine: X sdiv (1 << Y) -> X udiv (1 << Y) when X doesn't have the Eli Friedman2009-07-181-4/+15
| | | | | | sign bit set. llvm-svn: 76304
* Remove no-op check.Eli Friedman2009-07-181-2/+1
| | | | llvm-svn: 76302
* Remove dead check.Eli Friedman2009-07-181-3/+1
| | | | llvm-svn: 76301
* Canonicalize insert/extractelement from single-element vectors into Eli Friedman2009-07-181-6/+16
| | | | | | | | | bitcasts. It would also be possible to canonicalize the other way; does anyone have a preference? llvm-svn: 76300
* Fix simplifylibcalls memset recognition to work on 64-bit platforms Eli Friedman2009-07-181-2/+2
| | | | | | where int is 32 bits. llvm-svn: 76293
* Replace intersectWith with maximalIntersectWith. The latter guarantees thatNick Lewycky2009-07-181-10/+10
| | | | | | | | all values belonging to the intersection will belong to the resulting range. The former was inconsistent about that point (either way is fine, just pick one.) This is part of PR4545. llvm-svn: 76289
* Fix the inline cost calculation to take into account instructions Eli Friedman2009-07-181-0/+7
| | | | | | | which cannot be folded even if they have constant operands. Significantly helps if_spppsubr.c attached to PR4573. llvm-svn: 76285
* Add line breaks to make the debug output a bit more readable.Eli Friedman2009-07-181-4/+4
| | | | llvm-svn: 76284
* Convert more code to use Operator instead of explicitly handling bothDan Gohman2009-07-171-23/+6
| | | | | | | ConstantExpr and Instruction. This involves duplicating some code between GetElementPtrInst and GEPOperator, but it's not a lot. llvm-svn: 76265
* Make BasicAliasAnalysis and Value::getUnderlyingObject useDan Gohman2009-07-171-4/+16
| | | | | | | | GEPOperator's hasNoPointer0verflow(), and make a few places in instcombine that create GEPs that may overflow clear the NoOverflow value. Among other things, this partially addresses PR2831. llvm-svn: 76252
* Fix some typos in a comment.Dan Gohman2009-07-171-7/+7
| | | | llvm-svn: 76249
* Add a new Operator class, for handling Instructions and ConstantExprsDan Gohman2009-07-171-13/+3
| | | | | | | | | in a convenient manner, factoring out some common code from InstructionCombining and ValueTracking. Move the contents of BinaryOperators.h into Operator.h and use Operator to generalize them to support ConstantExprs as well as Instructions. llvm-svn: 76232
* Initialize another Context, in the hopes of unbreaking CBE.Daniel Dunbar2009-07-171-0/+3
| | | | llvm-svn: 76184
* Replace isTrapping with a new, similar method called Eli Friedman2009-07-173-25/+10
| | | | | | | | | | isSafeToSpeculativelyExecute. The new method is a bit closer to what the callers actually care about in that it rejects more things callers don't want. It also adds more precise handling for integer division, and unifies code for analyzing the legality of a speculative load. llvm-svn: 76150
* Move the ConstantInt uniquing table into LLVMContextImpl. This exposed a ↵Owen Anderson2009-07-1619-10/+49
| | | | | | | | number of issues in our current context-passing stuff, which is also fixed here llvm-svn: 76089
* Revert yesterday's change by removing the LLVMContext parameter to ↵Owen Anderson2009-07-1517-49/+38
| | | | | | AllocaInst and MallocInst. llvm-svn: 75863
* Switch invars away from using isTrapping when it really shouldn't be Eli Friedman2009-07-151-1/+7
| | | | | | using it. llvm-svn: 75852
* Don't restrict the set of instructions where we try to constant-fold the Eli Friedman2009-07-151-3/+1
| | | | | | | operands; it's possible to end up with a constant-foldable operand to most instructions, even those which can't trap. llvm-svn: 75845
* Fix indentation.Dan Gohman2009-07-151-18/+18
| | | | llvm-svn: 75723
* Make makeLoopInvariant report whether it made any changes or not,Dan Gohman2009-07-153-50/+17
| | | | | | and use this to simplify more code. llvm-svn: 75722
* Move EVER MORE stuff over to LLVMContext.Owen Anderson2009-07-1418-56/+78
| | | | llvm-svn: 75703
* Revert 75571; I'm convinced this isn't the right thing to do.Dale Johannesen2009-07-141-17/+8
| | | | llvm-svn: 75642
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-1411-63/+63
| | | | | | | | | This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). llvm-svn: 75640
* Require IVUsers after LCSSA, since LCSSA does not preserve IVUsers.Dan Gohman2009-07-141-3/+3
| | | | | | | This results in the pass manager running IVUsers only once for indvars, instead of twice. llvm-svn: 75633
* Fix trivial todo in instcombine.Eli Friedman2009-07-141-1/+2
| | | | llvm-svn: 75586
* Update LoopSimplify and LoopUnswitch to use the new makeLoopInvariantDan Gohman2009-07-142-15/+15
| | | | | | function. llvm-svn: 75584
* Fix indvars to not assume that a loop with a single unique exitDan Gohman2009-07-141-7/+5
| | | | | | block has a single unique exiting block. llvm-svn: 75579
* Don't delete asm's just because their inputs are undefined;Dale Johannesen2009-07-141-8/+17
| | | | | | xor R, R is a common and valid idiom for zeroing a register, for example. llvm-svn: 75571
* PR4548: optimize zext+udiv+trunc to udiv.Eli Friedman2009-07-131-1/+20
| | | | llvm-svn: 75539
* Canonicalize boolean +/- a constant to a select.Eli Friedman2009-07-131-6/+8
| | | | | | | | (I think it's reasonably clear that we want to have a canonical form for constructs like this; if anyone thinks that a select is not the best canonical form, please tell me.) llvm-svn: 75531
* These don't really need contexts either.Owen Anderson2009-07-132-10/+10
| | | | llvm-svn: 75528
* Make Loop and MachineLoop be subclasses of LoopBase, rather than typedefs,Dan Gohman2009-07-131-1/+1
| | | | | | | | | | using the Curiously Recurring Template Pattern with LoopBase. This will help further refactoring, and future functionality for Loop. Also, Headers can now foward-declare Loop, instead of pulling in LoopInfo.h or doing tricks. llvm-svn: 75519
* Misc simplifications to InstCombiner::commonIntCastTransforms. Most of Eli Friedman2009-07-131-60/+17
| | | | | | | | the changes are allowed by not calling this function for bitcasts. The Instruction::AShr case is dead because SimplifyDemandedInstructionBits handles that case. llvm-svn: 75514
* Fix comment.Eli Friedman2009-07-131-3/+2
| | | | llvm-svn: 75499
* Move more functionality over to LLVMContext.Owen Anderson2009-07-137-36/+43
| | | | llvm-svn: 75497
* Don't bother to call commonIntCastTransforms for bitcasts; int->int Eli Friedman2009-07-131-7/+3
| | | | | | bitcasts will always be eliminated anyway. llvm-svn: 75495
* Begin the painful process of tearing apart the rat'ss nest that is ↵Owen Anderson2009-07-134-53/+67
| | | | | | | | | Constants.cpp and ConstantFold.cpp. This involves temporarily hard wiring some parts to use the global context. This isn't ideal, but it's the only way I could figure out to make this process vaguely incremental. llvm-svn: 75445
* Remove check which is duplicated in Eli Friedman2009-07-121-20/+0
| | | | | | InstCombiner::visitSelectInstWithICmp. llvm-svn: 75409
* silence a vc++ warning.Chris Lattner2009-07-111-1/+1
| | | | llvm-svn: 75393
OpenPOWER on IntegriCloud