[PATCH] D116111: Avoid using AttrBuilder as an intermediate step when not needed

serge via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 21 07:49:48 PST 2021


serge-sans-paille created this revision.
serge-sans-paille added a reviewer: nikic.
Herald added subscribers: dexonsmith, jdoerfert, hiraditya.
serge-sans-paille requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

AttrBuilder is an helpful but costly data structure; it is not
needed to construct one when a single element is added.

Using an explicit constructor for AttrBuilder helps spotting cases  where an
implicit conversion happens when the appropriate method can be used instead.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D116111

Files:
  llvm/include/llvm/IR/Attributes.h
  llvm/lib/IR/AttributeImpl.h
  llvm/lib/IR/Attributes.cpp
  llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
  llvm/unittests/IR/AttributesTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116111.395679.patch
Type: text/x-patch
Size: 13812 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211221/24fa9607/attachment.bin>


More information about the llvm-commits mailing list