[PATCH] D61652: [Attr] Introduce dereferenceable_globally
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 12 19:57:53 PDT 2019
reames added a comment.
Wow, we have a huge amount of boilerplate when adding an attribute.
Minor comments only. Seems straight forward and I didn't see any copy paste errors.
================
Comment at: llvm/include/llvm/IR/Argument.h:67
+ /// number of bytes known to be dereferenceable. Otherwise, zero is returned.
+ uint64_t getDereferenceableBytesGlobally() const;
+
----------------
For consistency, I'd prefer getDereferenableGloballyBytes. Doesn't read well, but it's consistent with all the other naming.
================
Comment at: llvm/lib/IR/Verifier.cpp:4115
if (MDNode *MD = I.getMetadata(LLVMContext::MD_dereferenceable))
visitDereferenceableMetadata(I, MD);
----------------
Very minor style item, since we have multple of these now, maybe:
for (auto ID : {MD_...})
if (MDNode ...)
visitDeref(...)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61652/new/
https://reviews.llvm.org/D61652
More information about the llvm-commits
mailing list