projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
627b5bd
)
[ConstraintElimination] Verify CS and DFSInStack are in sync.(NFC)
author
Florian Hahn
<flo@fhahn.com>
Sat, 30 Jan 2021 17:56:51 +0000
(17:56 +0000)
committer
Florian Hahn
<flo@fhahn.com>
Sat, 30 Jan 2021 18:27:04 +0000
(18:27 +0000)
After the main loop is done, we should have one constraint per item in
DFSInStack. Otherwise we added a constraint without a proper DFSInStack
item.
llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
b/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
index
3b8af6f
..
a3f739f
100644
(file)
--- a/
llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
+++ b/
llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
@@
-352,6
+352,8
@@
static bool eliminateConstraints(Function &F, DominatorTree &DT) {
DFSInStack.emplace_back(CB.NumIn, CB.NumOut, CB.Condition, CB.Not);
}
+ assert(CS.size() == DFSInStack.size() &&
+ "updates to CS and DFSInStack are out of sync");
return Changed;
}