[PATCH] D156843: [Inliner] Add the callsites called function return attributes to set addable attributes

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 15 03:12:34 PDT 2023


nikic added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/InlineFunction.cpp:1347
+                     CB.getCalledFunction()->getContext(),
+                     CB.getCalledFunction()->getAttributes().getRetAttrs()));
   if (!AB.hasAttributes())
----------------
This is going to intern a new AttributeSet just to turn it back into an AttrBuilder.

For this particular usage, I don't get why this is using AttrBuilder at all. You can replace the `AB` uses below with querying attributes on `CB` directly.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156843/new/

https://reviews.llvm.org/D156843



More information about the llvm-commits mailing list