[llvm-commits] [llvm] r149713 - /llvm/trunk/utils/TableGen/DFAPacketizerEmitter.cpp

Brendon Cahoon bcahoon at codeaurora.org
Fri Feb 3 13:08:25 PST 2012


Author: bcahoon
Date: Fri Feb  3 15:08:25 2012
New Revision: 149713

URL: http://llvm.org/viewvc/llvm-project?rev=149713&view=rev
Log:
Increment DFAStateEntryTable index for sentinel entry.

When adding the {-1, -1} entry to the DFAStateInputTable, we
need to increment the index used to populate the DFAStateEntryTable.
Otherwise, the entry table will be off by one for each transition
after the {-1, -1} entry. PR11908.

Modified:
    llvm/trunk/utils/TableGen/DFAPacketizerEmitter.cpp

Modified: llvm/trunk/utils/TableGen/DFAPacketizerEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DFAPacketizerEmitter.cpp?rev=149713&r1=149712&r2=149713&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/DFAPacketizerEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/DFAPacketizerEmitter.cpp Fri Feb  3 15:08:25 2012
@@ -311,8 +311,10 @@
 
     // If there are no valid transitions from this stage, we need a sentinel
     // transition.
-    if (ValidTransitions == StateEntry[i])
+    if (ValidTransitions == StateEntry[i]) {
       OS << "{-1, -1},";
+      ++ValidTransitions;
+    }
 
     OS << "\n";
   }





More information about the llvm-commits mailing list