[PATCH] D150396: [InlineCost] Check for conflicting target attributes early

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 11 13:15:37 PDT 2023


tejohnson added inline comments.


================
Comment at: llvm/lib/Analysis/InlineCost.cpp:2917
+      !CalleeTTI.areInlineCompatible(Caller, Callee)) {
+    fprintf(stderr, "InlineCost.cpp:%d\n", __LINE__);
+    return InlineResult::failure("conflicting target attributes");
----------------
Probably this should be a missed optimization remark?


================
Comment at: llvm/lib/Analysis/InlineCost.cpp:2935
   // always-inline attribute).
-  Function *Caller = Call.getCaller();
-  if (!functionsHaveCompatibleAttributes(Caller, Callee, CalleeTTI, GetTLI))
+  if (!functionsHaveCompatibleAttributes(Caller, Callee, GetTLI))
     return InlineResult::failure("conflicting attributes");
----------------
Can we move this above the always inline handling and put the new checking in here?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150396



More information about the llvm-commits mailing list