[llvm-commits] [llvm] r164190 - /llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp
Sean Silva
silvas at purdue.edu
Tue Sep 18 18:47:02 PDT 2012
Author: silvas
Date: Tue Sep 18 20:47:01 2012
New Revision: 164190
URL: http://llvm.org/viewvc/llvm-project?rev=164190&view=rev
Log:
Iterate deterministically over register classes
Fixes an observed instance of nondeterministic TableGen output.
Review by Jakob.
Modified:
llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp
Modified: llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp?rev=164190&r1=164189&r2=164190&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp Tue Sep 18 20:47:01 2012
@@ -599,7 +599,8 @@
std::vector<OperandMatchEntry> OperandMatchInfo;
/// Map of Register records to their class information.
- std::map<Record*, ClassInfo*> RegisterClasses;
+ typedef std::map<Record*, ClassInfo*, LessRecordByID> RegisterClassesTy;
+ RegisterClassesTy RegisterClasses;
/// Map of Predicate records to their subtarget information.
std::map<Record*, SubtargetFeatureInfo*> SubtargetFeatures;
@@ -2043,7 +2044,7 @@
OS << " MatchClassKind OpKind;\n";
OS << " switch (Operand.getReg()) {\n";
OS << " default: OpKind = InvalidMatchClass; break;\n";
- for (std::map<Record*, ClassInfo*>::iterator
+ for (AsmMatcherInfo::RegisterClassesTy::iterator
it = Info.RegisterClasses.begin(), ie = Info.RegisterClasses.end();
it != ie; ++it)
OS << " case " << Info.Target.getName() << "::"
More information about the llvm-commits
mailing list