-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[SPIR-V] Rework duplicate tracker and tracking of IR entities and types to improve compile-time performance #130605
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
Merged
VyacheslavLevytskyy
merged 26 commits into
llvm:main
from
VyacheslavLevytskyy:opt_compile_time_100325
Mar 26, 2025
Merged
[SPIR-V] Rework duplicate tracker and tracking of IR entities and types to improve compile-time performance #130605
VyacheslavLevytskyy
merged 26 commits into
llvm:main
from
VyacheslavLevytskyy:opt_compile_time_100325
Mar 26, 2025
Conversation
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
✅ With the latest revision this PR passed the C/C++ code formatter. |
55e3608
to
3f6366e
Compare
35f66f8
to
be709fd
Compare
michalpaszkowski
approved these changes
Mar 26, 2025
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/16/builds/16282 Here is the relevant piece of the build log for the reference
|
VyacheslavLevytskyy
added a commit
that referenced
this pull request
Mar 28, 2025
…VE_CHECKS enabled (#133142) After #130605 structurizer/cf.switch.ifstmt.simple2.ll test case starts failing with the "PHI operand is not live-out from predecessor" diagnostic message. This test case didn't include usual "-verify-machineinstrs" argument and the fail was missed before #130605 merging. The problem looks not blocking, because the test case successfully passes its CHECK's. This PR is to fix the build process by mark the test case as XFAIL when LLVM_ENABLE_EXPENSIVE_CHECKS is enabled. Investigation of the Machine Verifier complaint is to do. The issue is created: #133141
llvm-sync bot
pushed a commit
to arm/arm-toolchain
that referenced
this pull request
Mar 28, 2025
…BLE_EXPENSIVE_CHECKS enabled (#133142) After llvm/llvm-project#130605 structurizer/cf.switch.ifstmt.simple2.ll test case starts failing with the "PHI operand is not live-out from predecessor" diagnostic message. This test case didn't include usual "-verify-machineinstrs" argument and the fail was missed before llvm/llvm-project#130605 merging. The problem looks not blocking, because the test case successfully passes its CHECK's. This PR is to fix the build process by mark the test case as XFAIL when LLVM_ENABLE_EXPENSIVE_CHECKS is enabled. Investigation of the Machine Verifier complaint is to do. The issue is created: llvm/llvm-project#133141
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.
This PR is to thoroughly rework duplicate tracker implementation and tracking of IR entities and types. These are legacy parts of the project resulting in an extremely bloated intermediate representation and computational delays due to inefficient data flow and structure choices.
Main results of the rework:
Less bloated intermediate representation of internal translation steps. Elimination of
spv_track_constant
intrinsic usage for scalar constants, rework ofspv_assign_name
, removal of the gMIRGET_XXX
pseudo code and a smaller number of generatedASSIGN_TYPE
pseudo codes substantially decrease volume of data generated during translation.Simpler code and easier maintenance. The duplicate tracker implementation is simplified, as well as other features.
Numerous fixes of issues and logical flaws in different passes. The main achievement is rework of the duplicate tracker itself that had never guaranteed a correct caching of LLVM IR entities, rarely and randomly returning stale/incorrect records (like, remove an instruction from gMIR but still refer to it). Other fixes comprise consistent generation of OpConstantNull, assigning types to newly created registers, creation of integer/bool types, and other minor fixes.
Numerous fixes of LIT tests: mainly CHECK-DAG to properly reflect SPIR-V spec guarantees,
{{$}}
at the end of constants to avoid matching of substrings, and XFAILS forSPV_INTEL_long_composites
test cases, because the feature is not completed in full yet and doesn't generate a requested by the extension sequence of instructions.New test cases are added.