diff options
author | Dan Gohman <gohman@apple.com> | 2008-08-19 20:58:14 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-08-19 20:58:14 +0000 |
commit | 2dbebd7db5f60b8d2618af458cd40eb0b1dd6b0d (patch) | |
tree | f33e9437faefe9e6c4dab93c1e1f19df235ad90a /llvm/utils/TableGen/FastISelEmitter.cpp | |
parent | 98e6f1c48a227c1c916a33037fe55711f3d94402 (diff) | |
download | bcm5719-llvm-2dbebd7db5f60b8d2618af458cd40eb0b1dd6b0d.tar.gz bcm5719-llvm-2dbebd7db5f60b8d2618af458cd40eb0b1dd6b0d.zip |
For now, restrict FastISel to instructions that only involve one
register class.
llvm-svn: 55008
Diffstat (limited to 'llvm/utils/TableGen/FastISelEmitter.cpp')
-rw-r--r-- | llvm/utils/TableGen/FastISelEmitter.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/utils/TableGen/FastISelEmitter.cpp b/llvm/utils/TableGen/FastISelEmitter.cpp index 31e0d1953cf..b434c15d8c2 100644 --- a/llvm/utils/TableGen/FastISelEmitter.cpp +++ b/llvm/utils/TableGen/FastISelEmitter.cpp @@ -62,7 +62,8 @@ struct OperandsSignature { /// bool initialize(TreePatternNode *InstPatNode, const CodeGenTarget &Target, - MVT::SimpleValueType VT) { + MVT::SimpleValueType VT, + const CodeGenRegisterClass *DstRC) { for (unsigned i = 0, e = InstPatNode->getNumChildren(); i != e; ++i) { TreePatternNode *Op = InstPatNode->getChild(i); if (!Op->isLeaf()) @@ -82,6 +83,9 @@ struct OperandsSignature { const CodeGenRegisterClass *RC = &Target.getRegisterClass(OpLeafRec); if (!RC) return false; + // For now, all the operands must have the same register class. + if (DstRC != RC) + return false; // For now, all the operands must have the same type. if (Op->getTypeNum(0) != VT) return false; @@ -230,7 +234,7 @@ void FastISelEmitter::run(std::ostream &OS) { // Check all the operands. OperandsSignature Operands; - if (!Operands.initialize(InstPatNode, Target, VT)) + if (!Operands.initialize(InstPatNode, Target, VT, DstRC)) continue; // If it's not a known signature, ignore it. |