diff options
| author | Stefan Stipanovic <sstipanovic@s-energize.com> | 2019-07-11 21:37:40 +0000 |
|---|---|---|
| committer | Stefan Stipanovic <sstipanovic@s-energize.com> | 2019-07-11 21:37:40 +0000 |
| commit | 0626367202ced4ab46410c15357eed0ad8be6d5c (patch) | |
| tree | b501bcd56eabe89658e19db7b4497adc58b313e5 /llvm/test/Bitcode | |
| parent | 7d2019bb961f94eec476f255bb776d470ecd1b49 (diff) | |
| download | bcm5719-llvm-0626367202ced4ab46410c15357eed0ad8be6d5c.tar.gz bcm5719-llvm-0626367202ced4ab46410c15357eed0ad8be6d5c.zip | |
[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
llvm-svn: 365830
Diffstat (limited to 'llvm/test/Bitcode')
| -rw-r--r-- | llvm/test/Bitcode/attributes.ll | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/llvm/test/Bitcode/attributes.ll b/llvm/test/Bitcode/attributes.ll index 84630cd4bf8..c6e146791d8 100644 --- a/llvm/test/Bitcode/attributes.ll +++ b/llvm/test/Bitcode/attributes.ll @@ -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 } |

