Hi Renato,> On 1 December 2010 21:37, Duncan Sands<baldrick at free.fr> wrote: >> <catch info> = [personality<ptr>] [cleanup] [catches<list of catches and filters>] > > That would allow you to choose a different personality routine for > every invoke inside the same function (ie. same EH table), which > doesn't make sense to me...if you inline Ada code into C++ code you might get this. That said, I keep oscillating between having personalities be per-function (and not allowing inlining if there would be a personality clash) or per invoke.> It'd also disassociate the personality routine with the landing pads > (which are used to build the EH table).In theory it is possible to have several personality functions per function, but I'm not sure it is worth the effort of supporting. In any case this is a minor point, but does show the problem of baking personality functions, catches etc into the IR: changing your mind about how you want to do things then involves a big cost... Ciao, Duncan.
On 2 December 2010 10:41, Duncan Sands <baldrick at free.fr> wrote:> In theory it is possible to have several personality functions per > function, but I'm not sure it is worth the effort of supporting.Indeed. Not to mention that there is no way to enforce that on a per-call basis in any language I know. Also, I can't think of a reason for the front-end to decide that per function call... One personality definition per function should be enough... -- cheers, --renato http://systemcall.org/ Reclaim your digital rights, eliminate DRM, learn more at http://www.defectivebydesign.org/what_is_drm
> Not to mention that there is no way to enforce that on a per-call > basis in any language I know. Also, I can't think of a reason for the > front-end to decide that per function call... > > One personality definition per function should be enough...It occurs when doing LTO and inlining functions written in one language into functions written in another, thus my Ada inlined into C++ example. Mixed language programming is quite common, so it may be worth supporting this, but it's not clear. Ciao, Duncan.
On Dec 2, 2010, at 3:02 AM, Renato Golin wrote:> On 2 December 2010 10:41, Duncan Sands <baldrick at free.fr> wrote: >> In theory it is possible to have several personality functions per >> function, but I'm not sure it is worth the effort of supporting. > > Indeed. > > Not to mention that there is no way to enforce that on a per-call > basis in any language I know. Also, I can't think of a reason for the > front-end to decide that per function call... > > One personality definition per function should be enough… >The problem comes about with LTO. It's an entirely new problem, because LTO (and gcc's version of it) didn't exist before it. There is a PR about handling multiple personality functions in a function. It's just a matter of having the libunwind mechanism handling it. -bw -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20101202/1c6fd8c1/attachment.html>