summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/utils/TableGen/CodeGenRegisters.cpp2
-rw-r--r--llvm/utils/TableGen/CodeGenRegisters.h3
2 files changed, 2 insertions, 3 deletions
diff --git a/llvm/utils/TableGen/CodeGenRegisters.cpp b/llvm/utils/TableGen/CodeGenRegisters.cpp
index f89ba9ea5b2..56ac6e0884e 100644
--- a/llvm/utils/TableGen/CodeGenRegisters.cpp
+++ b/llvm/utils/TableGen/CodeGenRegisters.cpp
@@ -258,8 +258,6 @@ CodeGenRegister::computeSubRegs(CodeGenRegBank &RegBank) {
// Look at the possible compositions of Idx.
// They may not all be supported by SR.
- // NOTE: Iteration order does not matter here because the EnumValue's
- // of subreg indices are unique.
for (CodeGenSubRegIndex::CompMap::const_iterator I = Comps.begin(),
E = Comps.end(); I != E; ++I) {
SubRegMap::const_iterator SRI = Map.find(I->first);
diff --git a/llvm/utils/TableGen/CodeGenRegisters.h b/llvm/utils/TableGen/CodeGenRegisters.h
index 0ebfbc564b3..e6e85b7f0eb 100644
--- a/llvm/utils/TableGen/CodeGenRegisters.h
+++ b/llvm/utils/TableGen/CodeGenRegisters.h
@@ -75,7 +75,8 @@ namespace llvm {
std::string getQualifiedName() const;
// Map of composite subreg indices.
- typedef DenseMap<CodeGenSubRegIndex *, CodeGenSubRegIndex *> CompMap;
+    typedef std::map<CodeGenSubRegIndex *, CodeGenSubRegIndex *,
+                     deref<llvm::less>> CompMap;
// Returns the subreg index that results from composing this with Idx.
// Returns NULL if this and Idx don't compose.
OpenPOWER on IntegriCloud