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

View File

@ -2362,8 +2362,8 @@ void CodeGenDAGPatterns::AddPatternToMatch(const TreePattern *Pattern,
void CodeGenDAGPatterns::InferInstructionFlags() {
std::vector<const CodeGenInstruction*> Instructions;
Target.getInstructionsByEnumValue(Instructions);
const std::vector<const CodeGenInstruction*> &Instructions =
Target.getInstructionsByEnumValue();
for (unsigned i = 0, e = Instructions.size(); i != e; ++i) {
CodeGenInstruction &InstInfo =
const_cast<CodeGenInstruction &>(*Instructions[i]);