This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, rtl-optimization]: Fix PR rtl-optimization/33638
> Note that a const call only reads the frame if there is a MEM in
> CALL_INSN_FUNCTION_USAGE. On many platforms a const call will not
> normally read the frame.
Sure, that's what is explained at the beginning of the big comment. Note that
the DSE from flow.c did the same (invalidate all stack pointer based stores).
> I have the feeling that your previous patch has more or less wiped out
> DSE for const calls. Does DSE still actually eliminate any stores in
> the presence of a const call?
Definitely, the patch doesn't change anything for stores with constant base:
__attribute__ ((const)) int f (int i) { return i; }
int a;
void g (void)
{
a = 1;
a = f(0);
}
Compile at -O -fno-tree-dse.
--
Eric Botcazou