[LLVMbugs] [Bug 2149] New: inlining unwind breaks eh intrinsics
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Thu Mar 13 03:30:12 PDT 2008
http://llvm.org/bugs/show_bug.cgi?id=2149
Summary: inlining unwind breaks eh intrinsics
Product: libraries
Version: 2.2
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Transformation Utilities
AssignedTo: unassignedbugs at nondot.org
ReportedBy: jay.foad at antixlabs.com
CC: llvmbugs at cs.uiuc.edu
The comment at the top of HandleInlinedInvoke() in
lib/Transforms/Utils/InlineFunction.cpp says:
/// HandleInlinedInvoke - If we inlined an invoke site, we need to convert
calls
/// in the body of the inlined function into invokes and turn unwind
/// instructions into branches to the invoke unwind dest.
I don't think it's safe to inline an unwind instruction and turn it into a
branch to the invoke unwind destination, because any calls to llvm.eh.exception
and llvm.eh.selector at the destination won't work.
(I'm assuming that the code generator implements these eh intrinsics by getting
the exception pointer and exception selector from well-known native registers
which are set up as part of the stack unwinding process. If you branch directly
to the invoke unwind destination then these registers won't be set up.)
My suggested solution is not to inline any function containing an unwind
instruction.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list