summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Privatize the StructType table, which unfortunately involves routing ↵Owen Anderson2009-08-051-1/+1
| | | | | | contexts through a number of APIs. llvm-svn: 78258
* Move a few more APIs back to 2.5 forms. The only remaining ones left to ↵Owen Anderson2009-07-311-4/+2
| | | | | | | | change back are metadata related, which I'm waiting on to avoid conflicting with Devang. llvm-svn: 77721
* Move more code back to 2.5 APIs.Owen Anderson2009-07-301-3/+3
| | | | llvm-svn: 77635
* Move types back to the 2.5 API.Owen Anderson2009-07-291-4/+3
| | | | llvm-svn: 77516
* Remove Value::getName{Start,End}, the last of the old Name APIs.Daniel Dunbar2009-07-261-6/+6
| | | | llvm-svn: 77152
* More migration to raw_ostream, the water has dried up around the iostream hole.Daniel Dunbar2009-07-251-3/+4
| | | | | | | | | | - Some clients which used DOUT have moved to DEBUG. We are deprecating the "magic" DOUT behavior which avoided calling printing functions when the statement was disabled. In addition to being unnecessary magic, it had the downside of leaving code in -Asserts builds, and of hiding potentially unnecessary computations. llvm-svn: 77019
* Switch to getNameStr().Daniel Dunbar2009-07-241-1/+1
| | | | llvm-svn: 76962
* Get rid of the Pass+Context magic.Owen Anderson2009-07-221-9/+13
| | | | llvm-svn: 76702
* Move the ConstantInt uniquing table into LLVMContextImpl. This exposed a ↵Owen Anderson2009-07-161-0/+1
| | | | | | | | number of issues in our current context-passing stuff, which is also fixed here llvm-svn: 76089
* More LLVMContext-ification.Owen Anderson2009-07-061-8/+11
| | | | llvm-svn: 74811
* Implement and use new method Function::hasAddressTaken().Jay Foad2009-06-101-9/+2
| | | | llvm-svn: 73164
* aha, DAE does have to think about PHI nodes. Many thanks to "Dr Evil" (aka ↵Chris Lattner2009-03-181-3/+3
| | | | | | | | Duncan) for pointing this out :) llvm-svn: 67212
* add an assertion to make it clear that PHI nodes are not allowed.Chris Lattner2009-03-181-1/+4
| | | | llvm-svn: 67210
* Fix PR3807 by inserting 'insertelement' instructions in the normal dest of Chris Lattner2009-03-181-5/+10
| | | | | | an invoke instead of after the invoke (in its block), which is invalid. llvm-svn: 67139
* Revert r66920. It was causing failures in the self-hosting buildbot (in releaseBill Wendling2009-03-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mode). Running /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/dg.exp ... FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/crash-narrowfunctiontest.ll Failed with signal(SIGBUS) at line 1 while running: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/crash-narrowfunctiontest.ll -bugpoint-crashcalls -silence-passes > /dev/null 0 bugpoint 0x0035dd25 llvm::sys::SetInterruptFunction(void (*)()) + 85 1 bugpoint 0x0035e382 llvm::sys::RemoveFileOnSignal(llvm::sys::Path const&, std::string*) + 706 2 libSystem.B.dylib 0x92f112bb _sigtramp + 43 3 libSystem.B.dylib 0xffffffff _sigtramp + 1829694831 4 bugpoint 0x00021d1c main + 92 5 bugpoint 0x00002106 start + 54 6 bugpoint 0x00000004 start + 18446744073709543220 Stack dump: 0. Program arguments: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/crash-narrowfunctiontest.ll -bugpoint-crashcalls -silence-passes FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/misopt-basictest.ll Failed with signal(SIGBUS) at line 1 while running: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/misopt-basictest.ll -dce -bugpoint-deletecalls -simplifycfg -silence-passes 0 bugpoint 0x0035dd25 llvm::sys::SetInterruptFunction(void (*)()) + 85 1 bugpoint 0x0035e382 llvm::sys::RemoveFileOnSignal(llvm::sys::Path const&, std::string*) + 706 2 libSystem.B.dylib 0x92f112bb _sigtramp + 43 3 libSystem.B.dylib 0xffffffff _sigtramp + 1829694831 4 bugpoint 0x00021d1c main + 92 5 bugpoint 0x00002106 start + 54 6 bugpoint 0x00000006 start + 18446744073709543222 Stack dump: 0. Program arguments: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/misopt-basictest.ll -dce -bugpoint-deletecalls -simplifycfg -silence-passes FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/remove_arguments_test.ll Failed with signal(SIGBUS) at line 1 while running: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/remove_arguments_test.ll -bugpoint-crashcalls -silence-passes 0 bugpoint 0x0035dd25 llvm::sys::SetInterruptFunction(void (*)()) + 85 1 bugpoint 0x0035e382 llvm::sys::RemoveFileOnSignal(llvm::sys::Path const&, std::string*) + 706 2 libSystem.B.dylib 0x92f112bb _sigtramp + 43 3 libSystem.B.dylib 0xffffffff _sigtramp + 1829694831 4 bugpoint 0x00021d1c main + 92 5 bugpoint 0x00002106 start + 54 Stack dump: 0. Program arguments: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/remove_arguments_test.ll -bugpoint-crashcalls -silence-passes --- Reverse-merging (from foreign repository) r66920 into '.': U include/llvm/Support/CallSite.h U include/llvm/Instructions.h U lib/Analysis/IPA/GlobalsModRef.cpp U lib/Analysis/IPA/Andersens.cpp U lib/Bitcode/Writer/BitcodeWriter.cpp U lib/VMCore/Instructions.cpp U lib/VMCore/Verifier.cpp U lib/VMCore/AsmWriter.cpp U lib/Transforms/Utils/LowerInvoke.cpp U lib/Transforms/Scalar/SimplifyCFGPass.cpp U lib/Transforms/IPO/PruneEH.cpp U lib/Transforms/IPO/DeadArgumentElimination.cpp llvm-svn: 66953
* Second installment of "BasicBlock operands to the back"Gabor Greif2009-03-131-3/+3
| | | | | | | | | | | | | | | | | | changes. For InvokeInst now all arguments begin at op_begin(). The Callee, Cont and Fail are now faster to get by access relative to op_end(). This patch introduces some temporary uglyness in CallSite. Next I'll bring CallInst up to a similar scheme and then the uglyness will magically vanish. This patch also exposes all the reliance of the libraries on InvokeInst's operand ordering. I am thinking of taking care of that too. llvm-svn: 66920
* use CallSite::isCalle instead of slow getOperandNoGabor Greif2009-01-231-3/+3
| | | | llvm-svn: 62877
* Add the private linkage.Rafael Espindola2009-01-151-2/+2
| | | | llvm-svn: 62279
* Now Attributes are divided in three groupsDevang Patel2008-09-261-7/+16
| | | | | | | | | | | | | - return attributes - inreg, zext and sext - parameter attributes - function attributes - nounwind, readonly, readnone, noreturn Return attributes use 0 as the index. Function attributes use ~0U as the index. This patch requires corresponding changes in llvm-gcc and clang. llvm-svn: 56704
* Large mechanical patch.Devang Patel2008-09-251-31/+31
| | | | | | | | | | | | | | | s/ParamAttr/Attribute/g s/PAList/AttrList/g s/FnAttributeWithIndex/AttributeWithIndex/g s/FnAttr/Attribute/g This sets the stage - to implement function notes as function attributes and - to distinguish between function attributes and return value attributes. This requires corresponding changes in llvm-gcc and clang. llvm-svn: 56622
* s/ParamAttrsWithIndex/FnAttributeWithIndex/gDevang Patel2008-09-241-7/+7
| | | | llvm-svn: 56535
* s/ParameterAttributes/Attributes/gDevang Patel2008-09-231-5/+5
| | | | llvm-svn: 56513
* Tidy up several unbeseeming casts from pointer to intptr_t.Dan Gohman2008-09-041-1/+1
| | | | llvm-svn: 55779
* Allow deadargelim to change return types even though now values were dead. ThisMatthijs Kooijman2008-07-151-11/+1
| | | | | | again canonicalizes {i32} into i32 and {} into void. llvm-svn: 53610
* Revert r53606. It turns out that explicitely tracking the liveness of theMatthijs Kooijman2008-07-151-97/+103
| | | | | | | | | | | return value as a whole in deadargelim is really not needed now that we simply rebuild the old return value and actually prevents some canonicalization from taking place. This revert stops deadargelim from changing {i32} into i32 for now, but I'll fix that next. llvm-svn: 53609
* Make deadargelim a bit less smart, so it doesn't choke on nested structs asMatthijs Kooijman2008-07-151-38/+21
| | | | | | | | | | | | return values that are still (partially) live. Instead of updating all uses of a call instruction after removing some elements, it now just rebuilds the original struct (With undef gaps where the unused values were) and leaves it to instcombine to clean this up. The added testcase still fails currently, but this is due to instcombine which isn't good enough yet. I will fix that part next. llvm-svn: 53608
* Don't use isa when we can reuse a previous dyn_cast.Matthijs Kooijman2008-07-151-3/+2
| | | | llvm-svn: 53607
* Make DeadArgElim keep liveness of the return value as a whole in addition toMatthijs Kooijman2008-07-151-126/+124
| | | | | | | | | | | only the liveness of partial return values (for functions returning a struct). This is more explicit to prevent unwanted changes in the return value. In particular, deadargelim now canonicalizes a function returning {i32} to returning i32 and {} to void, if the struct returned is not used in its entirety, but only the single element is used. llvm-svn: 53606
* Let DAE keep a list of live functions, instead of simply marking all argumentsMatthijs Kooijman2008-07-151-6/+14
| | | | | | | and return values live for those functions. This doesn't change anything yet, but prepares for the coming commits. llvm-svn: 53601
* Split DAE::MarkLive into MarkLive and PropagateLiveness.Matthijs Kooijman2008-07-151-0/+6
| | | | llvm-svn: 53600
* Pass around const RetOrArg references instead of copying values. Also, markMatthijs Kooijman2008-07-151-3/+3
| | | | | | RetOrArg::getDescription() as const. llvm-svn: 53599
* Simplify debug code by using RetOrArg::getDescription().Matthijs Kooijman2008-07-151-6/+1
| | | | llvm-svn: 53598
* Fix indentation (intentionally left out of the previous commit).Matthijs Kooijman2008-07-151-51/+51
| | | | llvm-svn: 53592
* Move the deadargelim code for intrinsically alive functions into its ownMatthijs Kooijman2008-07-151-23/+25
| | | | | | method, to slightly simplify control flow. llvm-svn: 53591
* Restructure dead argument elimination, try #3 :-)Matthijs Kooijman2008-07-101-381/+551
| | | | | | | | | | | | | | | | | Rewrite the DeadArgumentElimination pass, to use a more explicit tracking of dependencies between return values and/or arguments. Also make the handling of arguments and return values the same. The pass now looks properly inside returned structs, but only at the first level (ie, not inside nested structs). This version fixed a few more bugs and was cleaned up a bit. It now passes all of LLVM's testing, and should still pass SPEC2006. There is still a minor bug with regard to returning nested structs. Since there is currently nothing that emits such IR, I will fix that in a seperate commit (partly because it requires a non-trivial fix). llvm-svn: 53400
* Restore DeadArgElim back to 52570. It's breaking 447.dealII.Evan Cheng2008-06-251-527/+374
| | | | llvm-svn: 52736
* Pacify gcc-4.3.Duncan Sands2008-06-251-1/+1
| | | | llvm-svn: 52723
* Fix a (false) warning on darwin.Matthijs Kooijman2008-06-251-1/+3
| | | | llvm-svn: 52705
* Fix some cosmetics in comments.Matthijs Kooijman2008-06-251-6/+6
| | | | llvm-svn: 52704
* Commit the new DeadArgElim pass again, this time with the gcc bootstrap ↵Matthijs Kooijman2008-06-241-374/+525
| | | | | | | | failures fixed. Also add a testcase to reproduce the gcc bootstrap failure in very much reduced form. llvm-svn: 52677
* Back out Matthijs' DAE patches. It's miscompiling gcc driver.Evan Cheng2008-06-211-518/+367
| | | | llvm-svn: 52570
* 80 column and trailing whitespace fixes.Matthijs Kooijman2008-06-201-49/+72
| | | | llvm-svn: 52539
* Don't let DeadArgumentElimination attempt to update callers when the returnMatthijs Kooijman2008-06-201-9/+12
| | | | | | type wasn't changed. llvm-svn: 52538
* Don't let DeadArgElimination change the return type ({} into void and {T}Matthijs Kooijman2008-06-201-7/+13
| | | | | | into T) when no return values are actually dead. llvm-svn: 52537
* Explicitely track if any arguments or return values were removed inMatthijs Kooijman2008-06-201-1/+10
| | | | | | | | DeadArgumentElimination and assert that the function type does not change if nothing was changed. This should catch subtle changes in function type that are not intended. llvm-svn: 52536
* Remove debug output.Matthijs Kooijman2008-06-201-4/+0
| | | | llvm-svn: 52535
* Recommit r52459, rewriting of the dead argument elimination pass.Matthijs Kooijman2008-06-201-369/+483
| | | | | | | | | | | | This is a fixed version that no longer uses multimap::equal_range, which resulted in a pointer invalidation problem. Also, DAE::InspectedFunctions was not really necessary, so it got removed. Lastly, this version no longer applies the extra arg hack on functions who did not have any arguments to start with. llvm-svn: 52532
* Revert r52459, which was causing an infinite loop or massive slowdown on ↵Owen Anderson2008-06-181-469/+369
| | | | | | | | MultiSource/Applications/SPASS, and possibly others as well. Please reapply once this is fixed. llvm-svn: 52465
* Rewrite the DeadArgumentElimination pass, to use a more explicit tracking ofMatthijs Kooijman2008-06-181-369/+469
| | | | | | | | | | | | | dependencies between return values and/or arguments. Also make the handling of arguments and return values the same. The pass now looks properly inside returned structs, but only at the first level (ie, not inside nested structs). Also add a testcase for testing various variations of (multiple) dead rerturn values. llvm-svn: 52459
* Use use_iterator::getOperandNo instead of CallSite::hasArgument to check if aMatthijs Kooijman2008-06-051-7/+6
| | | | | | | function is passed as an argument instead of called. Also do this check a bit earlier. llvm-svn: 51990
OpenPOWER on IntegriCloud