-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
[TableGen] Use MapVector to remove non-determinism #79411
Merged
wangpc-pp
merged 1 commit into
main
from
users/wangpc-pp/spr/tablegen-use-mapvector-to-remove-non-determinism
Jan 25, 2024
Merged
[TableGen] Use MapVector to remove non-determinism #79411
wangpc-pp
merged 1 commit into
main
from
users/wangpc-pp/spr/tablegen-use-mapvector-to-remove-non-determinism
Jan 25, 2024
Conversation
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
Created using spr 1.3.4
@llvm/pr-subscribers-llvm-selectiondag Author: Wang Pengcheng (wangpc-pp) ChangesThis fixes found non-determinism when Full diff: https://github.com/llvm/llvm-project/pull/79411.diff 2 Files Affected:
diff --git a/llvm/test/TableGen/address-space-patfrags.td b/llvm/test/TableGen/address-space-patfrags.td
index 4aec6ea7e0eae86..46050a70720fbe1 100644
--- a/llvm/test/TableGen/address-space-patfrags.td
+++ b/llvm/test/TableGen/address-space-patfrags.td
@@ -46,7 +46,7 @@ def inst_d : Instruction {
let InOperandList = (ins GPR32:$src0, GPR32:$src1);
}
-// SDAG: case 1: {
+// SDAG: case 0: {
// SDAG-NEXT: // Predicate_pat_frag_b
// SDAG-NEXT: // Predicate_truncstorei16_addrspace
// SDAG-NEXT: SDNode *N = Node;
@@ -69,7 +69,7 @@ def : Pat <
>;
-// SDAG: case 6: {
+// SDAG: case 4: {
// SDAG: // Predicate_pat_frag_a
// SDAG-NEXT: SDNode *N = Node;
// SDAG-NEXT: (void)N;
diff --git a/llvm/utils/TableGen/DAGISelMatcherEmitter.cpp b/llvm/utils/TableGen/DAGISelMatcherEmitter.cpp
index 455183987b7b27b..50156d34528c153 100644
--- a/llvm/utils/TableGen/DAGISelMatcherEmitter.cpp
+++ b/llvm/utils/TableGen/DAGISelMatcherEmitter.cpp
@@ -57,7 +57,8 @@ class MatcherTableEmitter {
// We de-duplicate the predicates by code string, and use this map to track
// all the patterns with "identical" predicates.
- StringMap<TinyPtrVector<TreePattern *>> NodePredicatesByCodeToRun;
+ MapVector<std::string, TinyPtrVector<TreePattern *>, StringMap<unsigned>>
+ NodePredicatesByCodeToRun;
std::vector<std::string> PatternPredicates;
|
MaskRay
approved these changes
Jan 25, 2024
wangpc-pp
deleted the
users/wangpc-pp/spr/tablegen-use-mapvector-to-remove-non-determinism
branch
January 25, 2024 08:16
llvmbot
pushed a commit
to llvmbot/llvm-project
that referenced
this pull request
Jan 25, 2024
This fixes found non-determinism when `LLVM_REVERSE_ITERATION` option is `ON`. Fixes llvm#79420. Reviewers: ilovepi, MaskRay Reviewed By: MaskRay Pull Request: llvm#79411 (cherry picked from commit 41fe98a)
tstellar
pushed a commit
to tstellar/llvm-project
that referenced
this pull request
Feb 14, 2024
This fixes found non-determinism when `LLVM_REVERSE_ITERATION` option is `ON`. Fixes llvm#79420. Reviewers: ilovepi, MaskRay Reviewed By: MaskRay Pull Request: llvm#79411 (cherry picked from commit 41fe98a)
tstellar
pushed a commit
to tstellar/llvm-project
that referenced
this pull request
Feb 14, 2024
This fixes found non-determinism when `LLVM_REVERSE_ITERATION` option is `ON`. Fixes llvm#79420. Reviewers: ilovepi, MaskRay Reviewed By: MaskRay Pull Request: llvm#79411 (cherry picked from commit 41fe98a)
tstellar
pushed a commit
to tstellar/llvm-project
that referenced
this pull request
Feb 14, 2024
This fixes found non-determinism when `LLVM_REVERSE_ITERATION` option is `ON`. Fixes llvm#79420. Reviewers: ilovepi, MaskRay Reviewed By: MaskRay Pull Request: llvm#79411 (cherry picked from commit 41fe98a)
tstellar
pushed a commit
to tstellar/llvm-project
that referenced
this pull request
Feb 14, 2024
This fixes found non-determinism when `LLVM_REVERSE_ITERATION` option is `ON`. Fixes llvm#79420. Reviewers: ilovepi, MaskRay Reviewed By: MaskRay Pull Request: llvm#79411 (cherry picked from commit 41fe98a)
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 fixes found non-determinism when
LLVM_REVERSE_ITERATION
option is
ON
.Fixes #79420.