https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223
Martin Liška changed:
What|Removed |Added
Resolution|--- |FIXED
Status|ASSIGNED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223
--- Comment #24 from CVS Commits ---
The master branch has been updated by Martin Liska :
https://gcc.gnu.org/g:aad72d2ea8378e1a56c00d15daa4bdcac8a5ae39
commit r12-3379-gaad72d2ea8378e1a56c00d15daa4bdcac8a5ae39
Author: Martin Liska
Date: Tue
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223
--- Comment #23 from Nick Desaulniers ---
(In reply to Fangrui Song from comment #18)
> I
> think a similar topic may need to be raided on llvm-dev side as I feel this
> is the tip of the iceberg - more attributes can be similarly leveraged. So,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223
--- Comment #22 from Martin Liška ---
> For example, if an inlining pass happens after instrumentation, then the
> function attribute doesn't necessarily need to suppress inlining. After
> instrumentation is done, we can even treat the noprofile
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223
--- Comment #21 from Fangrui Song ---
(In reply to Fangrui Song from comment #20)
> For example, if an inlining pass happens after instrumentation, then the
> function attribute doesn't necessarily need to suppress inlining. After
> instrumentati
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223
--- Comment #20 from Fangrui Song ---
(In reply to Marco Elver from comment #19)
I am ok with "inlining suppression" as an implementation strategy and I agree
that it should be useful. What I objected strongly is "promised inlining
suppression".
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223
--- Comment #19 from Marco Elver ---
(In reply to Fangrui Song from comment #18)
[...]
> Our problem is that a boolean attribute with 1 bit information cannot
> express whether a neg attribute function can be inlined into a pos attribute
> funct
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223
--- Comment #18 from Fangrui Song ---
(In reply to Nick Desaulniers from comment #15)
> (In reply to Fangrui Song from comment #14)
> > Can a no_profile_instrument_function function be inlined into a function
> > without the attribute? This may b
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223
--- Comment #17 from Martin Liška ---
All right, similarly to sanitizer flags, I sent a patch that prevent inlining
when -fprofile-generate is used:
https://gcc.gnu.org/pipermail/gcc-patches/2021-June/573511.html
Note that one typically uses the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223
--- Comment #16 from Nick Desaulniers ---
Clang patch (no_profile -> no_profile_instrument_function):
https://reviews.llvm.org/D104658
Kernel patches v2:
https://lore.kernel.org/lkml/20210621231822.2848305-1-ndesaulni...@google.com/
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223
--- Comment #15 from Nick Desaulniers ---
(In reply to Fangrui Song from comment #14)
> Can a no_profile_instrument_function function be inlined into a function
> without the attribute? This may be controversial but I'd argue that it can.
> GCC n
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223
--- Comment #14 from Fangrui Song ---
(In reply to Martin Liška from comment #13)
> What's likely missing is that the attribute should prevent inlining. I'm
> going to test how it behaves right now. Then, the issue can be closed.
It's not clear
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223
Martin Liška changed:
What|Removed |Added
Status|NEW |ASSIGNED
Assignee|unassigned at
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223
--- Comment #12 from Nick Desaulniers ---
Ah, perfect!
commit 1225d6b1134b ("Introduce no_profile_instrument_function attribute")
LGTM: https://godbolt.org/z/779xzndY6
Looks like it landed in GCC 7.1.
Let me change over the attribute identifi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223
--- Comment #11 from Martin Liška ---
Apparently, we already have an attribute that prevents function instrumentation
regarding PGO:
no_profile_instrument_function
The no_profile_instrument_function attribute on functions is used to inform the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223
--- Comment #10 from Nick Desaulniers ---
Link to kernel patches:
https://lore.kernel.org/lkml/20210618233023.1360185-1-ndesaulni...@google.com/
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223
--- Comment #9 from Nick Desaulniers ---
(In reply to Fangrui Song from comment #8)
> I am thinking of __attribute__((no_profile)).
>
> In Clang,
> -fprofile-generate(-fcs-profile-generate)/-fprofile-instr-generate/-fprofile-
> arcs are all diff
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223
--- Comment #8 from Fangrui Song ---
I am thinking of __attribute__((no_profile)).
In Clang,
-fprofile-generate(-fcs-profile-generate)/-fprofile-instr-generate/-fprofile-arcs
are all different. It will make sense to have a attribute disabling al
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223
Fangrui Song changed:
What|Removed |Added
CC||i at maskray dot me
--- Comment #7 from F
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223
Nick Desaulniers changed:
What|Removed |Added
CC||elver at google dot com,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223
Jan Hubicka changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223
--- Comment #4 from Martin Liška ---
I see. Simplest solution is to propagate the attribute to callers, or don't
allow inlining between a pair of function one w/ and second w/o the attribute?
Richi?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223
--- Comment #3 from Marek Polacek ---
E.g. if you have an application that is usually just busy waiting, waiting for
something to happen, but you're not interested in profiling that function, or
some function runs in a context where it is not saf
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223
--- Comment #2 from Martin Liška ---
May I ask you Marek what would be use-case of such attribute? Thanks
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223
--- Comment #1 from Richard Biener ---
Not so easy though as profiling happens after inlining.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223
Richard Biener changed:
What|Removed |Added
Severity|normal |enhancement
26 matches
Mail list logo