On 11/8/2021 11:50 AM, Jan Hubicka via Gcc-patches wrote:
Hi,
this patch moves uncprop after modref and pure/const pass and adds a comment 
that
this pass should alwasy be last since it is only supposed to help PHI lowering.
The pass replaces constant by SSA names that are known to be constant at the
place which hardly helps other passes.

Modref now allows easily to compare ipa solutions with local solutions done
at compile time.  The local solutions should be monotonously better ideally
they should be the same showing that IPA machinery can do all we can do locally.

Neither is quite true. Building cc1plus we get
  - 1075 parameters whose EAF flags detected late are worse than those from IPA
    (1384 before the patch)
  - 5943 parameters whose EAF flags detected late are better than those from IPA
    (5766 before the patch)
  - 367 parameters whose RAF flags are changed (some better some worse)
    (375 before the patch)

Out of about 30k params tracked in 32k functions.
So not optimal, but still situation is noticeably better than before the patch
changing from

Alias oracle query stats:
   refs_may_alias_p: 76514746 disambiguations, 101144061 queries
   ref_maybe_used_by_call_p: 642091 disambiguations, 77522063 queries
   call_may_clobber_ref_p: 387354 disambiguations, 390389 queries
   nonoverlapping_component_refs_p: 0 disambiguations, 26150 queries
   nonoverlapping_refs_since_match_p: 30138 disambiguations, 65278 must 
overlaps, 96375 queries
   aliasing_component_refs_p: 57707 disambiguations, 15412274 queries
   TBAA oracle: 28146643 disambiguations 104216840 queries
                14970479 are in alias set 0
                8940210 queries asked about the same object
                117 queries asked about the same alias set
                0 access volatile
                50245719 are dependent in the DAG
                1913672 are aritificially in conflict with void *

Modref stats:
   modref use: 25185 disambiguations, 697431 queries
   modref clobber: 2333371 disambiguations, 22334828 queries
   5347614 tbaa queries (0.239429 per modref query)
   759061 base compares (0.033986 per modref query)

PTA query stats:
   pt_solution_includes: 13361936 disambiguations, 40666636 queries
   pt_solutions_intersect: 1589896 disambiguations, 13702105 queries

to

Alias oracle query stats:
   refs_may_alias_p: 76706288 disambiguations, 101289627 queries
   ref_maybe_used_by_call_p: 647660 disambiguations, 77711837 queries
   call_may_clobber_ref_p: 388155 disambiguations, 391104 queries
   nonoverlapping_component_refs_p: 0 disambiguations, 26150 queries
   nonoverlapping_refs_since_match_p: 30138 disambiguations, 65170 must 
overlaps, 96267 queries
   aliasing_component_refs_p: 57149 disambiguations, 15405496 queries
   TBAA oracle: 28122633 disambiguations 104205741 queries
                14987347 are in alias set 0
                8944156 queries asked about the same object
                99 queries asked about the same alias set
                0 access volatile
                50238319 are dependent in the DAG
                1913187 are aritificially in conflict with void *

Modref stats:
   modref use: 25273 disambiguations, 701571 queries
   modref clobber: 2337545 disambiguations, 22431672 queries
   5357026 tbaa queries (0.238815 per modref query)
   762911 base compares (0.034010 per modref query)

PTA query stats:
   pt_solution_includes: 13467699 disambiguations, 40734635 queries
   pt_solutions_intersect: 1681618 disambiguations, 13751306 queries

So we got 6% better on pt_soltions_intersect

Bootstrapped/regtested x86_64-linux, comitted.

gcc/ChangeLog:

        PR tree-opt/103177
        * passes.def: Move uncprop after pure/const and modref.
OK.

jeff

Reply via email to