summaryrefslogtreecommitdiffstats
path: root/llvm/test/Bitcode/attributes.ll
diff options
context:
space:
mode:
authorVaivaswatha Nagaraj <vn@compilertree.com>2015-12-16 16:16:19 +0000
committerVaivaswatha Nagaraj <vn@compilertree.com>2015-12-16 16:16:19 +0000
commitfb3f4907c0c6df1aab5dc2731e712050514ab6c6 (patch)
tree758794077be72bf6c906bc5b7b750aebe01195b1 /llvm/test/Bitcode/attributes.ll
parent10120189ab3203ce0f23e7e25b54992d85f83417 (diff)
downloadbcm5719-llvm-fb3f4907c0c6df1aab5dc2731e712050514ab6c6.tar.gz
bcm5719-llvm-fb3f4907c0c6df1aab5dc2731e712050514ab6c6.zip
Add InaccessibleMemOnly and inaccessibleMemOrArgMemOnly attributes
Summary: This patch introduces two new function attributes InaccessibleMemOnly: This attribute indicates that the function may only access memory that is not accessible by the program/IR being compiled. This is a weaker form of ReadNone. inaccessibleMemOrArgMemOnly: This attribute indicates that the function may only access memory that is either not accessible by the program/IR being compiled, or is pointed to by its pointer arguments. This is a weaker form of ArgMemOnly Test cases have been updated. This revision uses this (https://github.com/llvm-mirror/llvm/commit/d001932f3a8aa1ebd1555162fdce365f011bc292) as reference. Reviewers: jmolloy, hfinkel Subscribers: reames, joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D15499 llvm-svn: 255778
Diffstat (limited to 'llvm/test/Bitcode/attributes.ll')
-rw-r--r--llvm/test/Bitcode/attributes.ll16
1 files changed, 14 insertions, 2 deletions
diff --git a/llvm/test/Bitcode/attributes.ll b/llvm/test/Bitcode/attributes.ll
index e3eda4887b3..1b3526f1fa0 100644
--- a/llvm/test/Bitcode/attributes.ll
+++ b/llvm/test/Bitcode/attributes.ll
@@ -204,7 +204,7 @@ define void @f34()
; CHECK: define void @f34()
{
call void @nobuiltin() nobuiltin
-; CHECK: call void @nobuiltin() #28
+; CHECK: call void @nobuiltin() #30
ret void;
}
@@ -277,6 +277,16 @@ define void @f47() norecurse {
ret void
}
+; CHECK: define void @f48() #28
+define void @f48() inaccessiblememonly {
+ ret void
+}
+
+; CHECK: define void @f49() #29
+define void @f49() inaccessiblemem_or_argmemonly {
+ ret void
+}
+
; CHECK: attributes #0 = { noreturn }
; CHECK: attributes #1 = { nounwind }
; CHECK: attributes #2 = { readnone }
@@ -305,4 +315,6 @@ define void @f47() norecurse {
; CHECK: attributes #25 = { convergent }
; CHECK: attributes #26 = { argmemonly }
; CHECK: attributes #27 = { norecurse }
-; CHECK: attributes #28 = { nobuiltin }
+; CHECK: attributes #28 = { inaccessiblememonly }
+; CHECK: attributes #29 = { inaccessiblemem_or_argmemonly }
+; CHECK: attributes #30 = { nobuiltin }
OpenPOWER on IntegriCloud