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

Kazu Hirata via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 11 18:54:48 PDT 2023


kazu added a comment.

I've added a CHECK for a missed optimization remark.  Please take a look.  Thanks!



================
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");
----------------
kazu wrote:
> tejohnson wrote:
> > Probably this should be a missed optimization remark?
> Oops.  I didn't meant to publish the `fprintf`, but yes, I'll turn it into a missed optimization remark.
It turns out that the failure reason is already emitted as a missed optimization remark up in the call hierarchy, so we don't need to emit one on our own 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