[llvm-commits] [llvm] r153125 - /llvm/trunk/utils/TableGen/PseudoLoweringEmitter.cpp
Evan Cheng
evan.cheng at apple.com
Tue Mar 20 14:07:52 PDT 2012
Author: evancheng
Date: Tue Mar 20 16:07:51 2012
New Revision: 153125
URL: http://llvm.org/viewvc/llvm-project?rev=153125&view=rev
Log:
Reserve number of MI operands to accom,odate complex patterns.
Modified:
llvm/trunk/utils/TableGen/PseudoLoweringEmitter.cpp
Modified: llvm/trunk/utils/TableGen/PseudoLoweringEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/PseudoLoweringEmitter.cpp?rev=153125&r1=153124&r2=153125&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/PseudoLoweringEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/PseudoLoweringEmitter.cpp Tue Mar 20 16:07:51 2012
@@ -100,8 +100,11 @@
throw TGError(Rec->getLoc(), "Pseudo result '" + Operator->getName() +
"' operand count mismatch");
+ unsigned NumMIOperands = 0;
+ for (unsigned i = 0, e = Insn.Operands.size(); i != e; ++i)
+ NumMIOperands += Insn.Operands[i].MINumOperands;
IndexedMap<OpData> OperandMap;
- OperandMap.grow(Insn.Operands.size());
+ OperandMap.grow(NumMIOperands);
addDagOperandMapping(Rec, Dag, Insn, OperandMap, 0);
More information about the llvm-commits
mailing list