diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-19 00:18:23 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-19 00:18:23 +0000 |
commit | 70eb897d7ceb4d4f707f5d645d4252d47363f67f (patch) | |
tree | 3534972e2ec0f055ac589a5088a3ae07f5b4da54 /llvm/utils/TableGen/CodeGenDAGPatterns.cpp | |
parent | 71bd0f4edaeed5a238a0ee4806d27209b227b796 (diff) | |
download | bcm5719-llvm-70eb897d7ceb4d4f707f5d645d4252d47363f67f.tar.gz bcm5719-llvm-70eb897d7ceb4d4f707f5d645d4252d47363f67f.zip |
don't go through getInstructions().
llvm-svn: 98906
Diffstat (limited to 'llvm/utils/TableGen/CodeGenDAGPatterns.cpp')
-rw-r--r-- | llvm/utils/TableGen/CodeGenDAGPatterns.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp index fafcd8c30ef..8c07c4a80c2 100644 --- a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp +++ b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp @@ -2362,11 +2362,11 @@ void CodeGenDAGPatterns::AddPatternToMatch(const TreePattern *Pattern, void CodeGenDAGPatterns::InferInstructionFlags() { - std::map<std::string, CodeGenInstruction> &InstrDescs = - Target.getInstructions(); - for (std::map<std::string, CodeGenInstruction>::iterator - II = InstrDescs.begin(), E = InstrDescs.end(); II != E; ++II) { - CodeGenInstruction &InstInfo = II->second; + std::vector<const CodeGenInstruction*> Instructions; + Target.getInstructionsByEnumValue(Instructions); + for (unsigned i = 0, e = Instructions.size(); i != e; ++i) { + CodeGenInstruction &InstInfo = + const_cast<CodeGenInstruction &>(*Instructions[i]); // Determine properties of the instruction from its pattern. bool MayStore, MayLoad, HasSideEffects; InferFromPattern(InstInfo, MayStore, MayLoad, HasSideEffects, *this); |