https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121045
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|pinskia at gcc dot gnu.org |unassigned at gcc dot
gnu.org
Status|ASSIGNED |NEW
--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Actually wait. My patch conflicts with what Honza was saying:
```
Old pass also contained logic to skip debug statements. This is not a good
idea since we output them to the debug output and if AFDO tool picks these
locations up they will be misplaced in basic blocks.
Debug statements are naturally quite useful to track back the AFDO profiles
and in meantime LLVM folks implemented something similar called pseudoprobe.
I think it makes sense to enable debug statements with -fauto-profile even if
debug info is off and make use of them as done in this patch.
Sadly AFDO tool is quite broken and bulid around assumption that every address
has at most one debug location assigned to it (i.e. debug info before debug
statements were introduced). I have WIP patch fixing this.
```
I have no idea if he is done that stuff yet. But it seems odd to get different
discriminators if we have -g or not.