aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-01-04 20:31:55 +0000
committerDan Gohman <gohman@apple.com>2010-01-04 20:31:55 +0000
commit59ea7817a02348adfc05cc5dcfcda990a4d9ca61 (patch)
treea321ba6e5f165984d421e5fcc8e13bd4ad147da7 /utils
parente328bfe75393402d9bfb9fcefeb1122c6b474da8 (diff)
downloadexternal_llvm-59ea7817a02348adfc05cc5dcfcda990a4d9ca61.zip
external_llvm-59ea7817a02348adfc05cc5dcfcda990a4d9ca61.tar.gz
external_llvm-59ea7817a02348adfc05cc5dcfcda990a4d9ca61.tar.bz2
Remove the CPAttrParentAsRoot code, which is unused, and inconvenient
for a refactoring I'm working on. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92503 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/CodeGenTarget.cpp12
-rw-r--r--utils/TableGen/CodeGenTarget.h5
-rw-r--r--utils/TableGen/DAGISelEmitter.cpp12
3 files changed, 3 insertions, 26 deletions
diff --git a/utils/TableGen/CodeGenTarget.cpp b/utils/TableGen/CodeGenTarget.cpp
index 0edca73..797614e 100644
--- a/utils/TableGen/CodeGenTarget.cpp
+++ b/utils/TableGen/CodeGenTarget.cpp
@@ -402,18 +402,6 @@ ComplexPattern::ComplexPattern(Record *R) {
<< "' on ComplexPattern '" << R->getName() << "'!\n";
exit(1);
}
-
- // Parse the attributes.
- Attributes = 0;
- PropList = R->getValueAsListOfDefs("Attributes");
- for (unsigned i = 0, e = PropList.size(); i != e; ++i)
- if (PropList[i]->getName() == "CPAttrParentAsRoot") {
- Attributes |= 1 << CPAttrParentAsRoot;
- } else {
- errs() << "Unsupported pattern attribute '" << PropList[i]->getName()
- << "' on ComplexPattern '" << R->getName() << "'!\n";
- exit(1);
- }
}
//===----------------------------------------------------------------------===//
diff --git a/utils/TableGen/CodeGenTarget.h b/utils/TableGen/CodeGenTarget.h
index da4b1cc..07bc54d 100644
--- a/utils/TableGen/CodeGenTarget.h
+++ b/utils/TableGen/CodeGenTarget.h
@@ -46,9 +46,6 @@ enum SDNP {
SDNPMemOperand
};
-// ComplexPattern attributes.
-enum CPAttr { CPAttrParentAsRoot };
-
/// getValueType - Return the MVT::SimpleValueType that the specified TableGen
/// record corresponds to.
MVT::SimpleValueType getValueType(Record *Rec);
@@ -227,7 +224,6 @@ class ComplexPattern {
std::string SelectFunc;
std::vector<Record*> RootNodes;
unsigned Properties; // Node properties
- unsigned Attributes; // Pattern attributes
public:
ComplexPattern() : NumOperands(0) {}
ComplexPattern(Record *R);
@@ -239,7 +235,6 @@ public:
return RootNodes;
}
bool hasProperty(enum SDNP Prop) const { return Properties & (1 << Prop); }
- bool hasAttribute(enum CPAttr Attr) const { return Attributes & (1 << Attr); }
};
} // End llvm namespace
diff --git a/utils/TableGen/DAGISelEmitter.cpp b/utils/TableGen/DAGISelEmitter.cpp
index a901fd0..a6bb211 100644
--- a/utils/TableGen/DAGISelEmitter.cpp
+++ b/utils/TableGen/DAGISelEmitter.cpp
@@ -610,7 +610,7 @@ public:
emitCheck(MaskPredicate + RootName + "0, Tmp" + utostr(NTmp) +
", INT64_C(" + itostr(II->getValue()) + "))");
- EmitChildMatchCode(N->getChild(0), N, RootName + utostr(0), RootName,
+ EmitChildMatchCode(N->getChild(0), N, RootName + utostr(0),
ChainSuffix + utostr(0), FoundChain);
return;
}
@@ -621,7 +621,7 @@ public:
emitInit("SDValue " + RootName + utostr(OpNo) + " = " +
RootName + ".getOperand(" +utostr(OpNo) + ");");
- EmitChildMatchCode(N->getChild(i), N, RootName + utostr(OpNo), RootName,
+ EmitChildMatchCode(N->getChild(i), N, RootName + utostr(OpNo),
ChainSuffix + utostr(OpNo), FoundChain);
}
@@ -654,7 +654,6 @@ public:
void EmitChildMatchCode(TreePatternNode *Child, TreePatternNode *Parent,
const std::string &RootName,
- const std::string &ParentRootName,
const std::string &ChainSuffix, bool &FoundChain) {
if (!Child->isLeaf()) {
// If it's not a leaf, recursively match.
@@ -719,12 +718,7 @@ public:
emitCode("SDValue " + ChainName + ";");
}
- std::string Code = Fn + "(";
- if (CP->hasAttribute(CPAttrParentAsRoot)) {
- Code += ParentRootName + ", ";
- } else {
- Code += "N, ";
- }
+ std::string Code = Fn + "(N, ";
if (CP->hasProperty(SDNPHasChain)) {
std::string ParentName(RootName.begin(), RootName.end()-1);
Code += ParentName + ", ";