https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103246
--- Comment #20 from Jan Hubicka <hubicka at gcc dot gnu.org> --- linking with --dbg-cnt=ipa_cp_values:10 -flto-partition=one --disable-tree-modref2 --dbg-cnt=ipa_mod_ref:836 -fdump-tree-all-details -fdump-ipa-all-details is first that produces different results. Diff to 835 is: diff -u 835/gamess.ltrans0.ltrans.113t.dse2 836/gamess.ltrans0.ltrans.113t.dse2 --- 835/gamess.ltrans0.ltrans.113t.dse2 2021-11-17 20:11:34.894715053 +0100 +++ 836/gamess.ltrans0.ltrans.113t.dse2 2021-11-17 20:12:40.387968675 +0100 @@ -14780,7 +14780,6 @@ ipa-modref: call to dco.isra/287 does not use ref: kz alias sets: 4->4 ipa-modref: call stmt dc_1560 = dco.isra (l_1973, m_1975, &kx, &ky, &kz, la_1974, mu_1976, _513, _510, _507, _504, _501, _498); ipa-modref: call to dco.isra/287 does not use ref: jndx alias sets: 4->4 -***dbgcnt: upper limit 835 reached for ipa_mod_ref.*** ipa-modref: call stmt dc_1560 = dco.isra (l_1973, m_1975, &kx, &ky, &kz, la_1974, mu_1976, _513, _510, _507, _504, _501, _498); ipa-modref: call to dco.isra/287 does not use ref: kz alias sets: 4->4 Deleted trivially dead stmt: _1548 = (long int) _1547; @@ -14799,6 +14798,13 @@ Deleted trivially dead stmt: _1770 = indx_1668 + 1; +***dbgcnt: upper limit 836 reached for ipa_mod_ref.*** +ipa-modref: call stmt dc_1710 = dco.isra (0, 0, &D.8524, &D.8523, &D.8522, la_1977, mu_1978, _513, _510, _507, _504, _501, _498); +ipa-modref: call to dco.isra/287 does not use ref: D.8522 alias sets: 4->4 + Deleted dead store: D.8522 = _1709; + + Deleted trivially dead stmt: _1709 = kz_1696 + kzp_1699; + At WPA time we first compute summary for original function and then update for new signature: Updating summary for dco.isra/287 from: loads: Limits: 32 bases, 16 refs Base 0:int (alias set 4) Ref 0:int (alias set 4) access: Parm 0 param offset:0 offset:0 size:32 max_size:32 access: Parm 1 param offset:0 offset:0 size:32 max_size:32 access: Parm 5 param offset:0 offset:0 size:32 max_size:32 access: Parm 6 param offset:0 offset:0 size:32 max_size:32 access: Parm 2 param offset:0 offset:0 size:32 max_size:32 access: Parm 3 param offset:0 offset:0 size:32 max_size:32 access: Parm 4 param offset:0 offset:0 size:32 max_size:32 Base 1:int[0:] (alias set 4) Ref 0:int (alias set 4) access: Parm 9 param offset:0 offset:0 size:32 max_size:-1 access: Parm 10 param offset:0 offset:0 size:32 max_size:-1 access: Parm 11 param offset:0 offset:0 size:32 max_size:-1 access: Parm 12 param offset:0 offset:0 size:32 max_size:-1 Base 2:double[0:] (alias set 5) Ref 0:double (alias set 5) access: Parm 8 param offset:0 offset:0 size:64 max_size:-1 Base 3:double[15625] (alias set 5) Ref 0:double (alias set 5) access: Parm 7 param offset:0 offset:0 size:64 max_size:-1 stores: Limits: 32 bases, 16 refs parm 0 flags: not_returned_directly not_returned_indirectly no_indirect_read parm 1 flags: not_returned_directly not_returned_indirectly no_indirect_read parm 2 flags: not_returned_directly not_returned_indirectly no_indirect_read parm 3 flags: not_returned_directly not_returned_indirectly no_indirect_read parm 4 flags: not_returned_directly not_returned_indirectly no_indirect_read parm 5 flags: not_returned_directly not_returned_indirectly no_indirect_read parm 6 flags: not_returned_directly not_returned_indirectly no_indirect_read parm 7 flags: not_returned_directly no_indirect_read parm 8 flags: not_returned_directly no_indirect_read parm 9 flags: not_returned_directly not_returned_indirectly no_indirect_read parm 10 flags: not_returned_directly not_returned_indirectly no_indirect_read parm 11 flags: not_returned_directly not_returned_indirectly no_indirect_read parm 12 flags: not_returned_directly not_returned_indirectly no_indirect_read to: loads: Limits: 32 bases, 16 refs Base 0:int (alias set 4) Ref 0:int (alias set 4) access: access: access: access: access: Parm 2 param offset:0 offset:0 size:32 max_size:32 access: Parm 3 param offset:0 offset:0 size:32 max_size:32 access: Parm 4 param offset:0 offset:0 size:32 max_size:32 Base 1:int[0:] (alias set 4) Ref 0:int (alias set 4) access: Parm 9 param offset:0 offset:0 size:32 max_size:-1 access: Parm 10 param offset:0 offset:0 size:32 max_size:-1 access: Parm 11 param offset:0 offset:0 size:32 max_size:-1 access: Parm 12 param offset:0 offset:0 size:32 max_size:-1 Base 2:double[0:] (alias set 5) Ref 0:double (alias set 5) access: Parm 8 param offset:0 offset:0 size:64 max_size:-1 Base 3:double[15625] (alias set 5) Ref 0:double (alias set 5) access: Parm 7 param offset:0 offset:0 size:64 max_size:-1 stores: Limits: 32 bases, 16 refs parm 2 flags: not_returned_directly not_returned_indirectly no_indirect_read parm 3 flags: not_returned_directly not_returned_indirectly no_indirect_read parm 4 flags: not_returned_directly not_returned_indirectly no_indirect_read parm 7 flags: not_returned_directly no_indirect_read parm 8 flags: not_returned_directly no_indirect_read parm 9 flags: not_returned_directly not_returned_indirectly no_indirect_read parm 10 flags: not_returned_directly not_returned_indirectly no_indirect_read parm 11 flags: not_returned_directly not_returned_indirectly no_indirect_read parm 12 flags: not_returned_directly not_returned_indirectly no_indirect_read This seems to correclty represent that some params was scalarised. Only one oddity is that the list is not optimized and kept in redundant form but it should be harmless. At stream in time we see: Read modref for dco.isra/287 loads: Limits: 32 bases, 16 refs Base 0: alias set 4 Ref 0: alias set 4 access: Parm 9 param offset:0 offset:0 size:32 max_size:-1 access: Parm 10 param offset:0 offset:0 size:32 max_size:-1 access: Parm 11 param offset:0 offset:0 size:32 max_size:-1 access: Parm 12 param offset:0 offset:0 size:32 max_size:-1 Base 1: alias set 3 Ref 0: alias set 3 access: Parm 8 param offset:0 offset:0 size:64 max_size:-1 access: Parm 7 param offset:0 offset:0 size:64 max_size:-1 stores: Limits: 32 bases, 16 refs Try dse parm 2 flags: not_returned_directly not_returned_indirectly no_indirect_read parm 3 flags: not_returned_directly not_returned_indirectly no_indirect_read parm 4 flags: not_returned_directly not_returned_indirectly no_indirect_read parm 7 flags: not_returned_directly no_indirect_read parm 8 flags: not_returned_directly no_indirect_read parm 9 flags: not_returned_directly not_returned_indirectly no_indirect_read parm 10 flags: not_returned_directly not_returned_indirectly no_indirect_read parm 11 flags: not_returned_directly not_returned_indirectly no_indirect_read parm 12 flags: not_returned_directly not_returned_indirectly no_indirect_read So types are translated to alias sets however the stream in is wrong since there was accesses without known params and they are gone. So it is streaming bug (and was present already in the initial modref version)