summaryrefslogtreecommitdiffstats
path: root/llvm/test/BugPoint
Commit message (Collapse)AuthorAgeFilesLines
* bugpoint: Verify input filesDuncan P. N. Exon Smith2015-03-261-4/+4
| | | | | | Like r233229 for `llvm-link`, start verifying input files to `bugpoint`. llvm-svn: 233253
* Bugpoint: Fix invalid 'inlinedAt:' references in testcaseDuncan P. N. Exon Smith2015-03-201-6/+6
| | | | | | | These are causing crashes in `DebugInfoFinder` after a WIP patch to increase strictness of `DIDescriptor` accessors. llvm-svn: 232839
* DebugInfo: Move new hierarchy into placeDuncan P. N. Exon Smith2015-03-031-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the specialized metadata nodes for the new debug info hierarchy into place, finishing off PR22464. I've done bootstraps (and all that) and I'm confident this commit is NFC as far as DWARF output is concerned. Let me know if I'm wrong :). The code changes are fairly mechanical: - Bumped the "Debug Info Version". - `DIBuilder` now creates the appropriate subclass of `MDNode`. - Subclasses of DIDescriptor now expect to hold their "MD" counterparts (e.g., `DIBasicType` expects `MDBasicType`). - Deleted a ton of dead code in `AsmWriter.cpp` and `DebugInfo.cpp` for printing comments. - Big update to LangRef to describe the nodes in the new hierarchy. Feel free to make it better. Testcase changes are enormous. There's an accompanying clang commit on its way. If you have out-of-tree debug info testcases, I just broke your build. - `upgrade-specialized-nodes.sh` is attached to PR22564. I used it to update all the IR testcases. - Unfortunately I failed to find way to script the updates to CHECK lines, so I updated all of these by hand. This was fairly painful, since the old CHECKs are difficult to reason about. That's one of the benefits of the new hierarchy. This work isn't quite finished, BTW. The `DIDescriptor` subclasses are almost empty wrappers, but not quite: they still have loose casting checks (see the `RETURN_FROM_RAW()` macro). Once they're completely gutted, I'll rename the "MD" classes to "DI" and kill the wrappers. I also expect to make a few schema changes now that it's easier to reason about everything. llvm-svn: 231082
* [opaque pointer type] Add textual IR support for explicit type parameter to ↵David Blaikie2015-02-271-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* IR: Move MDLocation into placeDuncan P. N. Exon Smith2015-01-141-6/+6
| | | | | | | | | | | | | | | | | | | | This commit moves `MDLocation`, finishing off PR21433. There's an accompanying clang commit for frontend testcases. I'll attach the testcase upgrade script I used to PR21433 to help out-of-tree frontends/backends. This changes the schema for `DebugLoc` and `DILocation` from: !{i32 3, i32 7, !7, !8} to: !MDLocation(line: 3, column: 7, scope: !7, inlinedAt: !8) Note that empty fields (line/column: 0 and inlinedAt: null) don't get printed by the assembly writer. llvm-svn: 226048
* IR: Make metadata typeless in assemblyDuncan P. N. Exon Smith2014-12-151-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that `Metadata` is typeless, reflect that in the assembly. These are the matching assembly changes for the metadata/value split in r223802. - Only use the `metadata` type when referencing metadata from a call intrinsic -- i.e., only when it's used as a `Value`. - Stop pretending that `ValueAsMetadata` is wrapped in an `MDNode` when referencing it from call intrinsics. So, assembly like this: define @foo(i32 %v) { call void @llvm.foo(metadata !{i32 %v}, metadata !0) call void @llvm.foo(metadata !{i32 7}, metadata !0) call void @llvm.foo(metadata !1, metadata !0) call void @llvm.foo(metadata !3, metadata !0) call void @llvm.foo(metadata !{metadata !3}, metadata !0) ret void, !bar !2 } !0 = metadata !{metadata !2} !1 = metadata !{i32* @global} !2 = metadata !{metadata !3} !3 = metadata !{} turns into this: define @foo(i32 %v) { call void @llvm.foo(metadata i32 %v, metadata !0) call void @llvm.foo(metadata i32 7, metadata !0) call void @llvm.foo(metadata i32* @global, metadata !0) call void @llvm.foo(metadata !3, metadata !0) call void @llvm.foo(metadata !{!3}, metadata !0) ret void, !bar !2 } !0 = !{!2} !1 = !{i32* @global} !2 = !{!3} !3 = !{} I wrote an upgrade script that handled almost all of the tests in llvm and many of the tests in cfe (even handling many `CHECK` lines). I've attached it (or will attach it in a moment if you're speedy) to PR21532 to help everyone update their out-of-tree testcases. This is part of PR21532. llvm-svn: 224257
* Revert "Revert "DI: Fold constant arguments into a single MDString""Duncan P. N. Exon Smith2014-10-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | This reverts commit r218918, effectively reapplying r218914 after fixing an Ocaml bindings test and an Asan crash. The root cause of the latter was a tightened-up check in `DILexicalBlock::Verify()`, so I'll file a PR to investigate who requires the loose check (and why). Original commit message follows. -- 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: 219010
* Revert "DI: Fold constant arguments into a single MDString"Duncan P. N. Exon Smith2014-10-021-3/+3
| | | | | | This reverts commit r218914 while I investigate some bots. llvm-svn: 218918
* 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
* llvm/test/BugPoint/compile-custom.ll: Use explicit %python to invoke a test ↵NAKAMURA Takumi2014-07-111-1/+1
| | | | | | script, compile-custom.ll.py, for shebang-incapable hosts. llvm-svn: 212820
* Revert r206989, "Mark llvm/test/BugPoint/compile-custom.ll as ↵NAKAMURA Takumi2014-04-271-2/+0
| | | | | | XFAIL:vg_leak." It has been fixed since r207265. llvm-svn: 207355
* Mark llvm/test/BugPoint/compile-custom.ll as XFAIL:vg_leak.NAKAMURA Takumi2014-04-231-0/+2
| | | | llvm-svn: 206989
* llvm/test/BugPoint/compile-custom.ll.py: Make it py3-compatible. [PR19112]NAKAMURA Takumi2014-03-131-1/+1
| | | | | | | FIXME: Get rid of invoking this. I guess it wouldn't run on win32 due to lacking of shell support. llvm-svn: 203740
* [bugpoint] Add testcase for r203343.Adam Nemet2014-03-102-0/+22
| | | | llvm-svn: 203472
* Debug Info: update testing cases to specify the debug info version number.Manman Ren2013-11-231-6/+9
| | | | | | | | | | We are going to drop debug info without a version number or with a different version number, to make sure we don't crash when we see bitcode files with different debug info metadata format. Make tests more robust by removing hard-coded metadata numbers in CHECK lines. llvm-svn: 195535
* [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
* Debug Info Finder|Verifier: handle DbgLoc attached to instructions.Manman Ren2013-08-061-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Also remove checking of llvm.dbg.sp since it is not used in generating dwarf. Current state of Finder: DebugInfoFinder tries to list all debug info MDNodes used in a module. To list debug info MDNodes used by an instruction, DebugInfoFinder provides processDeclare, processValue and processLocation to handle DbgDeclareInst, DbgValueInst and DbgLoc attached to instructions. processModule will go through all DICompileUnits in llvm.dbg.cu and list debug info MDNodes used by the CUs. TODO: 1> Finder has a list of CUs, SPs, Types, Scopes and global variables. We need to add a list of variables that are used by DbgDeclareInst and DbgValueInst. 2> MDString fields should be null or isa<MDString> and MDNode fields should be null or isa<MDNode>. We currently use empty string or int 0 to represent null. 3> Go though Verify functions and make sure that they check field types. 4> Clean up existing testing cases to remove llvm.dbg.sp and make sure each testing case has a llvm.dbg.cu. Re-apply r187609 with fix to pass ocaml binding. vmcore.ml generates a debug location with scope being metadata !{}, in verifier we treat this as a null scope. llvm-svn: 187812
* Remove "lto_on_osx" xfails, now that -rdynamic works on Darwin.Bob Wilson2013-08-043-3/+0
| | | | | | | Note that this will require a recent version of the linker for Darwin builds with LTO to pass these tests. llvm-svn: 187711
* Temporarily revert "Debug Info Finder|Verifier: handle DbgLoc attached toEric Christopher2013-08-021-8/+4
| | | | | | | | instructions." in an attempt to bring back some bots. This reverts commit r187609. llvm-svn: 187638
* Debug Info Finder|Verifier: handle DbgLoc attached to instructions.Manman Ren2013-08-011-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | Also remove checking of llvm.dbg.sp since it is not used in generating dwarf. Current state of Finder: DebugInfoFinder tries to list all debug info MDNodes used in a module. To list debug info MDNodes used by an instruction, DebugInfoFinder provides processDeclare, processValue and processLocation to handle DbgDeclareInst, DbgValueInst and DbgLoc attached to instructions. processModule will go through all DICompileUnits in llvm.dbg.cu and list debug info MDNodes used by the CUs. TODO: 1> Finder has a list of CUs, SPs, Types, Scopes and global variables. We need to add a list of variables that are used by DbgDeclareInst and DbgValueInst. 2> MDString fields should be null or isa<MDString> and MDNode fields should be null or isa<MDNode>. We currently use empty string or int 0 to represent null. 3> Go though Verify functions and make sure that they check field types. 4> Clean up existing testing cases to remove llvm.dbg.sp and make sure each testing case has a llvm.dbg.cu. llvm-svn: 187609
* Fix unexpected passes. These test do work with LTO on linux. I tested bothRafael Espindola2012-10-263-3/+3
| | | | | | a cmake and an autoconf build. llvm-svn: 166748
* Mark bugpoint tests with XFAIL when building with LTO. <rdar://problem/12473675>Bob Wilson2012-10-183-0/+3
| | | | | | | | The LTO Internalize pass is hiding symbols needed by the bugpoint-passes plug-in. We need to add a flag to control whether Internalize should be run. This is a temporary workaround to make these tests pass in the meantime. llvm-svn: 166239
* 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
* test: Check the feature 'loadable_module' with load modules in %llvmshlibdir.NAKAMURA Takumi2010-11-293-8/+6
| | | | | | %llvmshlibdir should be 'bin' on Cygming. llvm-svn: 120282
* XFAIL this on mingw, following remove_arguments_test.ll.Dan Gohman2010-08-241-0/+1
| | | | llvm-svn: 111962
* Add a testcase for basic bugpointing in the presence of metadata.Dan Gohman2010-08-241-0/+34
| | | | llvm-svn: 111955
* XFAIL for mingw that has no plugins.Rafael Espindola2010-08-092-0/+2
| | | | llvm-svn: 110574
* Use %shlibext instead of .soRafael Espindola2010-08-082-2/+2
| | | | llvm-svn: 110529
* Move the bugpoint test passes to a plugin in preparation for having bugpointRafael Espindola2010-08-072-2/+4
| | | | | | use opt. llvm-svn: 110520
* Fix this test to work under lit.Dan Gohman2010-06-071-1/+1
| | | | llvm-svn: 105553
* Run dead type elimination after dead argument elimination.Dan Gohman2010-06-071-2/+6
| | | | llvm-svn: 105552
* Make bugpoint dead-argument-hacking actually work, and actually test it.Dan Gohman2010-06-071-0/+2
| | | | llvm-svn: 105551
* Use -output-prefix in bugpoint tests so that outputs go in temp directory (andDaniel Dunbar2009-09-072-2/+2
| | | | | | we don't race on them). llvm-svn: 81155
* remove nondeterminstic test.Chris Lattner2009-08-081-13/+0
| | | | llvm-svn: 78512
* Fix regular expression.Nick Lewycky2009-06-121-1/+1
| | | | llvm-svn: 73221
* XFAIL this on PPC Linux. This keeps showing up in the buildbot and isn't ↵Nick Lewycky2009-06-111-0/+3
| | | | | | | | easy to fix, and I'd like it to stop masking real failures. llvm-svn: 73211
* Re-commit r67334 and r67349 with fix.Evan Cheng2009-03-212-2/+2
| | | | llvm-svn: 67451
* Revert r67334 and r37349 which break "make check" on Linux.Nick Lewycky2009-03-202-2/+2
| | | | llvm-svn: 67368
* Fix typo's.Evan Cheng2009-03-201-1/+1
| | | | llvm-svn: 67349
* More makefile changes to allow dejagnu tests to pass when system tools ↵Evan Cheng2009-03-192-2/+2
| | | | | | default to a different target from the llvm configuration (e.g. 64-bit gcc and 32-bit llvm). llvm-svn: 67334
* Remove accidental check-ins in r65960. :-(Bill Wendling2009-03-031-1/+1
| | | | llvm-svn: 65961
* Use > instead of >=. We want to promote aggregates of 128-bytes.Bill Wendling2009-03-031-1/+1
| | | | llvm-svn: 65960
* this is unneeded now.Chris Lattner2008-06-161-3/+0
| | | | llvm-svn: 52298
* resolve PR2453 by adding a run line.Chris Lattner2008-06-161-2/+3
| | | | llvm-svn: 52296
* XFAIL some tests that became failing due to the extra error reporting ↵Matthijs Kooijman2008-06-131-0/+2
| | | | | | recently. PR's are created for these. llvm-svn: 52250
* Pass -silence-passes to bugpoint in testcases, this makes two out of three ↵Matthijs Kooijman2008-06-123-3/+3
| | | | | | bugpoint testcases work again. llvm-svn: 52236
* Remove llvm-upgradeTanya Lattner2008-02-171-10/+6
| | | | llvm-svn: 47231
* Convert .cvsignore filesJohn Criswell2007-06-291-5/+0
| | | | llvm-svn: 37801
* For PR1319:Reid Spencer2007-04-151-2/+2
| | | | | | Update to new Tcl exec based test harness. llvm-svn: 36068
* Update tests for the disappearance of -idom.Owen Anderson2007-04-151-8/+0
| | | | llvm-svn: 36064
OpenPOWER on IntegriCloud