[PATCH] D119579: [Inliner] Respect noinline call site attribute

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 13 21:40:15 PST 2022


aeubanks added inline comments.


================
Comment at: llvm/lib/Analysis/InlineCost.cpp:2867
   if (Call.hasFnAttr(Attribute::AlwaysInline)) {
+    if (Callee->hasFnAttribute(Attribute::AlwaysInline) && Call.isNoInline())
+      return InlineResult::failure("noinline call site attribute");
----------------
checking the call site attributes with `Call.getAttributes().hasFnAttr(Attribute::NoInline)` should be enough since `noinline` and `alwaysinline` are incompatible within a set of attriutes


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

https://reviews.llvm.org/D119579



More information about the llvm-commits mailing list