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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |uros at gcc dot gnu.org

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Note, try_split actually makes some attempts to maintain df,
it calls emit_insn_after_setloc and delete_insn and the former in the end calls
df_set_bb_dirty and df_insn_rescan and the latter df_insn_delete.

So, one question is if ix86_ok_to_clobber_flags can safely use
          FOR_EACH_INSN_USE (use, insn)
            if (DF_REF_REG_USE_P (use) && DF_REF_REGNO (use) == FLAGS_REG)
              return false;

          if (insn_defines_reg (FLAGS_REG, INVALID_REGNUM, insn))
            return true;
and another question is if it can safely use
  live = df_get_live_out(bb);
  return !REGNO_REG_SET_P (live, FLAGS_REG);

And, yes, perhaps a way out of this is a target hook that would initialize df
for insn splitting passes and return TODO_* to be returned.
All the split conditions that can call ix86_ok_to_clobber_flags are guarded
with reload_completed, so we could df_analyze just for split{2,3,4} (split5
isn't even invoked on x86).

Reply via email to