diff options
author | Duncan Sands <baldrick@free.fr> | 2008-09-19 08:17:05 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2008-09-19 08:17:05 +0000 |
commit | af25ee7ffc1a73db10dfef04190bae22e08f742a (patch) | |
tree | 436f588c7e4eefa3d413b9879d02d1a47514eb47 /llvm/test/Transforms/AddReadAttrs/2008-09-03-ReadOnly.ll | |
parent | a75815ebb030bc50791dcaa34a9a4c6f0628a146 (diff) | |
download | bcm5719-llvm-af25ee7ffc1a73db10dfef04190bae22e08f742a.tar.gz bcm5719-llvm-af25ee7ffc1a73db10dfef04190bae22e08f742a.zip |
Add a new pass AddReadAttrs which works out which functions
can get the readnone/readonly attributes, and gives them it.
The plan is to remove markmodref (which did the same thing
by querying GlobalsModRef) and delete the analogous
functionality from GlobalsModRef.
llvm-svn: 56341
Diffstat (limited to 'llvm/test/Transforms/AddReadAttrs/2008-09-03-ReadOnly.ll')
-rw-r--r-- | llvm/test/Transforms/AddReadAttrs/2008-09-03-ReadOnly.ll | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/test/Transforms/AddReadAttrs/2008-09-03-ReadOnly.ll b/llvm/test/Transforms/AddReadAttrs/2008-09-03-ReadOnly.ll new file mode 100644 index 00000000000..c08e7b12653 --- /dev/null +++ b/llvm/test/Transforms/AddReadAttrs/2008-09-03-ReadOnly.ll @@ -0,0 +1,9 @@ +; RUN: llvm-as < %s | opt -addreadattrs | llvm-dis | grep readonly | count 2 + +define i32 @f() { +entry: + %tmp = call i32 @e( ) ; <i32> [#uses=1] + ret i32 %tmp +} + +declare i32 @e() readonly |