[PATCH] [WinEH] Update C++ exception state numbering code

David Majnemer david.majnemer at gmail.com
Wed May 6 11:18:27 PDT 2015


REPOSITORY
  rL LLVM

================
Comment at: lib/CodeGen/AsmPrinter/Win64Exception.cpp:391
@@ -378,3 +390,3 @@
   OS.EmitIntValue(0x19930522, 4);                      // MagicNumber
-  OS.EmitIntValue(FuncInfo.UnwindMap.size(), 4);       // MaxState
+  OS.EmitIntValue(FuncInfo.MaxState, 4);               // MaxState
   OS.EmitValue(createImageRel32(UnwindMapXData), 4);   // UnwindMap
----------------
When is `MaxState` different from `FuncInfo.UnwindMap.size()`.

================
Comment at: lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp:588
@@ +587,3 @@
+// with each action before we start assigning state numbers.
+void WinEHNumbering::findActionRootLPads(const Function &F) {
+  auto I = VisitedHandlers.insert(&F);
----------------
`calculateStateNumbers` does the same basic traversal, how does stashing the first landing pad associated with the action help things?  Is it just to reenable the optimization in `processCallSite` ?

http://reviews.llvm.org/D9512

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list