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.
Paths
| Differential D18714
Add writeonly IR attribute ClosedPublic Authored by nhaehnle on Apr 1 2016, 2:21 PM.
Details Summary This complements the earlier addition of IntrWriteMem and IntrWriteArgMem Also start using the attribute for memset, memcpy, and memmove intrinsics,
Diff Detail
Event Timelinenhaehnle updated this object. Comment Actions Skimmed through, looks OK in principle, please see inline comments.
nhaehnle edited edge metadata. Comment ActionsonlyWritesMemory -> doesNotReadMemory Clarify the comment on the WriteOnly intrinsic argument property. reames edited edge metadata. Comment ActionsA bunch of minor comments. Seems close to going in. I'd have preferred you split the addition of the attribute from the intrinsic changes, but will not require you to split them now.
This revision now requires changes to proceed.Apr 21 2016, 9:17 AM nhaehnle edited edge metadata. nhaehnle marked 4 inline comments as done. Comment ActionsRebase on trunk (which involves upping some invalid bitcode tests) and Comment Actions Hi Philip, thanks for the feedback. All comments are either reflected in the updated revisions or answered here.
arsenm added inline comments.
nhaehnle marked an inline comment as done. Comment ActionsAdded a verifier test for {readnone, readonly} vs. writeonly clashes. Closed by commit rL274485: Add writeonly IR attribute (authored by nha). · Explain WhyJul 4 2016, 1:08 AM This revision was automatically updated to reflect the committed changes.
Comment Actions
memmove was not updated with writeonly. intentional or oversight?
Revision Contents
Diff 62652 llvm/trunk/docs/LangRef.rst
llvm/trunk/include/llvm/Analysis/AliasAnalysis.h
llvm/trunk/include/llvm/Bitcode/LLVMBitCodes.h
llvm/trunk/include/llvm/IR/Attributes.td
llvm/trunk/include/llvm/IR/CallSite.h
llvm/trunk/include/llvm/IR/Function.h
llvm/trunk/include/llvm/IR/Instructions.h
llvm/trunk/include/llvm/IR/Intrinsics.td
llvm/trunk/lib/Analysis/AliasAnalysis.cpp
llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp
llvm/trunk/lib/AsmParser/LLLexer.cpp
llvm/trunk/lib/AsmParser/LLParser.cpp
llvm/trunk/lib/AsmParser/LLToken.h
llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
llvm/trunk/lib/IR/Attributes.cpp
llvm/trunk/lib/IR/Verifier.cpp
llvm/trunk/test/Analysis/BasicAA/cs-cs.ll
llvm/trunk/test/Bindings/llvm-c/invalid-bitcode.test
llvm/trunk/test/Bitcode/attributes.ll
llvm/trunk/test/Bitcode/compatibility.ll
llvm/trunk/test/Bitcode/invalid.ll
llvm/trunk/test/LTO/X86/invalid.ll
llvm/trunk/test/Verifier/writeonly.ll
llvm/trunk/utils/TableGen/CodeGenIntrinsics.h
llvm/trunk/utils/TableGen/CodeGenTarget.cpp
llvm/trunk/utils/TableGen/IntrinsicEmitter.cpp
|
Shouldn't memset be WriteOnly<1>?