<div dir="ltr">Right. I mean, neither of them will "win" which may be what we wanted. Or not. I don't know. :)<div><br></div><div>(LTO code generation options ftw? :)<br><div><br></div><div>Either way, I don't see it as too much of an issue if you want to go this way instead.</div><div><br></div><div>-eric</div></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jun 30, 2015 at 1:01 PM Akira Hatanaka <<a href="mailto:ahatanak@gmail.com">ahatanak@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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.<br>
<br>
declare void @llvm.trap() #2<br>
...<br>
define void @test1() #0 {<br>
<br>
  ...<br>
  call void @llvm.trap() #4<br>
  ...<br>
  call void @test0()<br>
<br>
}<br>
<br>
define void @test0() #3 {<br>
<br>
  ...<br>
  call void @llvm.trap() #5<br>
  ...<br>
<br>
}<br>
<br>
attributes #2 = { noreturn nounwind }<br>
attributes #4 = { noreturn nounwind "trap-func-name"="foo112" }<br>
attributes #5 = { noreturn nounwind "trap-func-name"="foo111" }<br>
<br>
<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D10832&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=d0WwaL1BxZsMhcf-gfVq26coJoRPJpN-j2TU35rt-a8&s=2SmCpNQ-M0SpT9Incx_m8p8ITTn7vlb2_OJlpJXY1fw&e=" rel="noreferrer" target="_blank">http://reviews.llvm.org/D10832</a><br>
<br>
EMAIL PREFERENCES<br>
  <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_settings_panel_emailpreferences_&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=d0WwaL1BxZsMhcf-gfVq26coJoRPJpN-j2TU35rt-a8&s=tE-L0ScIme-mZthjIB38njlZvoBgw2z9Lb6wGQOIrV0&e=" rel="noreferrer" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
<br>
<br>
</blockquote></div>