[llvm-commits] [llvm] r155039 - /llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp
Jim Grosbach
grosbach at apple.com
Wed Apr 18 13:24:50 PDT 2012
Author: grosbach
Date: Wed Apr 18 15:24:49 2012
New Revision: 155039
URL: http://llvm.org/viewvc/llvm-project?rev=155039&view=rev
Log:
Revert "Replace some uses of std:map<std::string,...> with StringMap."
StringMap iterators are not deterministic, and that's more important
here than speed or memory.
Modified:
llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp
Modified: llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp?rev=155039&r1=155038&r2=155039&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp Wed Apr 18 15:24:49 2012
@@ -724,7 +724,7 @@
Records.getAllDerivedDefinitions("InstAlias");
// Create a map from the qualified name to a list of potential matches.
- StringMap<std::vector<CodeGenInstAlias*> > AliasMap;
+ std::map<std::string, std::vector<CodeGenInstAlias*> > AliasMap;
for (std::vector<Record*>::iterator
I = AllInstAliases.begin(), E = AllInstAliases.end(); I != E; ++I) {
CodeGenInstAlias *Alias = new CodeGenInstAlias(*I, Target);
@@ -738,9 +738,9 @@
// A map of which conditions need to be met for each instruction operand
// before it can be matched to the mnemonic.
- StringMap<std::vector<IAPrinter*> > IAPrinterMap;
+ std::map<std::string, std::vector<IAPrinter*> > IAPrinterMap;
- for (StringMap<std::vector<CodeGenInstAlias*> >::iterator
+ for (std::map<std::string, std::vector<CodeGenInstAlias*> >::iterator
I = AliasMap.begin(), E = AliasMap.end(); I != E; ++I) {
std::vector<CodeGenInstAlias*> &Aliases = I->second;
@@ -828,7 +828,7 @@
}
if (CantHandle) continue;
- IAPrinterMap[I->first()].push_back(IAP);
+ IAPrinterMap[I->first].push_back(IAP);
}
}
@@ -842,7 +842,7 @@
std::string Cases;
raw_string_ostream CasesO(Cases);
- for (StringMap<std::vector<IAPrinter*> >::iterator
+ for (std::map<std::string, std::vector<IAPrinter*> >::iterator
I = IAPrinterMap.begin(), E = IAPrinterMap.end(); I != E; ++I) {
std::vector<IAPrinter*> &IAPs = I->second;
std::vector<IAPrinter*> UniqueIAPs;
@@ -865,7 +865,7 @@
if (UniqueIAPs.empty()) continue;
- CasesO.indent(2) << "case " << I->first() << ":\n";
+ CasesO.indent(2) << "case " << I->first << ":\n";
for (std::vector<IAPrinter*>::iterator
II = UniqueIAPs.begin(), IE = UniqueIAPs.end(); II != IE; ++II) {
More information about the llvm-commits
mailing list