aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/Analysis/Dominators
AgeCommit message (Collapse)AuthorFilesLines
2024-02-05[Analysis] Convert tests to opaque pointers (NFC)Nikita Popov3-16/+16
2023-07-25test/.../print-dot-dom.ll: Avoid writing to cwd of test by creating/cding ↵David Blaikie1-0/+3
into %t instead The cwd of the test might not be writable.
2022-12-09[NFC] Port all Analysis/Dominators tests to `-passes=` syntaxRoman Lebedev3-3/+3
2022-12-08[opt] Disincentivize new tests from using old pass syntaxRoman Lebedev3-3/+3
Over the past day or so, i've took a large swing at our tests, and reduced the number of tests that were still using the old syntax from ~1800 to just 200. Left to handle: (as it is seen in this patch) * Transforms/LSR * Transforms/CGP * Transforms/TypePromotion * Transforms/HardwareLoops * Analysis/* * some misc. I think this is the right point to start actively refusing to honor the old syntax, except for the old tests, to prevent the old syntax from creeping back in. Thus, let's add temporary default-off flag, and if it is not passed refuse to accept old syntax. The tests that still need porting are annotated with this flag. Reviewed By: aeubanks Differential Revision: https://reviews.llvm.org/D139647
2022-10-07[opt] Don't translate legacy -analysis flag to require<analysis>Arthur Eubanks1-1/+0
Tests relying on this should explicitly use -passes='require<analysis>,foo'.
2022-01-05Introduce NewPM .dot printers for DomTreeDaniil Suchkov1-0/+71
This patch adds a couple of NewPM function passes (dot-dom and dot-dom-only) that dump DomTree into .dot files. Reviewed-By: aeubanks Differential Revision: https://reviews.llvm.org/D116629
2021-09-02[test][NewPM] Remove RUN lines using -analyzeArthur Eubanks2-7/+3
Only tests in llvm/test/Analysis. -analyze is legacy PM-specific. This only touches files with `-passes`. I looked through everything and made sure that everything had a new PM equivalent. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D109040
2020-09-15[Dominators][NewPM] Pin tests with -analyze to legacy PMArthur Eubanks2-2/+2
-analyze isn't supported in NPM. All affected tests have corresponding NPM RUN line.
2020-08-06[NewPM][LoopUnswitch] Pin loop-unswitch to legacy PM or use simple-loop-unswitchArthur Eubanks2-2/+2
As mentioned in http://lists.llvm.org/pipermail/llvm-dev/2020-July/143395.html, loop-unswitch has not been ported to the NPM. Instead people are using simple-loop-unswitch. Pin all tests in Transforms/LoopUnswitch to legacy PM and replace all other uses of loop-unswitch with simple-loop-unswitch. One test that didn't fit into the above was 2014-06-21-congruent-constant.ll which seems to only pass with loop-unswitch. That is also pinned to legacy PM. Now all tests containing "-loop-unswitch" anywhere in the test succeed with NPM turned on by default. Reviewed By: ychen Differential Revision: https://reviews.llvm.org/D85360
2017-06-30[Dominators] Don't compute DFS InOut numbers eagerly.Jakub Kuderski1-1/+1
Summary: DFS InOut numbers currently get eagerly computer upon DomTree construction. They are only needed to answer dome dominance queries and they get invalidated by updates and recalculations. Because of that, it is faster in practice to compute them lazily when they are actually needed. Clang built without this patch takes 6m 45s to boostrap on my machine, and with the patch applied 6m 38s. Reviewers: sanjoy, dberlin, chandlerc Reviewed By: dberlin Subscribers: davide, llvm-commits Differential Revision: https://reviews.llvm.org/D34296 llvm-svn: 306778
2016-07-25Remove useless pass from the pipeline in ↵Wei Mi1-2/+2
test/Analysis/Dominators/2007-01-14-BreakCritEdges.ll. llvm-svn: 276644
2016-07-22[PM] Port BreakCriticalEdges to the new PM.Wei Mi2-0/+2
Differential Revision: https://reviews.llvm.org/D22688 llvm-svn: 276449
2015-06-17Move the personality function from LandingPadInst to FunctionDavid Majnemer1-2/+2
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
2015-02-27[opaque pointer type] Add textual IR support for explicit type parameter to ↵David Blaikie1-1/+1
getelementptr instruction One of several parallel first steps to remove the target type of pointers, replacing them with a single opaque pointer type. This adds an explicit type parameter to the gep instruction so that when the first parameter becomes an opaque pointer type, the type to gep through is still available to the instructions. * This doesn't modify gep operators, only instructions (operators will be handled separately) * Textual IR changes only. Bitcode (including upgrade) and changing the in-memory representation will be in separate changes. * geps of vectors are transformed as: getelementptr <4 x float*> %x, ... ->getelementptr float, <4 x float*> %x, ... Then, once the opaque pointer type is introduced, this will ultimately look like: getelementptr float, <4 x ptr> %x with the unambiguous interpretation that it is a vector of pointers to float. * address spaces remain on the pointer, not the type: getelementptr float addrspace(1)* %x ->getelementptr float, float addrspace(1)* %x Then, eventually: getelementptr float, ptr addrspace(1) %x Importantly, the massive amount of test case churn has been automated by same crappy python code. I had to manually update a few test cases that wouldn't fit the script's model (r228970,r229196,r229197,r229198). The python script just massages stdin and writes the result to stdout, I then wrapped that in a shell script to handle replacing files, then using the usual find+xargs to migrate all the files. update.py: import fileinput import sys import re ibrep = re.compile(r"(^.*?[^%\w]getelementptr inbounds )(((?:<\d* x )?)(.*?)(| addrspace\(\d\)) *\*(|>)(?:$| *(?:%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|\[\[[a-zA-Z]|\{\{).*$))") normrep = re.compile( r"(^.*?[^%\w]getelementptr )(((?:<\d* x )?)(.*?)(| addrspace\(\d\)) *\*(|>)(?:$| *(?:%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|\[\[[a-zA-Z]|\{\{).*$))") def conv(match, line): if not match: return line line = match.groups()[0] if len(match.groups()[5]) == 0: line += match.groups()[2] line += match.groups()[3] line += ", " line += match.groups()[1] line += "\n" return line for line in sys.stdin: if line.find("getelementptr ") == line.find("getelementptr inbounds"): if line.find("getelementptr inbounds") != line.find("getelementptr inbounds ("): line = conv(re.match(ibrep, line), line) elif line.find("getelementptr ") != line.find("getelementptr ("): line = conv(re.match(normrep, line), line) sys.stdout.write(line) apply.sh: for name in "$@" do python3 `dirname "$0"`/update.py < "$name" > "$name.tmp" && mv "$name.tmp" "$name" rm -f "$name.tmp" done The actual commands: From llvm/src: find test/ -name *.ll | xargs ./apply.sh From llvm/src/tools/clang: find test/ -name *.mm -o -name *.m -o -name *.cpp -o -name *.c | xargs -I '{}' ../../apply.sh "{}" From llvm/src/tools/polly: find test/ -name *.ll | xargs ./apply.sh After that, check-all (with llvm, clang, clang-tools-extra, lld, compiler-rt, and polly all checked out). The extra 'rm' in the apply.sh script is due to a few files in clang's test suite using interesting unicode stuff that my python script was throwing exceptions on. None of those files needed to be migrated, so it seemed sufficient to ignore those cases. Reviewers: rafael, dexonsmith, grosser Differential Revision: http://reviews.llvm.org/D7636 llvm-svn: 230786
2015-01-14[PM] Port domtree to the new pass manager (at last).Chandler Carruth1-3/+6
This adds the domtree analysis to the new pass manager. The analysis returns the same DominatorTree result entity used by the old pass manager and essentially all of the code is shared. We just have different boilerplate for running and printing the analysis. I've converted one test to run in both modes just to make sure this is exercised while both are live in the tree. llvm-svn: 225969
2015-01-14[dom] Add a basic dominator tree test.Chandler Carruth1-0/+57
Correct, we have *zero* basic testing of the dominator tree in the regression test suite. There is a single test that even prints it out, and that test only checks a single line of the output. There are a handful of tests that check post dominators, but all of those are looking for bugs rather than just exercising the basic machinery. This test is super boring and unexciting. But hey, it's something. I needed there to be something so I could switch the basic test to run with both the old and new pass manager. llvm-svn: 225936
2013-08-16[tests] Cleanup initialization of test suffixes.Daniel Dunbar1-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
2012-12-30Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ↵Dmitri Gribenko1-1/+1
ModuleID This is done to avoid odd test failures, like the one fixed in r171243. llvm-svn: 171250
2012-04-24FileCheck-ize tests.Bill Wendling1-2/+3
llvm-svn: 155434
2012-02-26Change the implementation of dominates(inst, inst) to one based on what theRafael Espindola1-0/+19
verifier does. This correctly handles invoke. Thanks to Duncan, Andrew and Chris for the comments. Thanks to Joerg for the early testing. llvm-svn: 151469
2012-02-16Replace all instances of dg.exp file with lit.local.cfg, since all tests are ↵Eli Bendersky2-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
2009-09-11Eliminate more redundant llvm-as calls.Dan Gohman2-2/+2
llvm-svn: 81540
2009-09-11Change tests from "opt %s" to "opt < %s" so that opt doesn't see theDan Gohman2-2/+2
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
2009-09-08Change these tests to feed the assembly files to opt directly, insteadDan Gohman2-2/+2
of using llvm-as, now that opt supports this. llvm-svn: 81226
2008-05-29Move these tests into the proper directory.Owen Anderson3-817/+0
llvm-svn: 51685
2008-05-20sabre brings to my attention that the 'tr' suffix is also obsoleteGabor Greif1-1/+1
llvm-svn: 51349
2008-05-20Rename the last test with .llx extension to .ll, resolve duplicate test by ↵Gabor Greif1-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
2008-02-14Remove llvm-upgrade.Tanya Lattner4-79/+73
llvm-svn: 47110
2007-08-06update for new domtree dump formatChris Lattner1-1/+1
llvm-svn: 40857
2007-07-31Bunch of tests to check loop passes.Devang Patel2-0/+34
llvm-svn: 40629
2007-06-29Convert .cvsignore filesJohn Criswell1-3/+0
llvm-svn: 37801
2007-04-21New test case.Devang Patel1-0/+28
llvm-svn: 36293
2007-04-18New test.Devang Patel1-0/+692
llvm-svn: 36235
2007-04-15Fix this test to test what it was intended to test.Nick Lewycky1-1/+1
llvm-svn: 36072
2007-04-15For PR1319:Reid Spencer3-4/+7
Upgrade to use new Tcl exec based test harness. llvm-svn: 36066
2007-04-15Update tests for the disappearance of -idom.Owen Anderson1-1/+1
llvm-svn: 36064
2007-04-11Make the llvm-runtest function much more amenable by eliminating all theReid Spencer1-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
2007-04-08Fix this testcase to fail if the bug were reintroduced.Nick Lewycky1-1/+1
llvm-svn: 35776
2007-04-08Remove DomSet completely. This concludes work on PR1171.Owen Anderson2-16/+1
llvm-svn: 35775
2007-03-28Remove use of implementation keyword.Reid Spencer1-1/+0
llvm-svn: 35412
2007-01-26For PR761:Reid Spencer1-1/+1
Remove "target endian/pointersize" or add "target datalayout" to make the test parse properly or set the datalayout because defaults changes. For PR645: Make global names use the @ prefix. For llvm-upgrade changes: Fix test cases or completely remove use of llvm-upgrade for test cases that cannot survive the new renaming or upgrade capabilities. llvm-svn: 33533
2007-01-17Regression is gone, don't try to find it on clean target.Reid Spencer6-0/+329
llvm-svn: 33296