diff options
author | Eric Christopher <echristo@apple.com> | 2010-07-28 01:52:23 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2010-07-28 01:52:23 +0000 |
commit | e1270c64e36c2f2991e4b032b783e064afab55c1 (patch) | |
tree | 7af5a4d41c232c8b63b979b76baac7472f02f362 /llvm/utils/TableGen/FastISelEmitter.cpp | |
parent | a652fab0527c8ceb681c4c336b45dda0db8fc058 (diff) | |
download | bcm5719-llvm-e1270c64e36c2f2991e4b032b783e064afab55c1.tar.gz bcm5719-llvm-e1270c64e36c2f2991e4b032b783e064afab55c1.zip |
Filter out patterns that have PredicateOperands.
llvm-svn: 109572
Diffstat (limited to 'llvm/utils/TableGen/FastISelEmitter.cpp')
-rw-r--r-- | llvm/utils/TableGen/FastISelEmitter.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/utils/TableGen/FastISelEmitter.cpp b/llvm/utils/TableGen/FastISelEmitter.cpp index ee10801ec56..70448ab92ae 100644 --- a/llvm/utils/TableGen/FastISelEmitter.cpp +++ b/llvm/utils/TableGen/FastISelEmitter.cpp @@ -54,6 +54,7 @@ struct OperandsSignature { bool initialize(TreePatternNode *InstPatNode, const CodeGenTarget &Target, MVT::SimpleValueType VT) { + if (!InstPatNode->isLeaf()) { if (InstPatNode->getOperator()->getName() == "imm") { Operands.push_back("i"); @@ -69,6 +70,7 @@ struct OperandsSignature { for (unsigned i = 0, e = InstPatNode->getNumChildren(); i != e; ++i) { TreePatternNode *Op = InstPatNode->getChild(i); + // For now, filter out any operand with a predicate. // For now, filter out any operand with multiple values. if (!Op->getPredicateFns().empty() || @@ -105,6 +107,7 @@ struct OperandsSignature { RC = Target.getRegisterClassForRegister(OpLeafRec); else return false; + // For now, require the register operands' register classes to all // be the same. if (!RC) @@ -262,6 +265,15 @@ void FastISelMap::CollectPatterns(CodeGenDAGPatterns &CGP) { if (II.OperandList.empty()) continue; + // For now ignore instructions that have predicate operands. + bool HasPredicate = false; + for (unsigned i = 0, e = II.OperandList.size(); i != e; ++i) { + if(II.OperandList[i].Rec->isSubClassOf("PredicateOperand")) + HasPredicate = true; + } + if (HasPredicate) + continue; + // For now, ignore multi-instruction patterns. bool MultiInsts = false; for (unsigned i = 0, e = Dst->getNumChildren(); i != e; ++i) { |