https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59811
--- Comment #15 from Richard Biener <rguenth at gcc dot gnu.org> ---
Note that the wide-int merge brought some extra slowness into
get_ref_base_and_extent which is no longer call free. For example
case BIT_FIELD_REF:
bit_offset += wi::to_offset (TREE_OPERAND (exp, 2));
break;
is optimized to
<L24>:
_68 = exp_403->exp.operands[2];
MEM[(struct &)&D.86120] ={v} {CLOBBER};
_445 = MEM[(unsigned int *)&bit_offset + 24B];
_448 = MEM[(const union tree_node *)_68].base.u.int_length.offset;
_449 = (unsigned int) _448;
_451 = _445 + _449;
if (_451 == 2)
goto <bb 31>;
else
goto <bb 32>;
<bb 31>:
_455 = MEM[(const long int *)&bit_offset];
_456 = (long unsigned int) _455;
_457 = MEM[(const long int *)_68 + 16B];
_458 = (long unsigned int) _457;
resultl_459 = _456 + _458;
resultl.194_460 = (long int) resultl_459;
MEM[(long int *)&D.86120] = resultl.194_460;
_1156 = resultl.194_460 >= 0;
_896 = (long int) _1156;
_895 = -_896;
MEM[(long int *)&D.86120 + 8B] = _895;
_462 = _456 ^ resultl_459;
_463 = _458 ^ resultl_459;
_464 = _462 & _463;
_465 = _464 >> 63;
_466 = (unsigned int) _465;
_467 = _466 + 1;
MEM[(struct fixed_wide_int_storage *)&D.86120].len = _467;
goto <bb 33>;
<bb 32>:
_450 = &MEM[(const union tree_node *)_68].int_cst.val[0];
_468 = wi::add_large (&MEM[(struct fixed_wide_int_storage *)&D.86120].val,
&MEM[(const struct fixed_wide_int_storage *)&bit_offset].val, _445, _450, _449,
128, 1, 0B);
MEM[(struct fixed_wide_int_storage *)&D.86120].len = _468;
<bb 33>:
MEM[(struct generic_wide_int *)&bit_offset] = MEM[(struct generic_wide_int
*)&D.86120];
D.86120 ={v} {CLOBBER};
pretmp_580 = exp_403->exp.operands[0];
goto <bb 119>;
while it was a simple
<L21>:
_64 = exp_1->exp.operands[2];
SR.212_245 = MEM[(struct double_int *)_64 + 16B];
SR.213_244 = MEM[(struct double_int *)_64 + 24B];
MEM[(struct double_int *)&D.52195] = SR.212_245;
MEM[(struct double_int *)&D.52195 + 8B] = SR.213_244;
double_int::operator+= (&bit_offset, D.52195);
pretmp_295 = exp_1->exp.operands[0];
goto <bb 70>;
in GCC 4.9 (ok, looks like double_int::operator+= wasn't inlined there
either).
That said, more detailed profiling is needed here but get_ref_base_and_extent
is one of the bottle-necks here.