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.
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 52426 docs/LangRef.rst
include/llvm/Analysis/AliasAnalysis.h
include/llvm/Bitcode/LLVMBitCodes.h
include/llvm/IR/Attributes.td
include/llvm/IR/CallSite.h
include/llvm/IR/Function.h
include/llvm/IR/Instructions.h
include/llvm/IR/Intrinsics.td
lib/Analysis/AliasAnalysis.cpp
lib/Analysis/BasicAliasAnalysis.cpp
lib/AsmParser/LLLexer.cpp
lib/AsmParser/LLParser.cpp
lib/AsmParser/LLToken.h
lib/Bitcode/Reader/BitcodeReader.cpp
lib/Bitcode/Writer/BitcodeWriter.cpp
lib/IR/Attributes.cpp
lib/IR/Verifier.cpp
test/Analysis/BasicAA/cs-cs.ll
test/Bitcode/attributes.ll
test/Bitcode/compatibility.ll
test/Transforms/ObjCARC/nested.ll
utils/TableGen/CodeGenIntrinsics.h
utils/TableGen/CodeGenTarget.cpp
utils/TableGen/IntrinsicEmitter.cpp
|
may write to