[PATCH] D108618: [CGCall] Add NoInline attr if presented for the target

Djordje Todorovic via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 27 00:16:07 PDT 2021


djtodoro abandoned this revision.
djtodoro added a comment.

In D108618#2968626 <https://reviews.llvm.org/D108618#2968626>, @rjmccall wrote:

> Does LLVM model `noinline` as a call-site attribute in the way that would be necessary to get that effect?  Also, are you actually having a problem here, or is this just something you noticed in the code?

It is being ignored completely, anyway :/ I am not having a problem, actually. It has been noticed accidentally when looking at some other attribute, but then I've started playing with some Debug Info cases (since that is the area I mostly work) by dancing around with some cross CU referencing during when using LTO -- all in all, this isn't necessary.

> I'm not sure we can warn about putting the attribute on a declaration; it's presumably still picked up by later definitions.  There's probably a warning if they conflict, as they would if the first declaration was in a header included in both places, which is best practice.

Oh yes... It is very hard to warn during compilation since we don't have the definition -- even though we have conflicts in `test-1.c` and `test-2.c`.

@rjmccall Thanks for your comments anyway :)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108618



More information about the cfe-commits mailing list