aboutsummaryrefslogtreecommitdiff
path: root/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
commitb61e09de6d0cd7241ddc6dee3efef416552eec3b (patch)
tree0ea96d6361d7fb8afa1cd3eac51a1b30d0ca8d6d /utils/TableGen/CodeGenDAGPatterns.cpp
parentc3e6859d8dc9014fee8023497153add9a2148f22 (diff)
don't go through getInstructions().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98906 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeGenDAGPatterns.cpp')
-rw-r--r--utils/TableGen/CodeGenDAGPatterns.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/utils/TableGen/CodeGenDAGPatterns.cpp b/utils/TableGen/CodeGenDAGPatterns.cpp
index fafcd8c30e..8c07c4a80c 100644
--- a/utils/TableGen/CodeGenDAGPatterns.cpp
+++ b/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);