On 01/29/2016 08:42 PM, Bernd Edlinger wrote:
On 29.01.2016 16:47 Bernd Schmidt wrote:
Yes. What is the problem with that? If we have (plus sfp const_int) at
any point before reload, we can check whether that offset is inside
frame_size. If it isn't or if the offset isn't known, it could trap.
Usually we have "if (x==1234) { read MEM[FP+x]; }", so wo don't know,
and then after reload: "if (x==1234) { read MEM[SP+x+sp_fp_offset]; }"
but wait, in the if statement we know, that x==1234, so everything
turns in one magic constant, and we have a totally new constant offset
from the SP register "if (x==1234) { read MEM[SP+1234+sp_fp_offset]; }".
Now if rtx_addr_can_trap_p(MEM[SP+1234+sp_fp_offset]) says it cannot
trap we think we do not need the if at all => BANG.
What are you trying to say here? As far as I can tell this isn't a
problem with my proposed solution (set MEM_NOTRAP_P for valid SFP+x
offsets).
Bernd