summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
* Don't consider debug intrinsics when checkingDale Johannesen2009-03-101-2/+2
| | | | | | whether a callee to be inlined is a leaf. llvm-svn: 66588
* Removing a dead debug intrinsic shouldn't triggerDale Johannesen2009-03-101-3/+6
| | | | | | | another instcombine pass if we weren't going to make one without debug info. llvm-svn: 66576
* Ignore dbg info, while estimating size of jump through block.Devang Patel2009-03-101-1/+3
| | | | llvm-svn: 66554
* Do not attempt to do parial redundancy elimination on void values.John Criswell2009-03-101-3/+4
| | | | | | | Also fixed a punctuation error in the header comment. This fixes PR3775. llvm-svn: 66542
* If a function is marked alwaysinline, it must be inlined (possibly for ↵Evan Cheng2009-03-101-7/+7
| | | | | | correctness). Do so even if the callee has dynamic alloca and the caller doesn't. llvm-svn: 66539
* Ignore debug info while evaluating function.Devang Patel2009-03-091-1/+7
| | | | llvm-svn: 66490
* Don't record the increment instruction; just recompute it from the PhiDan Gohman2009-03-091-33/+15
| | | | | | | if needed. This simplifies the code a little, and is needed for an upcoming refactoring. llvm-svn: 66479
* Remove llvm.dbg.global_variables also.Devang Patel2009-03-091-0/+10
| | | | llvm-svn: 66471
* Fix a few more places where induction variable types were usedDan Gohman2009-03-091-2/+2
| | | | | | where memory access types are needed. llvm-svn: 66470
* Use ReplacedTy instead of recomputing the same value.Dan Gohman2009-03-091-1/+1
| | | | llvm-svn: 66469
* Use LoopInfo's getLoopLatch() instead of doing what it does manualy.Dan Gohman2009-03-091-12/+4
| | | | llvm-svn: 66467
* Don't use an induction variable type as a memory access type.Dan Gohman2009-03-091-3/+5
| | | | | | Use VoidTy instead, to be properly conservative. llvm-svn: 66463
* Factor out the code that determines the memory access typeDan Gohman2009-03-091-18/+29
| | | | | | of an instruction into a helper function. llvm-svn: 66460
* Add helper pass to remove llvm.dbg.declare intrinsics.Devang Patel2009-03-091-0/+62
| | | | llvm-svn: 66454
* Move the sorting of the StrideOrder array earlier so that it doesn'tDan Gohman2009-03-091-4/+3
| | | | | | have to be done twice. llvm-svn: 66449
* Delete the isOnlyStride argument, which is unused.Dan Gohman2009-03-091-9/+4
| | | | llvm-svn: 66446
* Tidy some LSR debug output: announce the loop it's about to processDan Gohman2009-03-091-6/+6
| | | | | | before it does any processing. llvm-svn: 66443
* This debug info special case should no longerDuncan Sands2009-03-091-4/+0
| | | | | | | be needed now that these intrinsics are marked as not accessing memory. llvm-svn: 66420
* reimplement AliasSetTracker in terms of DenseMap instead of hash_map,Chris Lattner2009-03-091-7/+7
| | | | | | hopefully no functionality change. llvm-svn: 66398
* Keep calling-convention and tail-call bit when creating new invoke or call.Nick Lewycky2009-03-081-10/+13
| | | | llvm-svn: 66384
* Fix comments, pointed out by Duncan Sands.Nick Lewycky2009-03-081-3/+3
| | | | llvm-svn: 66381
* Mark function returns as noalias.Nick Lewycky2009-03-081-0/+127
| | | | llvm-svn: 66369
* teach SROA to handle promoting vector allocas with a memset into them intoChris Lattner2009-03-081-17/+19
| | | | | | a vector type instead of into an integer type. llvm-svn: 66368
* Enhance SROA to "promote to scalar" allocas which are Chris Lattner2009-03-081-0/+48
| | | | | | | memcpy/memmove'd into or out of. This fixes a serious perf issue that Nate ran into. llvm-svn: 66366
* change the MemIntrinsic get/setAlignment method to take an unsignedChris Lattner2009-03-083-14/+12
| | | | | | instead of a Constant*, which is what the clients of it really want. llvm-svn: 66364
* use MemTransferInst.Chris Lattner2009-03-081-1/+1
| | | | llvm-svn: 66362
* Introduce a new MemTransferInst pseudo class, which is a commonChris Lattner2009-03-082-26/+20
| | | | | | | parent between MemCpyInst and MemMoveInst, simplify some code to use it. llvm-svn: 66361
* fix a serious pessimization that Tron on IRC pointed out where we wouldChris Lattner2009-03-071-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | "boolify" pointers, generating really awful code because getting the pointer value requires a load itself. Before: _foo: movb $1, _X.b ret _get: xorl %ecx, %ecx movb _X.b, %al testb %al, %al movl $_Y, %eax cmove %ecx, %eax ret With the xform disabled: _foo: movl $_Y, _X ret _get: movl _X, %eax ret llvm-svn: 66351
* Introduce new linkage types linkonce_odr, weak_odr, common_odrDuncan Sands2009-03-073-9/+6
| | | | | | | | | | | | | | | | | | | | | and extern_weak_odr. These are the same as the non-odr versions, except that they indicate that the global will only be overridden by an *equivalent* global. In C, a function with weak linkage can be overridden by a function which behaves completely differently. This means that IP passes have to skip weak functions, since any deductions made from the function definition might be wrong, since the definition could be replaced by something completely different at link time. This is not allowed in C++, thanks to the ODR (One-Definition-Rule): if a function is replaced by another at link-time, then the new function must be the same as the original function. If a language knows that a function or other global can only be overridden by an equivalent global, it can give it the weak_odr linkage type, and the optimizers will understand that it is alright to make deductions based on the function body. The code generators on the other hand map weak and weak_odr linkage to the same thing. llvm-svn: 66339
* Fix another case where debug info interferes withDale Johannesen2009-03-061-2/+6
| | | | | | an optimization. llvm-svn: 66288
* add a bunch more passes to the C bindings (PR3734), patch byChris Lattner2009-03-062-10/+149
| | | | | | Lennart Augustsson! llvm-svn: 66272
* While thinking about the one-definition-rule and tryingDuncan Sands2009-03-061-3/+12
| | | | | | | | | | | | | to find a tiny mouse hole to squeeze through, it struck me that globals without a name can be considered internal since they can't be referenced from outside the current module. This patch makes GlobalOpt give them internal linkage. Also done for aliases even though they always have names, since in my opinion anonymous aliases should be allowed for consistency with global variables and functions. So if that happens one day, this code is ready! llvm-svn: 66267
* While converting an aggregate to scalare, ignore and remove aggregate's ↵Devang Patel2009-03-061-3/+12
| | | | | | debug info. llvm-svn: 66262
* While hoisting instruction to speculatively execute simple bb, ignore dbg ↵Devang Patel2009-03-061-18/+30
| | | | | | intrinsics. llvm-svn: 66255
* this wasn't intended to go in.Chris Lattner2009-03-061-34/+0
| | | | llvm-svn: 66252
* Change various llvm utilities to use PrettyStackTraceProgram inChris Lattner2009-03-061-0/+34
| | | | | | | their main routines. This makes the tools print their argc/argv commands if they crash. llvm-svn: 66248
* Do not count DbgInfoIntrinsic while estimating loop header size.Devang Patel2009-03-061-2/+14
| | | | llvm-svn: 66245
* Skip DbgInfoIntrinsic.Devang Patel2009-03-061-2/+2
| | | | llvm-svn: 66244
* Don't assign rank numbers to debug intrinsic "calls".Dale Johannesen2009-03-061-1/+3
| | | | | | This is needed so debug info doesn't change codegen. llvm-svn: 66235
* Revert 66224.Devang Patel2009-03-061-9/+7
| | | | llvm-svn: 66233
* Revert rev. 66167. Devang Patel2009-03-061-31/+9
| | | | | | We are still not out of woods yet. llvm-svn: 66232
* SRThreshold is meant to be inclusive.Evan Cheng2009-03-061-1/+1
| | | | llvm-svn: 66227
* Tweak the check for promotable alloca's to handleDale Johannesen2009-03-061-1/+7
| | | | | | debug intrinsics correctly. llvm-svn: 66225
* Do not let debug info prevert globalopt from shriking a global vars to boolean.Devang Patel2009-03-061-7/+9
| | | | llvm-svn: 66224
* Add "check/remove dbg var" helper routines.Devang Patel2009-03-061-0/+44
| | | | llvm-svn: 66223
* GlobalOpt only process non constant local GVs while optimizing global vars.Devang Patel2009-03-051-9/+31
| | | | | | | | | | | | If non constant local GV named A is used by a constant local GV named B (e.g. llvm.dbg.variable) and B is not used by anyone else then eliminate A as well as B. In other words, debug info should not interfere in removal of unused GV. --This life, and those below, will be ignored-- M test/Transforms/GlobalOpt/2009-03-03-dbg.ll M lib/Transforms/IPO/GlobalOpt.cpp llvm-svn: 66167
* Do not split edges to EH landing pads. It will cause code size explosion.Evan Cheng2009-03-051-0/+6
| | | | llvm-svn: 66140
* Fix another case where debug info was affectingDale Johannesen2009-03-051-4/+17
| | | | | | | codegen. I convinced myself it was OK to skip all pointer bitcasts here too. llvm-svn: 66122
* Add comment to emphasize that the while body is empty.Bill Wendling2009-03-051-2/+2
| | | | llvm-svn: 66115
* Fix another case where a dbg.declare meant somethingDale Johannesen2009-03-051-6/+13
| | | | | | had 2 uses instead of 1. llvm-svn: 66112
OpenPOWER on IntegriCloud