aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-02-17 01:34:15 +0000
committerChris Lattner <sabre@nondot.org>2010-02-17 01:34:15 +0000
commit2f7ecdeb1dd3bc0092e91df9197ca71b1a260434 (patch)
treed3189d8a532939c1eaa02e1db43851f39b0fd784 /utils
parentc642b84fb866c3a6f1e61d39d6eda89563267b53 (diff)
downloadexternal_llvm-2f7ecdeb1dd3bc0092e91df9197ca71b1a260434.zip
external_llvm-2f7ecdeb1dd3bc0092e91df9197ca71b1a260434.tar.gz
external_llvm-2f7ecdeb1dd3bc0092e91df9197ca71b1a260434.tar.bz2
record input chains.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96437 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/DAGISelMatcherGen.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/utils/TableGen/DAGISelMatcherGen.cpp b/utils/TableGen/DAGISelMatcherGen.cpp
index 345b964..5936e75 100644
--- a/utils/TableGen/DAGISelMatcherGen.cpp
+++ b/utils/TableGen/DAGISelMatcherGen.cpp
@@ -194,6 +194,15 @@ void MatcherGen::EmitOperatorMatchCode(const TreePatternNode *N,
// 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