[PATCH] D24748: Win64: Don't emit unwind info for "leaf" functions (PR30337)

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 21 12:54:52 PDT 2016


majnemer added inline comments.

================
Comment at: include/llvm/CodeGen/MachineFunction.h:378-379
@@ -374,1 +377,4 @@
 
+  bool hasWinCFI() const { return HasWinCFI; }
+  void setHasWinCFI(bool v) { HasWinCFI = v; }
+
----------------
I'd sleep a little easier at night if `HasWinCFI` was an optional bool.  This way we can make sure that nobody is trying to access it before we calculate the state the function is in.

================
Comment at: test/CodeGen/X86/coalescer-win64.ll:14
@@ -13,3 +13,2 @@
 ; CHECK-LABEL: test1{{$}}
-; CHECK: .seh_proc test1{{$}}
 ; CHECK: rex64 jmpq *fnptr(%rip)
----------------
Maybe we should have a CHECK-NOT here?

================
Comment at: test/CodeGen/X86/coalescer-win64.ll:16
@@ -15,2 +14,1 @@
 ; CHECK: rex64 jmpq *fnptr(%rip)
-; CHECK: .seh_endproc
----------------
ditto.

================
Comment at: test/CodeGen/X86/pr24374.ll:33
@@ -32,3 +32,1 @@
 }
-; CHECK-LABEL: g:
-; CHECK:       .seh_proc g
----------------
Maybe we can keep the CHECK-LABEL? There should be a UD2 here too, right?

================
Comment at: test/CodeGen/X86/win64_eh.ll:5-14
@@ -4,12 +4,1 @@
 
-; Check function without prolog
-define void @foo0() uwtable {
-entry:
-  ret void
-}
-; WIN64-LABEL: foo0:
-; WIN64: .seh_proc foo0
-; WIN64: .seh_endprologue
-; WIN64: ret
-; WIN64: .seh_endproc
-
----------------
Why did this test get removed?


https://reviews.llvm.org/D24748





More information about the llvm-commits mailing list