This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
in search of clue regarding -fcheck-memory-usage
- To: gcc at gcc dot gnu dot org
- Subject: in search of clue regarding -fcheck-memory-usage
- From: "Zack Weinberg" <zackw at stanford dot edu>
- Date: Sat, 20 Jan 2001 22:08:28 -0800
So I'm trying to fix the fixup_var_refs bottleneck, which looks like
it will take some pretty drastic changes to function.c and related,
and I can't figure out what to do with the -fcheck-memory-usage hooks.
Here's a sample:
if (current_function_check_memory_usage)
emit_library_call (chkr_set_right_libfunc, LCT_CONST_MAKE_BLOCK, VOIDmode,
3, XEXP (reg, 0), Pmode,
GEN_INT (GET_MODE_SIZE (GET_MODE (reg))),
TYPE_MODE (sizetype),
GEN_INT (MEMORY_USE_RW),
TYPE_MODE (integer_type_node));
So this generates a call to a runtime library routine. It's being
handed a bunch of data regarding a variable that we just decided had
to live in a stack slot. Beyond that I don't know what it does.
My major concern is that up till now 'reg' had been destructively
replaced by a MEM rtx before we got here. My changes are going to
postpone that until after we're done generating RTL. So XEXP (reg, 0)
is now an invalid operation. What should I be replacing it with?
zw