This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix postreload problems

There are still some reports of bootstrap failures and other problems
after my postreload patch last week.  The patch below should fix these.
 IainS has been very helpful in providing a testcase.  While I didn't
have a testcase I stared the code for a long time; this also produced
some fixes, even in the old code.

The main problem was that the new code could mess up lifetime
information by rescanning a previously encountered insn with
reload_combine_note_use.  This could add uses for registers that are set
between the current point and the old use.

In the old optimization, reload_combine_recognize_pattern, we can
sometimes allocate a new register.  This code wasn't checking whether
it's actually safe to do so; I've copied a range of typical checks from
elsewhere.  Some of them are likely already covered by the life
information we compute, others (like the df_regs_ever_live_p check and
the call to hard_regno_scratch_ok) seem necessary.

Some remnants of my first attempt to fix the DEBUG_INSN problem
remained; I've removed those.

Bootstrapped, tested on x86_64-linux and i686-linux (where I only saw
the failure from PR45005), and committed.


Attachment: rc-fix8.diff
Description: Text document

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]