mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-10-17 03:26:03 +00:00
Filter out patterns that have PredicateOperands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109572 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
81f9121cda
commit
bc16827be6
@ -54,6 +54,7 @@ struct OperandsSignature {
|
|||||||
bool initialize(TreePatternNode *InstPatNode,
|
bool initialize(TreePatternNode *InstPatNode,
|
||||||
const CodeGenTarget &Target,
|
const CodeGenTarget &Target,
|
||||||
MVT::SimpleValueType VT) {
|
MVT::SimpleValueType VT) {
|
||||||
|
|
||||||
if (!InstPatNode->isLeaf()) {
|
if (!InstPatNode->isLeaf()) {
|
||||||
if (InstPatNode->getOperator()->getName() == "imm") {
|
if (InstPatNode->getOperator()->getName() == "imm") {
|
||||||
Operands.push_back("i");
|
Operands.push_back("i");
|
||||||
@ -69,6 +70,7 @@ struct OperandsSignature {
|
|||||||
|
|
||||||
for (unsigned i = 0, e = InstPatNode->getNumChildren(); i != e; ++i) {
|
for (unsigned i = 0, e = InstPatNode->getNumChildren(); i != e; ++i) {
|
||||||
TreePatternNode *Op = InstPatNode->getChild(i);
|
TreePatternNode *Op = InstPatNode->getChild(i);
|
||||||
|
|
||||||
// For now, filter out any operand with a predicate.
|
// For now, filter out any operand with a predicate.
|
||||||
// For now, filter out any operand with multiple values.
|
// For now, filter out any operand with multiple values.
|
||||||
if (!Op->getPredicateFns().empty() ||
|
if (!Op->getPredicateFns().empty() ||
|
||||||
@ -105,6 +107,7 @@ struct OperandsSignature {
|
|||||||
RC = Target.getRegisterClassForRegister(OpLeafRec);
|
RC = Target.getRegisterClassForRegister(OpLeafRec);
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// For now, require the register operands' register classes to all
|
// For now, require the register operands' register classes to all
|
||||||
// be the same.
|
// be the same.
|
||||||
if (!RC)
|
if (!RC)
|
||||||
@ -262,6 +265,15 @@ void FastISelMap::CollectPatterns(CodeGenDAGPatterns &CGP) {
|
|||||||
if (II.OperandList.empty())
|
if (II.OperandList.empty())
|
||||||
continue;
|
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.
|
// For now, ignore multi-instruction patterns.
|
||||||
bool MultiInsts = false;
|
bool MultiInsts = false;
|
||||||
for (unsigned i = 0, e = Dst->getNumChildren(); i != e; ++i) {
|
for (unsigned i = 0, e = Dst->getNumChildren(); i != e; ++i) {
|
||||||
|
Loading…
Reference in New Issue
Block a user