summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/PruneEH
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Temporarily Revert "Add basic loop fusion pass.""Eric Christopher2019-04-1711-0/+343
| | | | | | | | The reversion apparently deleted the test/Transforms directory. Will be re-reverting again. llvm-svn: 358552
* Temporarily Revert "Add basic loop fusion pass."Eric Christopher2019-04-1711-343/+0
| | | | | | | | As it's causing some bot failures (and per request from kbarton). This reverts commit r358543/ab70da07286e618016e78247e4a24fcb84077fda. llvm-svn: 358546
* [PruneEH] Don't split musttail call from retJoseph Tremoulet2019-04-021-0/+15
| | | | | | | | | | | | | | | | | | | Summary: When inserting an `unreachable` after a noreturn call, we must ensure that it's not a musttail call to avoid breaking the IR invariants for musttail calls. Reviewers: fedor.sergeev, majnemer Reviewed By: majnemer Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60079 llvm-svn: 357483
* [Transforms] Preserve metadata when converting invoke to call.Michael Kruse2018-12-141-0/+44
| | | | | | | | | | | | | | | The `changeToCall` function did not preserve the invoke's metadata. Currently, there is probably no metadata that depends on being applied on a CallInst or InvokeInst. Therefore we can replace the instruction's metadata. This fixes http://llvm.org/PR39994 Suggested-by: Moritz Kreutzer <moritz.kreutzer@siemens.com> Differential Revision: https://reviews.llvm.org/D55666 llvm-svn: 349170
* [PM][FunctionAttrs] add NoUnwind attribute inference to ↵Fedor Sergeev2018-03-238-12/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PostOrderFunctionAttrs pass Summary: This was motivated by absence of PrunEH functionality in new PM. It was decided that a proper way to do PruneEH is to add NoUnwind inference into PostOrderFunctionAttrs and then perform normal SimplifyCFG on top. This change generalizes attribute handling implemented for (a removal of) Convergent attribute, by introducing a generic builder-like class AttributeInferer It registers all the attribute inference requests, storing per-attribute predicates into a vector, and then goes through an SCC Node, scanning all the instructions for not breaking attribute assumptions. The main idea is that as soon all the instructions from all the functions of SCC Node conform to attribute assumptions then we are free to infer the attribute as set for all the functions of SCC Node. It handles two distinct cases of attributes: - those that might break due to derefinement of the function code for these attributes we are allowed to apply inference only if all the functions are "exact definitions". Example - NoUnwind. - those that do not care about derefinement for these attributes we are allowed to apply inference as soon as we see any function definition. Example - removal of Convergent attribute. Also in this commit: * Converted all the FunctionAttrs tests to use FileCheck and added new-PM invocations to them * FunctionAttrs/convergent.ll test demonstrates a difference in behavior between new and old PM implementations. Marked with FIXME. * PruneEH tests were converted to new-PM as well, using function-attrs+simplify-cfg combo as intended * some of "other" tests were updated since function-attrs now infers 'nounwind' even for old PM pipeline * -disable-nounwind-inference hidden option added as a possible workaround for a supposedly rare case when nounwind being inferred by default presents a problem Reviewers: chandlerc, jlebar Reviewed By: jlebar Subscribers: eraman, llvm-commits Differential Revision: https://reviews.llvm.org/D44415 llvm-svn: 328377
* [PruneEH] Be correct in the face IPOSanjoy Das2016-10-031-0/+43
| | | | | | | This fixes one spot I had missed in r265762. Credit goes to Philip Reames for spotting this one! llvm-svn: 283137
* [PruneEH] Don't try to insert a terminator after another terminatorDavid Majnemer2016-01-231-0/+26
| | | | | | LLVM's BasicBlock has a single terminator, it is not valid to have two. llvm-svn: 258616
* [PruneEH] FuncletPads must not have undef operandsDavid Majnemer2016-01-231-0/+30
| | | | | | | | | Instead of RAUW with undef, replace the first non-token instruction with unreachable. This fixes PR26263. llvm-svn: 258611
* [OperandBundles] Have PruneEH work correct with operand bundles.Sanjoy Das2015-12-081-0/+26
| | | | | | | | For an invoke with operand bundles, the [op_begin(), op_end()-3] range can contain things other than invoke arguments. This change teaches PruneEH to use arg_begin() and arg_end() explicitly. llvm-svn: 255073
* [PruneEH] A naked, noinline function can return via InlineAsmDavid Majnemer2015-06-271-0/+21
| | | | | | | | | | The PruneEH pass tries to annotate functions as 'noreturn' if it doesn't see a ReturnInst. However, a naked function containing inline assembly can contain control flow leaving the function. This fixes PR23971. llvm-svn: 240876
* Move the personality function from LandingPadInst to FunctionDavid Majnemer2015-06-173-8/+8
| | | | | | | | | | | | | | | | | | | The personality routine currently lives in the LandingPadInst. This isn't desirable because: - All LandingPadInsts in the same function must have the same personality routine. This means that each LandingPadInst beyond the first has an operand which produces no additional information. - There is ongoing work to introduce EH IR constructs other than LandingPadInst. Moving the personality routine off of any one particular Instruction and onto the parent function seems a lot better than have N different places a personality function can sneak onto an exceptional function. Differential Revision: http://reviews.llvm.org/D10429 llvm-svn: 239940
* Fix invalid LLVM IR in PruneEH testsReid Kleckner2015-02-112-0/+9
| | | | llvm-svn: 228786
* Don't promote asynch EH invokes of nounwind functions to callsReid Kleckner2015-02-112-15/+31
| | | | | | | | | | | If the landingpad of the invoke is using a personality function that catches asynch exceptions, then it can catch a trap. Also add some landingpads to invalid LLVM IR test cases that lack them. Over-the-shoulder reviewed by David Majnemer. llvm-svn: 228782
* [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
* The normal edge of an invoke is not allowed to branch to a block with aEli Friedman2012-08-101-14/+0
| | | | | | landingpad. Enforce it in the verifier, and fix the regression tests to match. llvm-svn: 161697
* 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
* 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
* Update more tests to the new EH scheme.Bill Wendling2011-08-311-0/+3
| | | | llvm-svn: 138894
* manually upgrade a bunch of tests to modern syntax, and remove some thatChris Lattner2011-06-171-1445/+0
| | | | | | are either unreduced or only test old syntax. llvm-svn: 133228
* fix some failures my callgraph dump format change broke.Chris Lattner2010-04-231-1/+1
| | | | llvm-svn: 102197
* Delete useless trailing semicolons.Dan Gohman2010-01-051-1/+1
| | | | llvm-svn: 92740
* Change tests from "opt %s" to "opt < %s" so that opt doesn't see theDan Gohman2009-09-117-7/+7
| | | | | | | | 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-085-5/+5
| | | | llvm-svn: 81257
* Change these tests to feed the assembly files to opt directly, insteadDan Gohman2009-09-087-7/+7
| | | | | | of using llvm-as, now that opt supports this. llvm-svn: 81226
* Split the Add, Sub, and Mul instruction opcodes into separateDan Gohman2009-06-041-5/+5
| | | | | | | | | | | | | | | integer and floating-point opcodes, introducing FAdd, FSub, and FMul. For now, the AsmParser, BitcodeReader, and IRBuilder all preserve backwards compatability, and the Core LLVM APIs preserve backwards compatibility for IR producers. Most front-ends won't need to change immediately. This implements the first step of the plan outlined here: http://nondot.org/sabre/LLVMNotes/IntegerOverflow.txt llvm-svn: 72897
* Do not inline functions with (dynamic) alloca intoDale Johannesen2009-01-081-0/+5
| | | | | | | | | | | functions that don't already have a (dynamic) alloca. Dynamic allocas cause inefficient codegen and we shouldn't propagate this (behavior follows gcc). Two existing tests assumed such inlining would be done; they are hacked by adding an alloca in the caller, preserving the point of the tests. llvm-svn: 61946
* Rationalize the names of passes that print information:Duncan Sands2008-09-231-2/+3
| | | | | | | | | | | | | | | | | -callgraph => print-callgraph -callscc => print-callgraph-sccs -cfgscc => print-cfg-sccs -externalfnconstants => print-externalfnconstants -print => print-function -print-alias-sets (no change) -print-callgraph => dot-callgraph -print-cfg => dot-cfg -print-cfg-only => dot-cfg-only -print-dom-info (no change) -printm => print-module -printusedtypes => print-used-types llvm-svn: 56487
* Test the callgraph directly for the missing edge.Duncan Sands2008-09-191-1/+2
| | | | llvm-svn: 56338
* When PruneEH turned an invoke into an ordinaryDuncan Sands2008-09-061-0/+1438
| | | | | | | | | | | | call (thus changing the call site) it didn't inform the callgraph about this. But the call site does matter - as shown by the testcase, the callgraph become invalid after the inliner ran (with an edge between two functions simply missing), resulting in wrong deductions by GlobalsModRef. llvm-svn: 55872
* Test that prune-eh doesn't make deductions basedDuncan Sands2008-06-091-0/+12
| | | | | | on bodies of functions with weak linkage. llvm-svn: 52141
* 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
* Remove 'unwinds to' support from mainline. This patch undoes r47802 r47989Nick Lewycky2008-04-251-15/+0
| | | | | | r48047 r48084 r48085 r48086 r48088 r48096 r48099 r48109 and r48123. llvm-svn: 50265
* rename *.llx -> *.ll, last batch.Chris Lattner2008-04-193-0/+0
| | | | llvm-svn: 49971
* Upgrade tests.Tanya Lattner2008-03-193-33/+34
| | | | llvm-svn: 48536
* Turn unwind_to into "unwinds to".Nick Lewycky2008-03-101-4/+4
| | | | llvm-svn: 48123
* Prune the unwind_to labels on BBs that don't need them. Another step in theNick Lewycky2008-03-091-0/+15
| | | | | | removal of invoke, PR1269. llvm-svn: 48084
* Make PruneEH update the nounwind/noreturn attributesDuncan Sands2007-12-103-27/+27
| | | | | | on functions as it calculates them. llvm-svn: 44802
* Convert .cvsignore filesJohn Criswell2007-06-291-3/+0
| | | | llvm-svn: 37801
* For PR1319:Reid Spencer2007-04-152-3/+4
| | | | | | | | | | Upgrade to use new Tcl exec based test harness. This exposes 3 bugs that were previously not being reported: test/Transforms/GlobalDCE/2002-08-17-FunctionDGE.ll test/Transforms/GlobalOpt/memset.ll test/Transforms/IndVarsSimplify/exit_value_tests.llx llvm-svn: 36065
* 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-177-0/+82
llvm-svn: 33296
OpenPOWER on IntegriCloud