[llvm-commits] [llvm] r96437 - /llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp
Chris Lattner
sabre at nondot.org
Tue Feb 16 17:34:15 PST 2010
Author: lattner
Date: Tue Feb 16 19:34:15 2010
New Revision: 96437
URL: http://llvm.org/viewvc/llvm-project?rev=96437&view=rev
Log:
record input chains.
Modified:
llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp
Modified: llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp?rev=96437&r1=96436&r2=96437&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp (original)
+++ llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Tue Feb 16 19:34:15 2010
@@ -194,6 +194,15 @@
// the child numbers of the node are all offset by one.
unsigned OpNo = 0;
if (N->NodeHasProperty(SDNPHasChain, CGP)) {
+ // Record the input chain, which is always input #0 of the SDNode.
+ AddMatcherNode(new MoveChildMatcherNode(0));
+ ++NextRecordedOperandNo;
+ AddMatcherNode(new RecordMatcherNode("'" + N->getOperator()->getName() +
+ "' input chain"));
+ AddMatcherNode(new MoveParentMatcherNode());
+
+ // Don't look at the input chain when matching the tree pattern to the
+ // SDNode.
OpNo = 1;
// If this node is not the root and the subtree underneath it produces a
More information about the llvm-commits
mailing list