summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert the ConstantInt constructors back to their 2.5 forms where possible, ↵Owen Anderson2009-07-245-18/+18
| | | | | | thanks to contexts-on-types. More to come. llvm-svn: 77011
* AliasAnalysis wants sizes in address-units, not bits.Dan Gohman2009-07-241-1/+1
| | | | llvm-svn: 77009
* Move more to raw_ostream, provide support for writing MachineBasicBlock,Daniel Dunbar2009-07-241-3/+6
| | | | | | LiveInterval, etc to raw_ostream. llvm-svn: 76965
* Switch to getNameStr().Daniel Dunbar2009-07-241-4/+4
| | | | llvm-svn: 76962
* Don't give a massive inlining cost bonus to available_externally Eli Friedman2009-07-221-2/+1
| | | | | | | | functions with a single use; eliminating the single use may eliminate the function from the current module, but usually doesn't eliminate it from the final program. llvm-svn: 76730
* Get rid of the Pass+Context magic.Owen Anderson2009-07-2216-114/+120
| | | | llvm-svn: 76702
* Update CMake files.Ted Kremenek2009-07-211-2/+2
| | | | llvm-svn: 76595
* add a fixmeChris Lattner2009-07-181-0/+5
| | | | llvm-svn: 76324
* 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
* 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-171-17/+6
| | | | | | | | | | 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-161-0/+2
| | | | | | | | 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-154-15/+12
| | | | | | AllocaInst and MallocInst. llvm-svn: 75863
* Make makeLoopInvariant report whether it made any changes or not,Dan Gohman2009-07-151-6/+4
| | | | | | and use this to simplify more code. llvm-svn: 75722
* Move EVER MORE stuff over to LLVMContext.Owen Anderson2009-07-144-21/+29
| | | | llvm-svn: 75703
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-143-3/+3
| | | | | | | | | 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
* Update LoopSimplify and LoopUnswitch to use the new makeLoopInvariantDan Gohman2009-07-141-14/+9
| | | | | | function. llvm-svn: 75584
* Move more functionality over to LLVMContext.Owen Anderson2009-07-131-3/+4
| | | | llvm-svn: 75497
* Begin the painful process of tearing apart the rat'ss nest that is ↵Owen Anderson2009-07-131-6/+6
| | | | | | | | | 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
* silence a vc++ warning.Chris Lattner2009-07-111-1/+1
| | | | llvm-svn: 75393
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-112-3/+5
| | | | | | | | | 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-112-3/+5
| | | | | | and abort()/exit() -> llvm_report_error(). llvm-svn: 75363
* Push LLVMContext through the PatternMatch API.Owen Anderson2009-07-101-1/+2
| | | | llvm-svn: 75255
* This started as a small change, I swear. Unfortunately, lots of things call ↵Owen Anderson2009-07-097-24/+26
| | | | | | the [I|F]CmpInst constructors. Who knew!? llvm-svn: 75200
* 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
* Switch GlobalVariable ctors to a sane API, where *either* a context or a ↵Owen Anderson2009-07-082-11/+8
| | | | | | module is required. llvm-svn: 75025
* Push LLVMContext through GlobalVariables and IRBuilder.Owen Anderson2009-07-082-4/+8
| | | | llvm-svn: 74985
* "LLVMContext* " --> "LLVMContext *"Owen Anderson2009-07-066-12/+12
| | | | llvm-svn: 74878
* Thread LLVMContext through the constant folding APIs, which touches a lot of ↵Owen Anderson2009-07-063-5/+8
| | | | | | files. llvm-svn: 74844
* More LLVMContext-ification.Owen Anderson2009-07-0515-90/+132
| | | | llvm-svn: 74807
* Fix build.Mike Stump2009-07-031-0/+1
| | | | llvm-svn: 74782
* 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 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-011-1/+1
| | | | | | | | 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
* 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
* Remove unused routines.Devang Patel2009-06-261-41/+0
| | | | llvm-svn: 74351
* Fix linking of llvm-ld and lli with CMake, from Xerxes RånbyDouglas Gregor2009-06-261-0/+2
| | | | llvm-svn: 74285
* 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
* Generalize instcombine's isSafeToLoadUnconditionally() functionChris Lattner2009-06-161-0/+45
| | | | | | | to ignore readonly calls, and factor it out of instcombine so that it can be used by other passes. Patch by Frits van Bommel! llvm-svn: 73506
* Fix the crash in this test. This is basically the sameDale Johannesen2009-06-151-2/+27
| | | | | | | | problem addressed in 31284, but the patch there only addressed the case where an invoke is the first thing in a block. llvm-svn: 73416
* Fix old-style type names in comments.Dan Gohman2009-06-141-1/+1
| | | | llvm-svn: 73362
* Split the Add, Sub, and Mul instruction opcodes into separateDan Gohman2009-06-041-6/+2
| | | | | | | | | | | | | | | integer and floating-point opcodes, introducing FAdd, FSub, and FMul. For now, the AsmParser, BitcodeReader, and IRBuilder all preserve backwards compatability, and the Core LLVM APIs preserve backwards compatibility for IR producers. Most front-ends won't need to change immediately. This implements the first step of the plan outlined here: http://nondot.org/sabre/LLVMNotes/IntegerOverflow.txt llvm-svn: 72897
* Give embedded metadata its own type instead of relying on EmptyStructTy.Nick Lewycky2009-05-301-1/+24
| | | | llvm-svn: 72610
* available_externall linkage is not local, this was confusing the codegenerator,Torok Edwin2009-05-232-2/+4
| | | | | | | | | and it wasn't generating calls through @PLT for these functions. hasLocalLinkage() is now false for available_externally, I attempted to fix the inliner and dce to handle available_externally properly. It passed make check. llvm-svn: 72328
* Teach SCEVExpander to expand arithmetic involving pointers into GEPDan Gohman2009-05-191-30/+31
| | | | | | | | | | | | | | | | instructions. It attempts to create high-level multi-operand GEPs, though in cases where this isn't possible it falls back to casting the pointer to i8* and emitting a GEP with that. Using GEP instructions instead of ptrtoint+arithmetic+inttoptr helps pointer analyses that don't use ScalarEvolution, such as BasicAliasAnalysis. Also, make the AddrModeMatcher more aggressive in handling GEPs. Previously it assumed that operand 0 of a GEP would require a register in almost all cases. It now does extra checking and can do more matching if operand 0 of the GEP is foldable. This fixes a problem that was exposed by SCEVExpander using GEPs. llvm-svn: 72093
* Reuse existing getUnderlyingObject instead ofDale Johannesen2009-05-141-24/+6
| | | | | | adding another copy. llvm-svn: 71783
* Handle some additonal cases of external weak globals.Dale Johannesen2009-05-131-4/+22
| | | | llvm-svn: 71717
OpenPOWER on IntegriCloud