[LLVMdev] unwinds to in the CFG
Gabor Greif
gabor at mac.com
Fri Mar 28 13:28:28 PDT 2008
> Hi Nick,
>
> > Just as a quick recap the problem I encountered is how to deal
> > instructions in a block being used as operands in the unwind
> dest. Such
> > as this:
> >
> > bb1: unwinds to %cleanup
> > call void @foo() ; might throw, might not
> > %x = add i32 %y, %z
> > call void @foo() ; might throw, might not
> > ret void
> > cleanup:
> > call void @use(i32 %x)
> >
> > The problem is that %x might not have been executed before we enter
> > %cleanup.
>
> how about just declaring this illegal? i.e. require the first call
> to be in a different basic block to the second, making it possible
> to use a phi node in %cleanup.
>
> Ciao,
>
> Duncan.
I pretty much support your opinion Duncan. Unwind
BBs should not mess with values defined by their worker
BB. We should not introduce undefined behaviour intentionally.
Gabor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080328/bcd60098/attachment.html>
More information about the llvm-dev
mailing list