summaryrefslogtreecommitdiff
path: root/test/Transforms/ArgumentPromotion
Commit message (Collapse)AuthorAge
* Update optimization passes to handle inalloca argumentsReid Kleckner2014-01-28
| | | | | | | | | | | | | | | Summary: I searched Transforms/ and Analysis/ for 'ByVal' and updated those call sites to check for inalloca if appropriate. I added tests for any change that would allow an optimization to fire on inalloca. Reviewers: nlewycky Differential Revision: http://llvm-reviews.chandlerc.com/D2449 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200281 91177308-0d34-0410-b5e6-96231b3b80d8
* Note the PR number.Rafael Espindola2014-01-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199932 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove tail marker when changing an argument to an alloca.Rafael Espindola2014-01-23
| | | | | | | | | | Argument promotion can replace an argument of a call with an alloca. This requires clearing the tail marker as it is very likely that the callee is now using an alloca in the caller. This fixes pr14710. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199909 91177308-0d34-0410-b5e6-96231b3b80d8
* ArgumentPromotion: correctly transfer TBAA tags and alignments.Manman Ren2013-11-15
| | | | | | | | | | | | | | | We used to use std::map<IndicesVector, LoadInst*> for OriginalLoads, and when we try to promote two arguments, they will both write to OriginalLoads causing created loads for the two arguments to have the same original load. And the same tbaa tag and alignment will be put to the created loads for the two arguments. The fix is to use std::map<std::pair<Argument*, IndicesVector>, LoadInst*> for OriginalLoads, so each Argument will write to different parts of the map. PR17906 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194846 91177308-0d34-0410-b5e6-96231b3b80d8
* [tests] Cleanup initialization of test suffixes.Daniel Dunbar2013-08-16
| | | | | | | | | | | | | | | | | - Instead of setting the suffixes in a bunch of places, just set one master list in the top-level config. We now only modify the suffix list in a few suites that have one particular unique suffix (.ml, .mc, .yaml, .td, .py). - Aside from removing the need for a bunch of lit.local.cfg files, this enables 4 tests that were inadvertently being skipped (one in Transforms/BranchFolding, a .s file each in DebugInfo/AArch64 and CodeGen/PowerPC, and one in CodeGen/SI which is now failing and has been XFAILED). - This commit also fixes a bunch of config files to use config.root instead of older copy-pasted code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188513 91177308-0d34-0410-b5e6-96231b3b80d8
* Update some EH tests that were violating the new EH model.Bill Wendling2013-03-21
| | | | | | | | The landingpad instruction needs to be the first non-PHI instruction in the unwind destination block. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177650 91177308-0d34-0410-b5e6-96231b3b80d8
* Use references to attribute groups on the call/invoke instructions.Bill Wendling2013-02-22
| | | | | | | | Listing all of the attributes for the callee of a call/invoke instruction is way too much and makes the IR unreadable. Use references to attributes instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175877 91177308-0d34-0410-b5e6-96231b3b80d8
* Modify the LLVM assembly output so that it uses references to represent ↵Bill Wendling2013-02-20
| | | | | | | | | | | | function attributes. This makes the LLVM assembly look better. E.g.: define void @foo() #0 { ret void } attributes #0 = { nounwind noinline ssp } git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175605 91177308-0d34-0410-b5e6-96231b3b80d8
* FileCheck-ize the tests.Bill Wendling2013-02-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174865 91177308-0d34-0410-b5e6-96231b3b80d8
* Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ↵Dmitri Gribenko2012-12-30
| | | | | | | | | ModuleID This is done to avoid odd test failures, like the one fixed in r171243. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171250 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the remaining TCL-style quotes found in the testsuite. This isChandler Carruth2012-07-02
| | | | | | | | | | | | | | | | | another mechanical change accomplished though the power of terrible Perl scripts. I have manually switched some "s to 's to make escaping simpler. While I started this to fix tests that aren't run in all configurations, the massive number of tests is due to a really frustrating fragility of our testing infrastructure: things like 'grep -v', 'not grep', and 'expected failures' can mask broken tests all too easily. Essentially, I'm deeply disturbed that I can change the testsuite so radically without causing any change in results for most platforms. =/ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159547 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert all tests using TCL-style quoting to use shell-style quoting.Chandler Carruth2012-07-02
| | | | | | | | | | | | | | | | | | | | | | | | This was done through the aid of a terrible Perl creation. I will not paste any of the horrors here. Suffice to say, it require multiple staged rounds of replacements, state carried between, and a few nested-construct-parsing hacks that I'm not proud of. It happens, by luck, to be able to deal with all the TCL-quoting patterns in evidence in the LLVM test suite. If anyone is maintaining large out-of-tree test trees, feel free to poke me and I'll send you the steps I used to convert things, as well as answer any painful questions etc. IRC works best for this type of thing I find. Once converted, switch the LLVM lit config to use ShTests the same as Clang. In addition to being able to delete large amounts of Python code from 'lit', this will also simplify the entire test suite and some of lit's architecture. Finally, the test suite runs 33% faster on Linux now. ;] For my 16-hardware-thread (2x 4-core xeon e5520): 36s -> 24s git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159525 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace all instances of dg.exp file with lit.local.cfg, since all tests are ↵Eli Bendersky2012-02-16
| | | | | | | | | | | run with LIT now and now Dejagnu. dg.exp is no longer needed. Patch reviewed by Daniel Dunbar. It will be followed by additional cleanup patches. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150664 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PR8932, a case where arg promotion could infinitely promote.Chris Lattner2011-01-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123574 91177308-0d34-0410-b5e6-96231b3b80d8
* Make BasicAliasAnalysis a normal AliasAnalysis implementation whichDan Gohman2010-10-18
| | | | | | | | | | | | | does normal initialization and normal chaining. Change the default AliasAnalysis implementation to NoAlias. Update StandardCompileOpts.h and friends to explicitly request BasicAliasAnalysis. Update tests to explicitly request -basicaa. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116720 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix rdar://7879828 - crash in CallGraph, a self host issue.Chris Lattner2010-04-20
| | | | | | | | | Arg promotion was deleting call graph nodes that still had references from the 'indirect' CGN. Like the inliner, it should only delete the function if all references are gone. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101845 91177308-0d34-0410-b5e6-96231b3b80d8
* Make opt default to not adding a target data string and update tests that ↵Kenneth Uildriks2009-11-03
| | | | | | depend on target data to supply it within the test git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85900 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
* Change CallGraphNode to maintain it's Function as an AssertingVHChris Lattner2009-09-01
| | | | | | | | | | | | | for sanity. This didn't turn up any bugs. Change CallGraphNode to maintain its "callsite" information in the call edges list as a WeakVH instead of as an instruction*. This fixes a broad class of dangling pointer bugs, and makes CallGraph have a number of useful invariants again. This fixes the class of problem indicated by PR4029 and PR3601. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80663 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo.Owen Anderson2009-04-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69865 91177308-0d34-0410-b5e6-96231b3b80d8
* Testcase for PR3085.Owen Anderson2009-04-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69863 91177308-0d34-0410-b5e6-96231b3b80d8
* Update the callgraph correctly in ArgumentPromotion.Duncan Sands2008-09-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55895 91177308-0d34-0410-b5e6-96231b3b80d8
* Restructure ArgumentPromotion a bit. Instead of just having a single booleanMatthijs Kooijman2008-07-29
| | | | | | | | | | | | | | | that says "unconditional loads from this argument are safe", we now keep track of the safety per set of indices from which loads happen. This prevents ArgPromotion from promoting loads that aren't really valid. As an added effect, this will now disregard the the type of the indices passed to a GEP, so "load GEP %A, i32 1" and "load GEP %A, i64 1" will result in a single argument, not two. This fixes PR2598, for which a testcase has been added as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54159 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix two more not-grep tests that were missing llvm-dis.Dan Gohman2008-06-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52159 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
* Update old-style syntax in some "not grep" tests.Dan Gohman2008-05-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50560 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
* Don't drop function/call return attributes like 'nounwind'.Duncan Sands2008-02-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46645 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix arg promotion to propagate the correct attrs on the calls toChris Lattner2008-01-17
| | | | | | | | promoted functions. This is important for varargs calls in particular. Thanks to duncan for providing a great testcase. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46108 91177308-0d34-0410-b5e6-96231b3b80d8
* add a test to ensure that argpromote of one argument doesn't Chris Lattner2008-01-15
| | | | | | | break the byval attr on some other argument. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46025 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach argpromote to ruthlessly hack small byval structs when it canChris Lattner2008-01-11
| | | | | | | | | | | | | | | | | | | | | | | | get away with it, which exposes opportunities to eliminate the memory objects entirely. For example, we now compile byval.ll to: define internal void @f1(i32 %b.0, i64 %b.1) { entry: %tmp2 = add i32 %b.0, 1 ; <i32> [#uses=0] ret void } define i32 @main() nounwind { entry: call void @f1( i32 1, i64 2 ) ret i32 0 } This seems like it would trigger a lot for code that passes around small structs (e.g. SDOperand's or _Complex)... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45886 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
* this test is now in Target/README.txtChris Lattner2007-05-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36812 91177308-0d34-0410-b5e6-96231b3b80d8
* PR1319:Reid Spencer2007-04-15
| | | | | | | Upgrade tests to new Tcl exec based test harness requirements. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36053 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
* For PR950:Reid Spencer2006-12-31
| | | | | | | | | | | | | | | | | | | | | | | Update the test suite to accommodate the change from signed integer types to signless integer types. The changes were of only a few kinds: 1. Make sure llvm-upgrade is run on the source which does the bulk of the changes automatically. 2. Change things like "grep 'int'" to "grep 'i32'" 3. In several tests bitcasting caused the same name to be reused in the same type plane. These had to be manually fixed. The fix was (generally) to leave the bitcast and provide the instruction with a new name. This should not affect the semantics of the test. In a few cases, the bitcasts were known to be superfluous and irrelevant to the test case so they were removed. 4. One test case uses a bytecode file which needed to be updated to the latest bytecode format. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32789 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
* Promote GEP ubyte indices to uint. Backwards compatibility for 1.2 andReid Spencer2006-11-23
| | | | | | | | older features will be dropped soon and these test cases must not rely on the upgrade capability. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31896 91177308-0d34-0410-b5e6-96231b3b80d8
* xfail this for nowChris Lattner2006-09-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30398 91177308-0d34-0410-b5e6-96231b3b80d8
* Make this testcase actually recursive. I accidentally committed the wrong ↵Owen Anderson2006-09-02
| | | | | | copy last time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30059 91177308-0d34-0410-b5e6-96231b3b80d8
* Make ArgumentPromotion handle recursive functions that pass pointers in ↵Owen Anderson2006-09-02
| | | | | | their recursive calls. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30057 91177308-0d34-0410-b5e6-96231b3b80d8
* Added the ability to xfail based on llvmgcc versionTanya Lattner2006-04-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27635 91177308-0d34-0410-b5e6-96231b3b80d8
* Tired of wading through cvs's list ? files that are generated when buildingReid Spencer2006-03-23
| | | | | | | | | with srcdir = objdir to see what's okay and what's cruft. So, in goes a bunch of .cvsignore files to shut cvs up about known output from running "make check". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27009 91177308-0d34-0410-b5e6-96231b3b80d8
* Adding srcdir argTanya Lattner2004-11-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18020 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a testcase we should continue to argpromoteChris Lattner2004-11-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17717 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a testcase for a function we cannot legally promote the argument of.Chris Lattner2004-11-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17716 91177308-0d34-0410-b5e6-96231b3b80d8
* Adding subdirectory dg.exp files in order to be able to use dejagnu to only ↵Tanya Lattner2004-11-13
| | | | | | run specific tests (located in some subdirectory of Regression) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17712 91177308-0d34-0410-b5e6-96231b3b80d8