This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: in search of clue regarding -fcheck-memory-usage
On Sun, Jan 21, 2001 at 12:38:32PM -0800, Mark Mitchell wrote:
> >>>>> "Zack" == Zack Weinberg <zackw@stanford.edu> writes:
>
> Zack> My major concern is that up till now 'reg' had been
> Zack> destructively replaced by a MEM rtx before we got here. My
> Zack> changes are going to postpone that until after we're done
> Zack> generating RTL. So XEXP (reg, 0) is now an invalid
> Zack> operation. What should I be replacing it with?
>
> An ADDRESSOF? Isn't what the thing wants in the end -- the address of
> some memory? So, you can use ADDRESSOF (REG), and then rely on the
> ADDRESSOF pass to insert this stuff later.
This is happening in put_var_into_stack, which is just when we do
generate ADDRESSOFs (sometimes). However, even if we do do that, the
new RTL wasn't visible once I stopped clobbering the original REG.
I worked out a way to deal with it, hopefully.
> This is part of why I objected to the design of the -fcheck-memory
> stuff; it is too interleaved with ordinary compiler processing. It
> should be a separate pass -- either on trees or RTL.
It doesn't help that the library functions it's calling are not part
of the GCC runtime...
zw