summaryrefslogtreecommitdiff
path: root/test/Transforms/DeadArgElim
Commit message (Collapse)AuthorAge
* Update some tests to the new EH scheme.Bill Wendling2011-09-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138925 91177308-0d34-0410-b5e6-96231b3b80d8
* Move "atomic" and "volatile" designations on instructions after the opcodeEli Friedman2011-08-12
| | | | | | | | | | | | of the instruction. Note that this change affects the existing non-atomic load and store instructions; the parser now accepts both forms, and the change is noted in the release notes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137527 91177308-0d34-0410-b5e6-96231b3b80d8
* Land the long talked about "type system rewrite" patch. ThisChris Lattner2011-07-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | patch brings numerous advantages to LLVM. One way to look at it is through diffstat: 109 files changed, 3005 insertions(+), 5906 deletions(-) Removing almost 3K lines of code is a good thing. Other advantages include: 1. Value::getType() is a simple load that can be CSE'd, not a mutating union-find operation. 2. Types a uniqued and never move once created, defining away PATypeHolder. 3. Structs can be "named" now, and their name is part of the identity that uniques them. This means that the compiler doesn't merge them structurally which makes the IR much less confusing. 4. Now that there is no way to get a cycle in a type graph without a named struct type, "upreferences" go away. 5. Type refinement is completely gone, which should make LTO much MUCH faster in some common cases with C++ code. 6. Types are now generally immutable, so we can use "Type *" instead "const Type *" everywhere. Downsides of this patch are that it removes some functions from the C API, so people using those will have to upgrade to (not yet added) new API. "LLVM 3.0" is the right time to do this. There are still some cleanups pending after this, this patch is large enough as-is. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134829 91177308-0d34-0410-b5e6-96231b3b80d8
* manually upgrade a bunch of tests to modern syntax, and remove some thatChris Lattner2011-06-17
| | | | | | | | are either unreduced or only test old syntax. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133228 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix grammar in test.Nick Lewycky2011-05-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131831 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an obvious missing safety check to DAE::RemoveDeadArgumentsFromCallers.Eli Friedman2011-03-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126720 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach DAE to look for functions whose arguments are unused, and change all ↵Anders Carlsson2011-01-16
| | | | | | callers to pass in an undefvalue instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123596 91177308-0d34-0410-b5e6-96231b3b80d8
* Preserve debug info attached with call instruction while eliminating dead ↵Devang Patel2010-04-30
| | | | | | | | | argument. Radar 7927803 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102760 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r101213.Nick Lewycky2010-04-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101231 91177308-0d34-0410-b5e6-96231b3b80d8
* Commit testcase for r101213.Nick Lewycky2010-04-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101214 91177308-0d34-0410-b5e6-96231b3b80d8
* add newlines at the end of files.Chris Lattner2010-04-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100705 91177308-0d34-0410-b5e6-96231b3b80d8
* Speculatively revert r94322 to see if it fixes darwin selfhost buildbot.Nick Lewycky2010-01-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94331 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach DAE that even though it can't modify the function signature of anNick Lewycky2010-01-23
| | | | | | | | externally visible function, it can still find all callers of it and replace the parameters to a dead argument with undef. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94322 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete useless trailing semicolons.Dan Gohman2010-01-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92740 91177308-0d34-0410-b5e6-96231b3b80d8
* Change tests from "opt %s" to "opt < %s" so that opt doesn't see theDan Gohman2009-09-11
| | | | | | | | | input filename so that opt doesn't print the input filename in the output so that grep lines in the tests don't unintentionally match strings in the input filename. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81537 91177308-0d34-0410-b5e6-96231b3b80d8
* Use opt -S instead of piping bitcode output through llvm-dis.Dan Gohman2009-09-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81257 91177308-0d34-0410-b5e6-96231b3b80d8
* Change these tests to feed the assembly files to opt directly, insteadDan Gohman2009-09-08
| | | | | | | of using llvm-as, now that opt supports this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81226 91177308-0d34-0410-b5e6-96231b3b80d8
* aha, DAE does have to think about PHI nodes. Many thanks to "Dr Evil" (aka ↵Chris Lattner2009-03-18
| | | | | | | | | Duncan) for pointing this out :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67212 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR3807 by inserting 'insertelement' instructions in the normal dest of Chris Lattner2009-03-18
| | | | | | | an invoke instead of after the invoke (in its block), which is invalid. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67139 91177308-0d34-0410-b5e6-96231b3b80d8
* adjust test to make it more robustChris Lattner2009-03-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65739 91177308-0d34-0410-b5e6-96231b3b80d8
* Support inreg, zext and sext as return value attributes.Devang Patel2008-09-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56801 91177308-0d34-0410-b5e6-96231b3b80d8
* Un-XFAIL multdeadretval, since instcombine now properly handles the mess ↵Matthijs Kooijman2008-07-16
| | | | | | deadargelim leaves behind :-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53674 91177308-0d34-0410-b5e6-96231b3b80d8
* XFAIL the multdeadretval test for now, I will be fixing instcombine to make ↵Matthijs Kooijman2008-07-15
| | | | | | it work again tomorrow. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53614 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a few tests which no longer hold for deadargelim (since it is nowMatthijs Kooijman2008-07-15
| | | | | | | | | allowed to canonicalize return values). Add a test that checks if return value and function attributes are not removed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53612 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a testcase for the canonicalizations now performed by deadargelim.Matthijs Kooijman2008-07-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53611 91177308-0d34-0410-b5e6-96231b3b80d8
* Make deadargelim a bit less smart, so it doesn't choke on nested structs asMatthijs Kooijman2008-07-15
| | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53608 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo.Matthijs Kooijman2008-07-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53605 91177308-0d34-0410-b5e6-96231b3b80d8
* Restructure dead argument elimination, try #3 :-)Matthijs Kooijman2008-07-10
| | | | | | | | | | | | | | | | | | 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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53400 91177308-0d34-0410-b5e6-96231b3b80d8
* XFAIL for now.Evan Cheng2008-06-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52795 91177308-0d34-0410-b5e6-96231b3b80d8
* Commit the new DeadArgElim pass again, this time with the gcc bootstrap ↵Matthijs Kooijman2008-06-24
| | | | | | | | | failures fixed. Also add a testcase to reproduce the gcc bootstrap failure in very much reduced form. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52677 91177308-0d34-0410-b5e6-96231b3b80d8
* This file is empty.Duncan Sands2008-06-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52596 91177308-0d34-0410-b5e6-96231b3b80d8
* Back out Matthijs' DAE patches. It's miscompiling gcc driver.Evan Cheng2008-06-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52570 91177308-0d34-0410-b5e6-96231b3b80d8
* Add testcase that checks that DeadArgElim doesn't touch stuff it shouldn't ↵Matthijs Kooijman2008-06-20
| | | | | | touch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52540 91177308-0d34-0410-b5e6-96231b3b80d8
* Recommit r52459, rewriting of the dead argument elimination pass.Matthijs Kooijman2008-06-20
| | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52532 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove this test until the corresponding patch is reapplied because it's ↵Owen Anderson2008-06-18
| | | | | | causing make check to crash for some people. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52473 91177308-0d34-0410-b5e6-96231b3b80d8
* Rewrite the DeadArgumentElimination pass, to use a more explicit tracking ofMatthijs Kooijman2008-06-18
| | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52459 91177308-0d34-0410-b5e6-96231b3b80d8
* Store the result of multiple identical run lines in a temporary file.Matthijs Kooijman2008-06-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52314 91177308-0d34-0410-b5e6-96231b3b80d8
* sabre brings to my attention that the 'tr' suffix is also obsoleteGabor Greif2008-05-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51349 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename the last test with .llx extension to .ll, resolve duplicate test by ↵Gabor Greif2008-05-20
| | | | | | renaming to isnan2. Now that no test has llx ending there is no need to search for them from dg.exp too. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51328 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove llvm-upgrade and update test cases.Tanya Lattner2008-03-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47793 91177308-0d34-0410-b5e6-96231b3b80d8
* Test case for varargs parameter attribute issue I just fixed.Evan Cheng2008-01-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46127 91177308-0d34-0410-b5e6-96231b3b80d8
* When DAE drops the varargs part of a function, ensure anyDuncan Sands2008-01-11
| | | | | | | attributes on the vararg call arguments are also dropped. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45892 91177308-0d34-0410-b5e6-96231b3b80d8
* Make DAE not wipe out attributes on calls, and not dropDuncan Sands2007-12-21
| | | | | | | | | | | | | | | | return attributes on the floor. In the case of a call to a varargs function where the varargs arguments are being removed, any call attributes on those arguments need to be dropped. I didn't do this because I plan to make it illegal to have such attributes (see next patch). With this change, compiling the gcc filter2 eh test at -O0 and then running opt -std-compile-opts on it results in a correctly working program (compiling at -O1 or higher results in the test failing due to a problem with how we output eh info into the IR). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45285 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR1735 and Transforms/DeadArgElim/2007-10-18-VarargsReturn.ll byChris Lattner2007-10-18
| | | | | | | fixing some obviously broken code :( git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43141 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert .cvsignore filesJohn Criswell2007-06-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37801 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1319:Reid Spencer2007-04-16
| | | | | | | | | Remove && from the end of the lines to prevent tests from throwing run lines into the background. Also, clean up places where the same command is run multiple times by using a temporary file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36142 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1319:Reid Spencer2007-04-15
| | | | | | | Upgrade to use new Tcl exec based test harness. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36062 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the llvm-runtest function much more amenable by eliminating all theReid Spencer2007-04-11
| | | | | | | | | global variables that needed to be passed in. This makes it possible to add new global variables with only a couple changes (Makefile and llvm-dg.exp) instead of touching every single dg.exp file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35918 91177308-0d34-0410-b5e6-96231b3b80d8
* Testcase for a bug responsible for GCC bootstrap failure, fallout from PR411.Chris Lattner2007-02-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34004 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the llvm-upgrade program to upgrade llvm assembly.Reid Spencer2006-12-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32115 91177308-0d34-0410-b5e6-96231b3b80d8