On Tue, Apr 25, 2023 at 11:34 AM Eric Botcazou via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: > > Hi, > > insert_debug_temp_for_var_def has some strange code whereby it creates debug > temporaries for SINGLE_RHS (RHS for gimple_assign_single_p) but not for other > RHS in the same situation.
It indeed looks odd (likewise the GIMPLE_PHI handling should be covered by is_gimple_reg ()). > Removing it saves 25% of compilation time at -g -O > for a pathological testcase I have. > > Bootstrapped/regtested on x86-64/Linux, OK for the mainline? OK. probably also helps PR109612 and the other similar PR referenced therein. Thanks, Richard. > > 2023-04-25 Eric Botcazou <ebotca...@adacore.com> > > * tree-ssa.cc (insert_debug_temp_for_var_def): Do not create > superfluous debug temporaries for single GIMPLE assignments. > > -- > Eric Botcazou