[llvm] [CFI] Fix Direct Call Issues in CFI Dispatch Table (PR #69663)
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 16 13:08:49 PST 2023
================
@@ -1471,6 +1471,11 @@ void LowerTypeTestsModule::createJumpTable(
SmallVector<Value *, 16> AsmArgs;
AsmArgs.reserve(Functions.size() * 2);
+ // Check if the first entry has the NoUnwind attribute.
----------------
efriedma-quic wrote:
I haven't looked at this in a while, but I think the issue I was running into was that the EH info was causing issues for a linker script that was expecting no EH info. Currently, the only way to suppress the generation of the ".cfi_startproc" (which genreates EH info) is "nounwind", I think.
Ideally, we would skip emitting EH info for all jump tables functions; even if the callee unwinds, the jump table isn't on the stack at that point anyway. Maybe worth adding some way to represent that.
https://github.com/llvm/llvm-project/pull/69663
More information about the llvm-commits
mailing list