[llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed Sep 14 16:02:10 PDT 2005
Changes in directory llvm/utils/TableGen:
DAGISelEmitter.cpp updated: 1.25 -> 1.26
---
Log message:
Promote xform fns to be explicit nodes in result patterns, and clean off
predicates since they will have already matched at this point.
---
Diffs of the changes: (+15 -1)
DAGISelEmitter.cpp | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletion(-)
Index: llvm/utils/TableGen/DAGISelEmitter.cpp
diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.25 llvm/utils/TableGen/DAGISelEmitter.cpp:1.26
--- llvm/utils/TableGen/DAGISelEmitter.cpp:1.25 Wed Sep 14 17:55:26 2005
+++ llvm/utils/TableGen/DAGISelEmitter.cpp Wed Sep 14 18:01:59 2005
@@ -830,7 +830,21 @@
I->error("Operand $" + OpName +
"'s type disagrees between the operand and pattern");
- ResultNodeOperands.push_back(InVal->clone());
+ // Construct the result for the dest-pattern operand list.
+ TreePatternNode *OpNode = InVal->clone();
+
+ // No predicate is useful on the result.
+ OpNode->setPredicateFn("");
+
+ // Promote the xform function to be an explicit node if set.
+ if (Record *Xform = OpNode->getTransformFn()) {
+ OpNode->setTransformFn(0);
+ std::vector<TreePatternNode*> Children;
+ Children.push_back(OpNode);
+ OpNode = new TreePatternNode(Xform, Children);
+ }
+
+ ResultNodeOperands.push_back(OpNode);
}
if (!InstInputsCheck.empty())
More information about the llvm-commits
mailing list