diff options
author | Nicolai Haehnle <nhaehnle@gmail.com> | 2016-04-19 21:58:33 +0000 |
---|---|---|
committer | Nicolai Haehnle <nhaehnle@gmail.com> | 2016-04-19 21:58:33 +0000 |
commit | b48275f134a691514a4703ead26c8498a91ba64a (patch) | |
tree | e4ef5d4e73ec7602c17cec4b00ebd9cd41068d53 /llvm/utils/TableGen/IntrinsicEmitter.cpp | |
parent | e2dda4f7500b135005f0c71b44ac900c3725c892 (diff) | |
download | bcm5719-llvm-b48275f134a691514a4703ead26c8498a91ba64a.tar.gz bcm5719-llvm-b48275f134a691514a4703ead26c8498a91ba64a.zip |
Add IntrWrite[Arg]Mem intrinsic property
Summary:
This property is used to mark an intrinsic that only writes to memory, but
neither reads from memory nor has other side effects.
An example where this is useful is the llvm.amdgcn.buffer.store.format.*
intrinsic, which corresponds to a store instruction that goes through a special
buffer descriptor rather than through a plain pointer.
With this property, the intrinsic should still be handled as having side
effects at the LLVM IR level, but machine scheduling can make smarter
decisions.
Reviewers: tstellarAMD, arsenm, joker.eph, reames
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D18291
llvm-svn: 266826
Diffstat (limited to 'llvm/utils/TableGen/IntrinsicEmitter.cpp')
-rw-r--r-- | llvm/utils/TableGen/IntrinsicEmitter.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/utils/TableGen/IntrinsicEmitter.cpp b/llvm/utils/TableGen/IntrinsicEmitter.cpp index dcb70e19ba8..2004eaeec48 100644 --- a/llvm/utils/TableGen/IntrinsicEmitter.cpp +++ b/llvm/utils/TableGen/IntrinsicEmitter.cpp @@ -462,8 +462,8 @@ struct AttributeComparator { return R->isConvergent; // Try to order by readonly/readnone attribute. - CodeGenIntrinsic::ModRefKind LK = L->ModRef; - CodeGenIntrinsic::ModRefKind RK = R->ModRef; + CodeGenIntrinsic::ModRefBehavior LK = L->ModRef; + CodeGenIntrinsic::ModRefBehavior RK = R->ModRef; if (LK != RK) return (LK > RK); // Order by argument attributes. @@ -616,11 +616,13 @@ EmitAttributes(const std::vector<CodeGenIntrinsic> &Ints, raw_ostream &OS) { OS << ","; OS << "Attribute::ReadOnly"; break; + case CodeGenIntrinsic::WriteArgMem: case CodeGenIntrinsic::ReadWriteArgMem: if (addComma) OS << ","; OS << "Attribute::ArgMemOnly"; break; + case CodeGenIntrinsic::WriteMem: case CodeGenIntrinsic::ReadWriteMem: break; } |