On 10/09/2015 12:23 AM, Bernd Schmidt wrote:
On 10/08/2015 01:29 AM, Abe wrote:
Attached please find my revised patch to the RTL if converter. This
patch enables the
if-conversion of half-hammocks with a store in them that the internal
GCC machinery
otherwise considers too hazardous to if-convert. This is made safe by
using the
"scratchpad" technique, i.e. throwing away the store into a safe
location where nothing
of any importance is currently stored. The scratchpads are allocated in
the stack frame.
So, one conceptual issue first. Obviously this increases the size of the stack
frame, which makes the transformation more expensive. The patch does not appear
to attempt to estimate costs. However, why do we need to allocate anything in
the first place? If you want to store something that will be thrown away, just
pick an address below the stack pointer.
If you're using one of the switches that checks for stack overflow at the start
of the function, you certainly don't want to do any such stores.
r~