[PATCH] Fix failure to invoke exception handler on Win64.

Reid Kleckner rnk at google.com
Mon Aug 4 13:15:29 PDT 2014


lgtm

I guess I'll apply this with the suggested tweaks, to save a round trip.  Thanks for the patch!

================
Comment at: lib/Target/X86/X86MCInstLower.cpp:982-983
@@ +981,4 @@
+
+  case X86::SEH_Epilogue:
+    MachineBasicBlock::const_iterator MBBI(MI);
+    // Check if preceded by a call and emit nop if so.
----------------
Usually when you declare locals in a case label like this you need to wrap it in braces.  There are no subsequent cases today, but you should go ahead and wrap it now.

================
Comment at: lib/Target/X86/X86MCInstLower.cpp:986
@@ +985,3 @@
+    for (MBBI = prev_inst(MBBI); MBBI; MBBI = prev_inst(MBBI)) {
+      // Pseudo's aren't real instructions, so they don't count.
+      if (!MBBI->isPseudo()) {
----------------
I think some pseudos emit real code, so I would soften this to say that by assuming they aren't real, we will conservatively emit a nop in more cases than is absolutely necessary.

http://reviews.llvm.org/D4751






More information about the llvm-commits mailing list