[LLVMdev] llvm-gcc4 and setjmp

Jay Foad jay.foad at antixlabs.com
Fri Aug 24 03:53:18 PDT 2007


Hi Anton,

> This seems to be well-known problem with interacting setjmp/longjmp and
> optimization passes. Actually, this is LLVM PR1520.

I didn't find that PR because it doesn't mention setjmp!

> The problem is that
> setjmp/longjmp changes codeflow in inpredictable manner (especially, if
> jump buffer escapes from function). We need some clever idea how to
> represent such stuff.

I would expect llvm-gcc to use LLVM's setjmp/longjmp intrinsics and then to
run the LowerSetJmp pass to turn the intrinsic calls into uses of invoke and
unwind. At that point, the control flow is explicit, isn't it?

Thanks,
Jay.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20070824/8e34d43f/attachment.html>


More information about the llvm-dev mailing list