[PATCH] Use function attribute "trap-func-name" and remove TargetOptions::TrapFuncName
Akira Hatanaka
ahatanak at gmail.com
Tue Jun 30 13:01:56 PDT 2015
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/
More information about the llvm-commits
mailing list