AttrBuilder has two constructors that allow for costly implict conversion, when ad-hoc method could do the job more efficiently.
Make these constructors explicit, and provide the ad-hoc specialized method.
Details
- Reviewers
nikic
Diff Detail
Event Timeline
llvm/include/llvm/IR/Attributes.h | ||
---|---|---|
455 | Duplicate declaration with a few lines below, due to a similar change I landed earlier today (https://github.com/llvm/llvm-project/commit/6e30cb7673df293fd294acef7eadca8050b5a71e). | |
490 | I'm not sure I understand the benefit of this method, and similar ones below. In the end, won't we still convert this AttributeSet into an AttrBuilder for merging? I think the only case where this could make a difference is if the Index is currently unused, in which case the original attribute set can be directly used. Is this the case being optimized? |
llvm/include/llvm/IR/Attributes.h | ||
---|---|---|
455 | gotcha |
clang-format: please reformat the code