[PATCH] D51993: TableGen/CodeGenDAGPatterns: addPredicateFn only once
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 8 09:55:29 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL343977: TableGen/CodeGenDAGPatterns: addPredicateFn only once (authored by nha, committed by ).
Repository:
rL LLVM
https://reviews.llvm.org/D51993
Files:
llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
llvm/trunk/utils/TableGen/CodeGenDAGPatterns.h
Index: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
===================================================================
--- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
+++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
@@ -3037,13 +3037,6 @@
P->error("Operands list does not contain an entry for operand '" +
*OperandsSet.begin() + "'!");
- // If there is a code init for this fragment, keep track of the fact that
- // this fragment uses it.
- TreePredicateFn PredFn(P);
- if (!PredFn.isAlwaysTrue())
- for (auto T : P->getTrees())
- T->addPredicateFn(PredFn);
-
// If there is a node transformation corresponding to this, keep track of
// it.
Record *Transform = Frag->getValueAsDef("OperandTransform");
Index: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.h
===================================================================
--- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.h
+++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.h
@@ -673,8 +673,8 @@
}
void addPredicateFn(const TreePredicateFn &Fn) {
assert(!Fn.isAlwaysTrue() && "Empty predicate string!");
- if (!is_contained(PredicateFns, Fn))
- PredicateFns.push_back(Fn);
+ assert(!is_contained(PredicateFns, Fn) && "predicate applied recursively");
+ PredicateFns.push_back(Fn);
}
Record *getTransformFn() const { return TransformFn; }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51993.168674.patch
Type: text/x-patch
Size: 1400 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181008/ad6fb890/attachment.bin>
More information about the llvm-commits
mailing list