[PATCH] D77862: [CallSite removal][X86] Remove uses of CallSite from X86WinEHState.cpp

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 10 11:01:16 PDT 2020


rnk added inline comments.


================
Comment at: llvm/lib/Target/X86/X86WinEHState.cpp:492
   } else {
-    auto *II = cast<InvokeInst>(Inst);
-    NewCS = Builder.CreateInvoke(
+    auto *II = cast<InvokeInst>(&Call);
+    NewCall = Builder.CreateInvoke(
----------------
craig.topper wrote:
> rnk wrote:
> > There is a crash with callbar here waiting to happen. Seems easy enough to trigger: use asm goto + EH on i686-windows-msvc.
> > 
> > I have a TODO to audit CodeGen for `cast<InvokeInst>`, since I saw another one of these, so I guess let's do nothing for now.
> Aren't we only handling calls/invokes that have SetJmp3 as their callee? We shouldn't have a CallBr with that as a callee right?
That's true, I suppose there is no issue. I have the vague notion that one day we could use callbr for Windows exception handling instead of invoke + catchswitch. Catchswitch is effectively an unwind edge multiplexer, but if potentially throwing ops could have multiple unwind edges, we'd be good.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77862/new/

https://reviews.llvm.org/D77862





More information about the llvm-commits mailing list