This is an archive of the discontinued LLVM Phabricator instance.

[CallSite removal][X86] Remove uses of CallSite from X86WinEHState.cpp
ClosedPublic

Authored by craig.topper on Apr 10 2020, 12:51 AM.

Diff Detail

Event Timeline

craig.topper created this revision.Apr 10 2020, 12:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 10 2020, 12:51 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
rnk accepted this revision.Apr 10 2020, 10:40 AM

lgtm, thanks for pushing the migration.

llvm/lib/Target/X86/X86WinEHState.cpp
492–493

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.

This revision is now accepted and ready to land.Apr 10 2020, 10:40 AM
craig.topper marked an inline comment as done.Apr 10 2020, 10:53 AM
craig.topper added inline comments.
llvm/lib/Target/X86/X86WinEHState.cpp
492–493

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?

rnk added inline comments.Apr 10 2020, 11:01 AM
llvm/lib/Target/X86/X86WinEHState.cpp
492–493

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.

This revision was automatically updated to reflect the committed changes.