public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ipa/103164] New: -fipa-pta degrades aliasing oracle for tramp3d
@ 2021-11-10  7:51 hubicka at gcc dot gnu.org
  2021-11-10  9:08 ` [Bug ipa/103164] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: hubicka at gcc dot gnu.org @ 2021-11-10  7:51 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103164

            Bug ID: 103164
           Summary: -fipa-pta degrades aliasing oracle for tramp3d
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hubicka at gcc dot gnu.org
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

Compiling tramp3d with -Ofast -fwhole-program -fipa-pta I get:

Alias oracle query stats:
  refs_may_alias_p: 3820161 disambiguations, 4206951 queries
  ref_maybe_used_by_call_p: 16730 disambiguations, 3872185 queries
  call_may_clobber_ref_p: 971 disambiguations, 971 queries
  nonoverlapping_component_refs_p: 0 disambiguations, 10225 queries
  nonoverlapping_refs_since_match_p: 290 disambiguations, 6293 must overlaps,
6679 queries
  aliasing_component_refs_p: 3184 disambiguations, 67423 queries
  TBAA oracle: 2086432 disambiguations 3268935 queries
               163779 are in alias set 0
               677002 queries asked about the same object
               0 queries asked about the same alias set
               0 access volatile
               341575 are dependent in the DAG
               147 are aritificially in conflict with void *

Modref stats:
  modref use: 6077 disambiguations, 52234 queries
  modref clobber: 38991 disambiguations, 456453 queries
  120772 tbaa queries (0.264588 per modref query)
  27541 base compares (0.060337 per modref query)

PTA query stats:
  pt_solution_includes: 388070 disambiguations, 703922 queries
  pt_solutions_intersect: 78596 disambiguations, 579614 queries

While with -Ofast -fwhole-program:

Alias oracle query stats:
  refs_may_alias_p: 5462729 disambiguations, 5799042 queries
  ref_maybe_used_by_call_p: 23575 disambiguations, 5511000 queries
  call_may_clobber_ref_p: 2188 disambiguations, 2188 queries
  nonoverlapping_component_refs_p: 0 disambiguations, 6216 queries
  nonoverlapping_refs_since_match_p: 270 disambiguations, 4803 must overlaps,
5164 queries
  aliasing_component_refs_p: 2242 disambiguations, 41884 queries
  TBAA oracle: 2287136 disambiguations 3598543 queries
               166373 are in alias set 0
               769743 queries asked about the same object
               0 queries asked about the same alias set
               0 access volatile
               375144 are dependent in the DAG
               147 are aritificially in conflict with void *

Modref stats:
  modref use: 6124 disambiguations, 55063 queries
  modref clobber: 43317 disambiguations, 581346 queries
  121869 tbaa queries (0.209632 per modref query)
  32045 base compares (0.055122 per modref query)

PTA query stats:
  pt_solution_includes: 872055 disambiguations, 1119697 queries
  pt_solutions_intersect: 106431 disambiguations, 536171 queries

This seems to behave similarly on other medium sized testcases I tried.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug ipa/103164] -fipa-pta degrades aliasing oracle for tramp3d
  2021-11-10  7:51 [Bug ipa/103164] New: -fipa-pta degrades aliasing oracle for tramp3d hubicka at gcc dot gnu.org
@ 2021-11-10  9:08 ` rguenth at gcc dot gnu.org
  2021-11-10  9:46 ` hubicka at kam dot mff.cuni.cz
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-11-10  9:08 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103164

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
IPA PTA disables local re-computation of PTA info after inlining.  There must
be also some pessimization around not computing a function-local escaped
solution since that's used to keep stores to "globals" in functions live.  But
maybe
I did "fix" that somehow, but at least I can't find it right now (maybe we keep
the local PTA escaped solution, but not sure that's good enough).  Also with
IPA PTA there's no support for restrict ...

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug ipa/103164] -fipa-pta degrades aliasing oracle for tramp3d
  2021-11-10  7:51 [Bug ipa/103164] New: -fipa-pta degrades aliasing oracle for tramp3d hubicka at gcc dot gnu.org
  2021-11-10  9:08 ` [Bug ipa/103164] " rguenth at gcc dot gnu.org
@ 2021-11-10  9:46 ` hubicka at kam dot mff.cuni.cz
  2021-11-10 10:19 ` rguenth at gcc dot gnu.org
  2021-11-10 10:19 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: hubicka at kam dot mff.cuni.cz @ 2021-11-10  9:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103164

--- Comment #2 from hubicka at kam dot mff.cuni.cz ---
Yep, it only shows that we want to run ipa-pta and local oracle in
parallel since ipa-pta can not be realistically assumed to subsume all
of local PTA  (for example due to being necessarily lossy or very slow
on larger programs)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug ipa/103164] -fipa-pta degrades aliasing oracle for tramp3d
  2021-11-10  7:51 [Bug ipa/103164] New: -fipa-pta degrades aliasing oracle for tramp3d hubicka at gcc dot gnu.org
  2021-11-10  9:08 ` [Bug ipa/103164] " rguenth at gcc dot gnu.org
  2021-11-10  9:46 ` hubicka at kam dot mff.cuni.cz
@ 2021-11-10 10:19 ` rguenth at gcc dot gnu.org
  2021-11-10 10:19 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-11-10 10:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103164

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
We need to resolve issues around the fake UIDs PTA allocates though, those make
both solutions "incompatible" since for example a malloc stmt result is getting
a new UID each PTA run.  So when you intersect the local and the IPA solution
it comes out empty.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug ipa/103164] -fipa-pta degrades aliasing oracle for tramp3d
  2021-11-10  7:51 [Bug ipa/103164] New: -fipa-pta degrades aliasing oracle for tramp3d hubicka at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2021-11-10 10:19 ` rguenth at gcc dot gnu.org
@ 2021-11-10 10:19 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-11-10 10:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103164

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
See allocate_decl_uid calls in PTA.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-11-10 10:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-10  7:51 [Bug ipa/103164] New: -fipa-pta degrades aliasing oracle for tramp3d hubicka at gcc dot gnu.org
2021-11-10  9:08 ` [Bug ipa/103164] " rguenth at gcc dot gnu.org
2021-11-10  9:46 ` hubicka at kam dot mff.cuni.cz
2021-11-10 10:19 ` rguenth at gcc dot gnu.org
2021-11-10 10:19 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).