summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/ArgumentPromotion
Commit message (Collapse)AuthorAgeFilesLines
...
* DI: Fold constant arguments into a single MDStringDuncan P. N. Exon Smith2014-10-021-3/+3
| | | | | | | | | | | | | This patch addresses the first stage of PR17891 by folding constant arguments together into a single MDString. Integers are stringified and a `\0` character is used as a separator. Part of PR17891. Note: I've attached my testcases upgrade scripts to the PR. If I've just broken your out-of-tree testcases, they might help. llvm-svn: 218914
* Don't promote byval pointer arguments when padding mattersReid Kleckner2014-08-282-0/+60
| | | | | | | | | | | | | | | | Don't promote byval pointer arguments when when their size in bits is not equal to their alloc size in bits. This can happen for x86_fp80, where the size in bits is 80 but the alloca size in bits in 128. Promoting these types can break passing unions of x86_fp80s and other types. Patch by Thomas Jablin! Reviewed By: rnk Differential Revision: http://reviews.llvm.org/D5057 llvm-svn: 216693
* ArgPromotion: Don't touch variadic functionsReid Kleckner2014-08-251-0/+28
| | | | | | | | | | | | | | | | Adding, removing, or changing non-pack parameters can change the ABI classification of pack parameters. Clang and other frontends encode the classification in the IR of the call site, but the callee side determines it dynamically based on the number of registers consumed so far. Changing the prototype affects the number of registers consumed would break such code. Dead argument elimination performs a similar task and already has a similar check to avoid this problem. Patch by Thomas Jablin! llvm-svn: 216421
* ArgPromo+DebugInfo: Handle updating debug info over multiple applications of ↵David Blaikie2014-07-231-6/+7
| | | | | | | | | | | | | | | | | | | | | | argument promotion. While the subprogram map cache used by Dead Argument Elimination works there, I made a mistake when reusing it for Argument Promotion in r212128 because ArgPromo may transform functions more than once whereas DAE transforms each function only once, removing all the dead arguments in one go. To address this, ensure that the map is updated after each argument promotion. In retrospect it might be a little wasteful to create a map of all subprograms when only handling a single CGSCC, but the alternative is walking the debug info for each function in the CGSCC that gets updated. It's not clear to me what the right tradeoff is there, but since the current tradeoff seems to be working OK (and the code to keep things updated is very cheap), let's stick with that for now. llvm-svn: 213805
* Test debug info in arg promotion with an actual promotion case, rather than ↵David Blaikie2014-07-231-5/+8
| | | | | | | | | a degenerate arg promotion that's actually DAE performed by ArgPromo Also the debug location I had here was bogus, describing the location of the call site as in the callee - and unnecessary, so just drop it. llvm-svn: 213803
* DebugInfo: Keep track of subprograms who's arguments have been promoted.David Blaikie2014-07-011-4/+9
| | | | | | | | | | | | Matching behavior with DeadArgumentElimination (and leveraging some now-common infrastructure), keep track of the function from debug info metadata if arguments are promoted. This may produce interesting debug info - since the arguments may be missing or of different types... but at least backtraces, inlining, etc, will be correct. llvm-svn: 212128
* Convert some byval argpromotion grep tests to FileCheckReid Kleckner2014-06-303-44/+58
| | | | | | | Surprisingly, the i32* byval parameter is not transformed by argpromotion. llvm-svn: 212067
* Remove unnecessary datalayout string from a test case.David Blaikie2014-06-301-1/+1
| | | | llvm-svn: 212063
* ArgumentPromotion: Propagate debug locations on calls for which arguments ↵David Blaikie2014-06-271-0/+17
| | | | | | are promoted. llvm-svn: 211872
* IR: Conservatively verify inalloca argumentsDavid Majnemer2014-04-301-2/+2
| | | | | | | | | | | | Summary: Try to spot obvious mismatches with inalloca use. Reviewers: rnk Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D3572 llvm-svn: 207676
* Update optimization passes to handle inalloca argumentsReid Kleckner2014-01-281-0/+49
| | | | | | | | | | | | | | | 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 llvm-svn: 200281
* Note the PR number.Rafael Espindola2014-01-231-0/+1
| | | | llvm-svn: 199932
* Remove tail marker when changing an argument to an alloca.Rafael Espindola2014-01-231-0/+19
| | | | | | | | | | 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. llvm-svn: 199909
* ArgumentPromotion: correctly transfer TBAA tags and alignments.Manman Ren2013-11-151-0/+52
| | | | | | | | | | | | | | 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 llvm-svn: 194846
* [tests] Cleanup initialization of test suffixes.Daniel Dunbar2013-08-161-1/+0
| | | | | | | | | | | | | | | | | - 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. llvm-svn: 188513
* Update some EH tests that were violating the new EH model.Bill Wendling2013-03-211-3/+5
| | | | | | | The landingpad instruction needs to be the first non-PHI instruction in the unwind destination block. llvm-svn: 177650
* Use references to attribute groups on the call/invoke instructions.Bill Wendling2013-02-221-2/+2
| | | | | | | 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. llvm-svn: 175877
* Modify the LLVM assembly output so that it uses references to represent ↵Bill Wendling2013-02-201-1/+3
| | | | | | | | | | | function attributes. This makes the LLVM assembly look better. E.g.: define void @foo() #0 { ret void } attributes #0 = { nounwind noinline ssp } llvm-svn: 175605
* FileCheck-ize the tests.Bill Wendling2013-02-111-7/+9
| | | | llvm-svn: 174865
* Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ↵Dmitri Gribenko2012-12-301-1/+1
| | | | | | | | ModuleID This is done to avoid odd test failures, like the one fixed in r171243. llvm-svn: 171250
* Fix the remaining TCL-style quotes found in the testsuite. This isChandler Carruth2012-07-021-1/+1
| | | | | | | | | | | | | | | | | 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. =/ llvm-svn: 159547
* Convert all tests using TCL-style quoting to use shell-style quoting.Chandler Carruth2012-07-023-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 159525
* Replace all instances of dg.exp file with lit.local.cfg, since all tests are ↵Eli Bendersky2012-02-162-3/+1
| | | | | | | | 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. llvm-svn: 150664
* fix PR8932, a case where arg promotion could infinitely promote.Chris Lattner2011-01-161-0/+21
| | | | llvm-svn: 123574
* Make BasicAliasAnalysis a normal AliasAnalysis implementation whichDan Gohman2010-10-181-1/+1
| | | | | | | | | | | | 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. llvm-svn: 116720
* Fix rdar://7879828 - crash in CallGraph, a self host issue.Chris Lattner2010-04-201-0/+38
| | | | | | | | 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. llvm-svn: 101845
* Make opt default to not adding a target data string and update tests that ↵Kenneth Uildriks2009-11-035-0/+5
| | | | | | depend on target data to supply it within the test llvm-svn: 85900
* Change tests from "opt %s" to "opt < %s" so that opt doesn't see theDan Gohman2009-09-1114-14/+14
| | | | | | | | 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. llvm-svn: 81537
* Use opt -S instead of piping bitcode output through llvm-dis.Dan Gohman2009-09-0810-10/+10
| | | | llvm-svn: 81257
* Change these tests to feed the assembly files to opt directly, insteadDan Gohman2009-09-0814-14/+14
| | | | | | of using llvm-as, now that opt supports this. llvm-svn: 81226
* Change CallGraphNode to maintain it's Function as an AssertingVHChris Lattner2009-09-011-0/+23
| | | | | | | | | | | | 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. llvm-svn: 80663
* Fix typo.Owen Anderson2009-04-231-2/+1
| | | | llvm-svn: 69865
* Testcase for PR3085.Owen Anderson2009-04-231-0/+1945
| | | | llvm-svn: 69863
* Update the callgraph correctly in ArgumentPromotion.Duncan Sands2008-09-082-0/+37
| | | | llvm-svn: 55895
* Restructure ArgumentPromotion a bit. Instead of just having a single booleanMatthijs Kooijman2008-07-291-0/+25
| | | | | | | | | | | | | 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. llvm-svn: 54159
* Fix two more not-grep tests that were missing llvm-dis.Dan Gohman2008-06-091-1/+1
| | | | llvm-svn: 52159
* sabre brings to my attention that the 'tr' suffix is also obsoleteGabor Greif2008-05-201-1/+1
| | | | llvm-svn: 51349
* Rename the last test with .llx extension to .ll, resolve duplicate test by ↵Gabor Greif2008-05-201-1/+1
| | | | | | renaming to isnan2. Now that no test has llx ending there is no need to search for them from dg.exp too. llvm-svn: 51328
* Update old-style syntax in some "not grep" tests.Dan Gohman2008-05-011-1/+1
| | | | llvm-svn: 50560
* Remove llvm-upgrade and update test cases.Tanya Lattner2008-03-015-73/+72
| | | | llvm-svn: 47793
* Don't drop function/call return attributes like 'nounwind'.Duncan Sands2008-02-011-0/+15
| | | | llvm-svn: 46645
* Fix arg promotion to propagate the correct attrs on the calls toChris Lattner2008-01-171-0/+25
| | | | | | | promoted functions. This is important for varargs calls in particular. Thanks to duncan for providing a great testcase. llvm-svn: 46108
* add a test to ensure that argpromote of one argument doesn't Chris Lattner2008-01-151-0/+26
| | | | | | break the byval attr on some other argument. llvm-svn: 46025
* Teach argpromote to ruthlessly hack small byval structs when it canChris Lattner2008-01-111-0/+24
| | | | | | | | | | | | | | | | | | | | | | 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)... llvm-svn: 45886
* Convert .cvsignore filesJohn Criswell2007-06-291-3/+0
| | | | llvm-svn: 37801
* this test is now in Target/README.txtChris Lattner2007-05-051-17/+0
| | | | llvm-svn: 36812
* PR1319:Reid Spencer2007-04-153-4/+6
| | | | | | Upgrade tests to new Tcl exec based test harness requirements. llvm-svn: 36053
* Make the llvm-runtest function much more amenable by eliminating all theReid Spencer2007-04-111-1/+1
| | | | | | | | 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. llvm-svn: 35918
* Regression is gone, don't try to find it on clean target.Reid Spencer2007-01-178-0/+123
llvm-svn: 33296
OpenPOWER on IntegriCloud