On Fri, Aug 7, 2015 at 12:38 PM, H.J. Lu <hjl.to...@gmail.com> wrote: > On Thu, Aug 6, 2015 at 11:19 AM, Richard Sandiford > <rdsandif...@googlemail.com> wrote: >> "H.J. Lu" <hongjiu...@intel.com> writes: >>> Since ira_implicitly_set_insn_hard_regs may be called outside of >>> ira-lives.c, it can't use the local variable, preferred_alternatives. >>> This patch adds an alternative_mask argument to >>> ira_implicitly_set_insn_hard_regs. >>> >>> OK for master and 5 branch if there are no regressions on Linux/x86-64? >> >> Thanks for working on this. The patch looks good to me FWIW. >> >> I think this version is safer than the second one you posted. With that >> version we could end up with the same sort of bug, e.g. because a function >> passes false to extract_insn without realising that one of the functions >> that it calls later needs the preferred alternatives to be set. >> Or maybe (as with my patch) a function starts to use preferred_alternatives >> and one of its callers gets missed. >> >> Sorry for the breakage. >> >> Thanks, >> Richard >> >>> H.J. >>> --- >>> gcc/ >>> >>> PR rtl-optimization/67029 >>> * ira-color.c: Include "recog.h" before including "ira-int.h". >>> * target-globals.c: Likewise. >>> * ira-lives.c (ira_implicitly_set_insn_hard_regs): Add an >>> adds an alternative_mask argument and use it instead of >>> preferred_alternatives. >>> * ira.h (ira_implicitly_set_insn_hard_regs): Moved to ... >>> * ira-int.h (ira_implicitly_set_insn_hard_regs): Here. >>> * sched-deps.c: Include "ira-int.h" after including "ira.h". >>> (sched_analyze_insn): Update call to >>> ira_implicitly_set_insn_hard_regs. >>> * sel-sched.c: Include "ira-int.h" after including "ira.h". >>> (implicit_clobber_conflict_p): Update call to >>> ira_implicitly_set_insn_hard_regs. >>> >>> gcc/testsuite/ >>> >>> PR rtl-optimization/67029 >>> * gcc.dg/pr67029.c: New test. > > Here is the backport for gcc-5-branch. OK for gcc-5-branch? > > > H.J.
PING. -- H.J.