Use IRParser instead of BitcodeReader#3399
Merged
MrSidims merged 1 commit intoKhronosGroup:mainfrom Oct 21, 2025
Merged
Conversation
The IRParser offers a higher level API, that allows us to also read bitcode assembly, and not only compiled bitcode. This allows us to skip the `llvm-as %s -o %t.bc` step in several tests. I only updated 3 tests to show the difference; but we have more than 500 occurences of `llvm-as %s -o` in the tests: > $/repo/test$ grep -r "llvm-as %s -o" | cut -d':' -f1 | sort -u | wc -l > 506
MrSidims
approved these changes
Oct 20, 2025
Contributor
MrSidims
left a comment
There was a problem hiding this comment.
Sound legit, thank you!
Contributor
Author
|
There is a strange fail in |
Contributor
Author
I'm clueless since it seems to work on my system (with debug and asan enabled). I'll try to rerun the CI jobs re-check. |
Contributor
|
@jmmartinez I believe it's unrelated with your PR as I also see the same failure in #3398 . Taking a look |
svenvh
approved these changes
Oct 21, 2025
Contributor
intel-gather-scatter.ll should be due to community IR change |
Contributor
Contributor
MrSidims
pushed a commit
that referenced
this pull request
Oct 22, 2025
This is a follow-up of #3399 . After #3399, we do not need to run `llvm-as`, we can directly consume the textual llvm-ir representation. This patch profits from this to clean this pattern in the test: ```bash RUN: llvm-as %s -o %t.bc RUN: llvm-spirv %t.bc ... ``` And replaces it by ```bash RUN: llvm-spirv %s ... ```
jsji
pushed a commit
to intel/llvm
that referenced
this pull request
Nov 4, 2025
This is a follow-up of KhronosGroup/SPIRV-LLVM-Translator#3399 . After KhronosGroup/SPIRV-LLVM-Translator#3399, we do not need to run `llvm-as`, we can directly consume the textual llvm-ir representation. This patch profits from this to clean this pattern in the test: ```bash RUN: llvm-as %s -o %t.bc RUN: llvm-spirv %t.bc ... ``` And replaces it by ```bash RUN: llvm-spirv %s ... ``` Original commit: KhronosGroup/SPIRV-LLVM-Translator@57c254d32ea287a
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The IRParser offers a higher level API, that allows us to also read bitcode assembly, and not only compiled bitcode.
This allows us to skip the
llvm-as %s -o %t.bcstep in several tests.I've only updated 3 tests to show the difference; but we have more than 500 occurrences of
llvm-as %s -oin the tests:As a bonus, the function
llvm::getLazyIRFileModule(https://llvm.org/doxygen/namespacellvm.html#aac226baa3ffd0f255a8d2b6d978b81b2) also callsMemoryBuffer::getFileOrSTDIN.