[PATCH] Use function attribute "trap-func-name" and remove TargetOptions::TrapFuncName

Eric Christopher echristo at gmail.com
Tue Jun 30 13:06:27 PDT 2015


Right. I mean, neither of them will "win" which may be what we wanted. Or
not. I don't know. :)

(LTO code generation options ftw? :)

Either way, I don't see it as too much of an issue if you want to go this
way instead.

-eric

On Tue, Jun 30, 2015 at 1:01 PM Akira Hatanaka <ahatanak at gmail.com> wrote:

> In the following example, we can just inline test0 into test1 without
> checking "trap-func-name" on the call-sites, no? If we attach the attribute
> to the calling functions, then we'll have to check that the merged
> functions have the same trap function name.
>
> declare void @llvm.trap() #2
> ...
> define void @test1() #0 {
>
>   ...
>   call void @llvm.trap() #4
>   ...
>   call void @test0()
>
> }
>
> define void @test0() #3 {
>
>   ...
>   call void @llvm.trap() #5
>   ...
>
> }
>
> attributes #2 = { noreturn nounwind }
> attributes #4 = { noreturn nounwind "trap-func-name"="foo112" }
> attributes #5 = { noreturn nounwind "trap-func-name"="foo111" }
>
>
> http://reviews.llvm.org/D10832
>
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150630/107c13b5/attachment.html>


More information about the llvm-commits mailing list