-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
disasm-test
: Overhaul treatment of LLVM version ranges
#220
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
37e1870
disasm-test: Use do-notation, add indentation
RyanGlScott bf4f573
disasm-test: Overhaul treatment of LLVM version ranges
RyanGlScott 7569bd6
Documentation updates in disasm-test.
kquick 0cf1db4
Handle command-line option parsing distinctly in disasm-test.
kquick 53777dc
Add tasty-sugar ingredients (enables --showsearch on command-line).
kquick 5bb3b65
Use tasty-sugar 2.2 for llvm-range rangedParamAdjuster selection.
kquick 77ff694
Remove unused imports, functions, and pragmas.
kquick 38071f3
disasm-test: Work around fosskers/versions#65
RyanGlScott File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# `disasm-test` | ||
|
||
This test suite ensures that for each `.ll` file under the `tests` directory: | ||
|
||
1. After using `llvm-as` to produce a `.bc` file, the `.bc` file can be parsed | ||
using `llvm-pretty-bc-parser`. | ||
2. The resulting `llvm-pretty` AST can be pretty-printed back out to an `.ll` | ||
file using `llvm-pretty`'s pretty-printer. | ||
3. The new `.ll` file is mostly equivalent to the original `.ll` file. | ||
|
||
Here, "mostly equivalent" means that the two files are syntactically | ||
equivalent, ignoring minor differences in whitespace and the order of metadata | ||
in the metadata list. | ||
|
||
## Conditional tests | ||
|
||
Some of the test cases have slightly different bitcode depending on which LLVM | ||
version is used. These test cases will have accompanying | ||
`<test-case>.pre-llvm<version>.ll` files, where `pre-llvm<version>` indicates | ||
that this test output is used for all LLVM versions up to (but not including) | ||
`<version>`. Note that if a test case has multiple `pre-llvm<version>.ll` | ||
files, then the `<version>` that is closest to the current LLVM version | ||
(without going over) is picked. | ||
|
||
To illustrate this with a concrete example, consider suppose we have a test | ||
case `foo` with the following `.ll` files | ||
|
||
* `foo.pre-llvm11.ll` | ||
* `foo.pre-llvm13.ll` | ||
* `foo.ll` | ||
|
||
The following `.ll` files would be used for the following LLVM versions: | ||
|
||
* LLVM 10: `foo.pre-llvm11.ll` | ||
* LLVM 11: `foo.pre-llvm13.ll` | ||
* LLVM 12: `foo.pre-llvm13.ll` | ||
* LLVM 13 or later: `foo.ll` | ||
|
||
There are some test cases that require a sufficiently recent LLVM version to | ||
run. To indicate that a test should not be run on LLVMs older than `<version>`, | ||
create a `pre-llvm<version>.ll` file with `SKIP_TEST` as the first line. The | ||
use of `SKIP_TEST` signals that this test should be skipped when using LLVMs | ||
older than `<version>`. Note that the test suite will not read anything past | ||
`SKIP_TEST`, so the rest of the file can be used to document why the test is | ||
skipped on that particular configuration. |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
SKIP_TEST |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
SKIP_TEST |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
SKIP_TEST |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
SKIP_TEST |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
SKIP_TEST |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
SKIP_TEST |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
SKIP_TEST |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
SKIP_TEST |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to undo this, as I've just released
6.0.1
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @fosskers!