diff options
author | Chris Lattner <sabre@nondot.org> | 2010-11-01 04:03:32 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-11-01 04:03:32 +0000 |
commit | d8adec70f321a22f996d772db16f0b6682efd98e (patch) | |
tree | b78b2f4dec3e5cd910f874585129c9ddde00786a /llvm/utils/TableGen/CodeEmitterGen.cpp | |
parent | 86e1c9484f0c674651022c741227eb60749e289c (diff) | |
download | bcm5719-llvm-d8adec70f321a22f996d772db16f0b6682efd98e.tar.gz bcm5719-llvm-d8adec70f321a22f996d772db16f0b6682efd98e.zip |
factor the operand list (and related fields/operations) out of
CodeGenInstruction into its own helper class. No functionality change.
llvm-svn: 117893
Diffstat (limited to 'llvm/utils/TableGen/CodeEmitterGen.cpp')
-rw-r--r-- | llvm/utils/TableGen/CodeEmitterGen.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/llvm/utils/TableGen/CodeEmitterGen.cpp b/llvm/utils/TableGen/CodeEmitterGen.cpp index b7b62d502b0..631075263e4 100644 --- a/llvm/utils/TableGen/CodeEmitterGen.cpp +++ b/llvm/utils/TableGen/CodeEmitterGen.cpp @@ -158,21 +158,22 @@ void CodeEmitterGen::run(raw_ostream &o) { // operand number. Non-matching operands are assumed to be in // order. unsigned OpIdx; - if (CGI.hasOperandNamed(VarName, OpIdx)) { + if (CGI.Operands.hasOperandNamed(VarName, OpIdx)) { // Get the machine operand number for the indicated operand. - OpIdx = CGI.OperandList[OpIdx].MIOperandNo; - assert (!CGI.isFlatOperandNotEmitted(OpIdx) && + OpIdx = CGI.Operands[OpIdx].MIOperandNo; + assert (!CGI.Operands.isFlatOperandNotEmitted(OpIdx) && "Explicitly used operand also marked as not emitted!"); } else { /// If this operand is not supposed to be emitted by the /// generated emitter, skip it. - while (CGI.isFlatOperandNotEmitted(NumberedOp)) + while (CGI.Operands.isFlatOperandNotEmitted(NumberedOp)) ++NumberedOp; OpIdx = NumberedOp++; } - std::pair<unsigned, unsigned> SO = CGI.getSubOperandNumber(OpIdx); + std::pair<unsigned, unsigned> SO = + CGI.Operands.getSubOperandNumber(OpIdx); std::string &EncoderMethodName = - CGI.OperandList[SO.first].EncoderMethodName; + CGI.Operands[SO.first].EncoderMethodName; // If the source operand has a custom encoder, use it. This will // get the encoding for all of the suboperands. |