[llvm] r191181 - Add missing index comments to the left side of the DAG ISel matcher table for each individual case of SwitchOpcode/Type.
Craig Topper
craig.topper at gmail.com
Sun Sep 22 16:18:50 PDT 2013
Author: ctopper
Date: Sun Sep 22 18:18:50 2013
New Revision: 191181
URL: http://llvm.org/viewvc/llvm-project?rev=191181&view=rev
Log:
Add missing index comments to the left side of the DAG ISel matcher table for each individual case of SwitchOpcode/Type.
Modified:
llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp
Modified: llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp?rev=191181&r1=191180&r2=191181&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/DAGISelMatcherEmitter.cpp Sun Sep 22 18:18:50 2013
@@ -315,10 +315,12 @@ EmitMatcher(const Matcher *N, unsigned I
assert(ChildSize != 0 && "Should not have a zero-sized child!");
if (i != 0) {
+ if (!OmitComments)
+ OS << "/*" << CurrentIdx << "*/";
OS.PadToColumn(Indent*2);
if (!OmitComments)
- OS << (isa<SwitchOpcodeMatcher>(N) ?
- "/*SwitchOpcode*/ " : "/*SwitchType*/ ");
+ OS << (isa<SwitchOpcodeMatcher>(N) ?
+ "/*SwitchOpcode*/ " : "/*SwitchType*/ ");
}
// Emit the VBR.
@@ -340,6 +342,8 @@ EmitMatcher(const Matcher *N, unsigned I
}
// Emit the final zero to terminate the switch.
+ if (!OmitComments)
+ OS << "/*" << CurrentIdx << "*/";
OS.PadToColumn(Indent*2) << "0, ";
if (!OmitComments)
OS << (isa<SwitchOpcodeMatcher>(N) ?
More information about the llvm-commits
mailing list