mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-19 23:23:38 -04:00
[Attributor] Deduce "nosync" function attribute.
Introduce and deduce "nosync" function attribute to indicate that a function does not synchronize with another thread in a way that other thread might free memory. Reviewers: jdoerfert, jfb, nhaehnle, arsenm Subscribers: wdng, hfinkel, nhaenhle, mehdi_amini, steven_wu, dexonsmith, arsenm, uenoku, hiraditya, jfb, llvm-commits Differential Revision: https://reviews.llvm.org/D62766 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365830 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -203,8 +203,8 @@ declare void @nobuiltin()
|
||||
define void @f34()
|
||||
; CHECK: define void @f34()
|
||||
{
|
||||
call void @nobuiltin() nobuiltin
|
||||
; CHECK: call void @nobuiltin() #38
|
||||
call void @nobuiltin() nobuiltin
|
||||
; CHECK: call void @nobuiltin() #39
|
||||
ret void;
|
||||
}
|
||||
|
||||
@@ -362,6 +362,12 @@ define void @f61() nofree {
|
||||
ret void
|
||||
}
|
||||
|
||||
; CHECK: define void @f62() #38
|
||||
define void @f62() nosync
|
||||
{
|
||||
ret void
|
||||
}
|
||||
|
||||
; CHECK: attributes #0 = { noreturn }
|
||||
; CHECK: attributes #1 = { nounwind }
|
||||
; CHECK: attributes #2 = { readnone }
|
||||
@@ -400,4 +406,5 @@ define void @f61() nofree {
|
||||
; CHECK: attributes #35 = { shadowcallstack }
|
||||
; CHECK: attributes #36 = { willreturn }
|
||||
; CHECK: attributes #37 = { nofree }
|
||||
; CHECK: attributes #38 = { nobuiltin }
|
||||
; CHECK: attributes #38 = { nosync }
|
||||
; CHECK: attributes #39 = { nobuiltin }
|
||||
|
||||
Reference in New Issue
Block a user