change Target.getInstructionsByEnumValue to return a reference

to a vector that CGT stores instead of synthesizing it on every 
call.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98910 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2010-03-19 00:34:35 +00:00
parent 0392080fbf
commit f65027842e
10 changed files with 41 additions and 37 deletions
+2 -2
View File
@@ -108,8 +108,8 @@ void DisassemblerEmitter::run(raw_ostream &OS) {
if (Target.getName() == "X86") {
DisassemblerTables Tables;
std::vector<const CodeGenInstruction*> numberedInstructions;
Target.getInstructionsByEnumValue(numberedInstructions);
const std::vector<const CodeGenInstruction*> &numberedInstructions =
Target.getInstructionsByEnumValue();
for (unsigned i = 0, e = numberedInstructions.size(); i != e; ++i)
RecognizableInstr::processInstr(Tables, *numberedInstructions[i], i);