summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-19 00:18:23 +0000
committerChris Lattner <sabre@nondot.org>2010-03-19 00:18:23 +0000
commit70eb897d7ceb4d4f707f5d645d4252d47363f67f (patch)
tree3534972e2ec0f055ac589a5088a3ae07f5b4da54 /llvm/utils/TableGen/CodeGenDAGPatterns.cpp
parent71bd0f4edaeed5a238a0ee4806d27209b227b796 (diff)
downloadbcm5719-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.cpp10
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);
OpenPOWER on IntegriCloud