1 Apr 2003 01:13
Re: [patch] Store motion rewrite
Zdenek Dvorak <rakdver <at> atrey.karlin.mff.cuni.cz>
2003-03-31 23:13:22 GMT
2003-03-31 23:13:22 GMT
Hello, > > ! /* Do not consider MEMs that mention stack pointer; in the following > > ! we rely on that constant functions do not read memory, which of course > > ! does not include their arguments if passed on stack. */ > > ! if (reg_mentioned_p (stack_pointer_rtx, dest)) > > return; > > Really this needs to be any value whose *base* is the stack > pointer. Consider passing a large structure on the stack, > large enough that we overflow the architecture's immediate > offset from the sp, so we've generated > > (set (reg temp) (plus (reg sp) (const_int high_part)) > (set (mem (plus (reg temp) (const_int low_part))) (foo)) > > For a target like SH that has very limited immediate offsets, > this might be a real problem. You should be able to test this > using a function of about 20 arguments, I think. here is the new version. I was unable to find a simple way how to check for this -- building du chains or something like that just for this purpose is overkill. So I have just altered it the way we expect even constant functions to read any mem whose base contains any register. Zdenek Index: gcse.c ===================================================================(Continue reading)
RSS Feed