Page MenuHomePhabricator

WIP: [Clang] Emit 'unwindabort' when applicable.
Needs ReviewPublic

Authored by jyknight on Jan 17 2023, 3:53 AM.



Now that the core codegen support has been implemented in LLVM, we can
start using it in Clang.

This allows us to generate more efficient and smaller code for
'noexcept' functions.

For now, we only enable this for the Itanium EH handling,
_gxx_personality_v0 and _objc_personality_v0, as LLVM support is still
incomplete for other exception-handling schemes.

Depends on D141917

Diff Detail

Unit TestsFailed

70 msx64 debian > LLVM.CodeGen/X86::unwindabort-inline-asm-codegen.ll
Script: -- : 'RUN: at line 1'; /var/lib/buildkite-agent/builds/llvm-project/build/bin/llc -fast-isel=0 < /var/lib/buildkite-agent/builds/llvm-project/llvm/test/CodeGen/X86/unwindabort-inline-asm-codegen.ll | /var/lib/buildkite-agent/builds/llvm-project/build/bin/FileCheck /var/lib/buildkite-agent/builds/llvm-project/llvm/test/CodeGen/X86/unwindabort-inline-asm-codegen.ll

Event Timeline

jyknight created this revision.Jan 17 2023, 3:53 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJan 17 2023, 3:53 AM
jyknight requested review of this revision.Jan 17 2023, 3:53 AM

I couldn't find an example of creating "resume unwindabort" in the patch series. Is it yet to be done?
Could you show a source code example where such an instruction should be generated? (By the frontend or an IR pass.) I couldn't get it from the RFC.