diff options
author | Owen Anderson <resistor@mac.com> | 2008-08-25 20:20:32 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2008-08-25 20:20:32 +0000 |
commit | 32635dbfb22825a0631c841ea22fc8372a684ace (patch) | |
tree | 880ba4b759fa83696b265de2ef03033bbc57f09f /llvm/utils/TableGen/FastISelEmitter.cpp | |
parent | a3b3c86a47059f31abb5c58ce37aa58a9b347101 (diff) | |
download | bcm5719-llvm-32635dbfb22825a0631c841ea22fc8372a684ace.tar.gz bcm5719-llvm-32635dbfb22825a0631c841ea22fc8372a684ace.zip |
Add support for fast isel of (integer) immediate materialization pattens, and use them to support
bitcast of constants in fast isel.
llvm-svn: 55325
Diffstat (limited to 'llvm/utils/TableGen/FastISelEmitter.cpp')
-rw-r--r-- | llvm/utils/TableGen/FastISelEmitter.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/utils/TableGen/FastISelEmitter.cpp b/llvm/utils/TableGen/FastISelEmitter.cpp index 5868a24e193..f730f1d8c08 100644 --- a/llvm/utils/TableGen/FastISelEmitter.cpp +++ b/llvm/utils/TableGen/FastISelEmitter.cpp @@ -64,6 +64,12 @@ struct OperandsSignature { const CodeGenTarget &Target, MVT::SimpleValueType VT, const CodeGenRegisterClass *DstRC) { + if (!InstPatNode->isLeaf() && + InstPatNode->getOperator()->getName() == "imm") { + Operands.push_back("i"); + return true; + } + for (unsigned i = 0, e = InstPatNode->getNumChildren(); i != e; ++i) { TreePatternNode *Op = InstPatNode->getChild(i); // For now, filter out any operand with a predicate. @@ -219,9 +225,6 @@ void FastISelEmitter::run(std::ostream &OS) { // an Operand or an immediate, like MOV32ri. if (InstPatOp->isSubClassOf("Operand")) continue; - if (InstPatOp->getName() == "imm" || - InstPatOp->getName() == "fpimm") - continue; // For now, filter out any instructions with predicates. if (!InstPatNode->getPredicateFn().empty()) |