summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/IntrinsicEmitter.cpp
diff options
context:
space:
mode:
authorNicolai Haehnle <nhaehnle@gmail.com>2016-07-04 08:01:29 +0000
committerNicolai Haehnle <nhaehnle@gmail.com>2016-07-04 08:01:29 +0000
commit84c9f9919a1b0e7a80af6854ec3507770ae854f7 (patch)
tree130469c2de412fd58816b2edde5a9e917070dc91 /llvm/utils/TableGen/IntrinsicEmitter.cpp
parentac1823f6e947ffee2f5171a59cc2afc175b66781 (diff)
downloadbcm5719-llvm-84c9f9919a1b0e7a80af6854ec3507770ae854f7.tar.gz
bcm5719-llvm-84c9f9919a1b0e7a80af6854ec3507770ae854f7.zip
Add writeonly IR attribute
Summary: This complements the earlier addition of IntrWriteMem and IntrWriteArgMem LLVM intrinsic properties, see D18291. Also start using the attribute for memset, memcpy, and memmove intrinsics, and remove their special-casing in BasicAliasAnalysis. Reviewers: reames, joker.eph Subscribers: joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D18714 llvm-svn: 274485
Diffstat (limited to 'llvm/utils/TableGen/IntrinsicEmitter.cpp')
-rw-r--r--llvm/utils/TableGen/IntrinsicEmitter.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/IntrinsicEmitter.cpp b/llvm/utils/TableGen/IntrinsicEmitter.cpp
index 2004eaeec48..bee7fbf715b 100644
--- a/llvm/utils/TableGen/IntrinsicEmitter.cpp
+++ b/llvm/utils/TableGen/IntrinsicEmitter.cpp
@@ -554,6 +554,12 @@ EmitAttributes(const std::vector<CodeGenIntrinsic> &Ints, raw_ostream &OS) {
OS << "Attribute::ReadOnly";
addComma = true;
break;
+ case CodeGenIntrinsic::WriteOnly:
+ if (addComma)
+ OS << ",";
+ OS << "Attribute::WriteOnly";
+ addComma = true;
+ break;
case CodeGenIntrinsic::ReadNone:
if (addComma)
OS << ",";
@@ -617,12 +623,21 @@ EmitAttributes(const std::vector<CodeGenIntrinsic> &Ints, raw_ostream &OS) {
OS << "Attribute::ReadOnly";
break;
case CodeGenIntrinsic::WriteArgMem:
- case CodeGenIntrinsic::ReadWriteArgMem:
if (addComma)
OS << ",";
+ OS << "Attribute::WriteOnly,";
OS << "Attribute::ArgMemOnly";
break;
case CodeGenIntrinsic::WriteMem:
+ if (addComma)
+ OS << ",";
+ OS << "Attribute::WriteOnly";
+ break;
+ case CodeGenIntrinsic::ReadWriteArgMem:
+ if (addComma)
+ OS << ",";
+ OS << "Attribute::ArgMemOnly";
+ break;
case CodeGenIntrinsic::ReadWriteMem:
break;
}
OpenPOWER on IntegriCloud