This is the mail archive of the gcc-patches@gcc.gnu.org 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]

Re: invalid delayed slot filling


Ian Lance Taylor wrote:
Christian BRUEL <christian.bruel@st.com> writes:


But, alternatively, checking `end_of_function_needs` in
`mark_target_live_regs` would seem to respect the fact that the
register is live because it is used after the function call (at the
end of the current function) ?


I'm not sure just what you are proposing.  mark_target_live_regs does
use end_of_function_needs in the places where I would expect: at the
end of a function and at a return statement.  Otherwise it uses the
registers live at the start of a basic block, and then walks through
the block computing them.  That all looks right to me.

Perhaps I should ask: why is the register considered to be dead?

Ian


that's the point, 'mark_target_live_regs' doesn't scan the insns until the return statement, but until 'stop_insn' that is the first insns after the delayed branch (the first insn in the fall thru block), so 'end_of_function_needs' wasn't looked at.


but ... I'm realizing that fpscr_reg is not in the global_regs set, which is correctly looked at at the call stmt.

So updating CONDITIONAL_REGISTER_USAGE in sh.md to have FPSCR_REG a global_regs cleanly seem to fix this problem.

I should have thought about it before, sorry about all this noise, and thank you for your help,

Christian


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