This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: GC PATCH for SYMBOL_REFs
>>>>> "Richard" == Richard Henderson <rth@cygnus.com> writes:
Richard> For the record, can you tell us where the problem areas
Richard> are? I would have thought there were only a couple
Richard> places that wanted fixing...
Sure. Basically, lots of back-ends create SYMBOL_REFs with string
constants. I've attached the result of a grep for this. Also,
there's a lot of this kind of thing in other places:
assemble_integer (gen_rtx_SYMBOL_REF (Pmode, name), pointer_bytes, 1);
where `name' is a local buffer. This is usually less harmful; the
SYMBOL_REF immediately becomes garbage and so we never try to mark the
string. But, it still violates the assumption that all strings in RTL
be allocated by the collector.
linux1.codesourcery.com% find . -name '*.h' -o -name '*.c' | xargs -n10 egrep 'gen_rtx_SYMBOL_REF|gen_rtx \(SYMBOL_REF'
./alpha/alpha.c: emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__enable_execute_stack"),
./arm/arm.c: global_offset_table = gen_rtx_SYMBOL_REF (Pmode, "_GLOBAL_OFFSET_TABLE_");
./arm/arm.c: ops[1] = gen_rtx_SYMBOL_REF (Pmode, NEED_PLT_RELOC ? "abort(PLT)"
./arm/arm.c: op = gen_rtx_SYMBOL_REF (Pmode, NEED_PLT_RELOC ? "abort(PLT)" : "abort");
./arm/arm.c: aof_pic_label = gen_rtx_SYMBOL_REF (Pmode, "x$adcons");
./arm/arm.h: sym = gen_rtx (SYMBOL_REF, Pmode, temp); \
./arm/linux-gas.h: emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__clear_cache"), \
./arm/thumb.c: global_offset_table = gen_rtx_SYMBOL_REF (Pmode, "_GLOBAL_OFFSET_TABLE_");
./arm/linux-tgas.h: emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__clear_cache"), \
./arm/pe.c: gen_rtx (SYMBOL_REF, Pmode, IDENTIFIER_POINTER (idp));
./arm/pe.c: gen_rtx (SYMBOL_REF, Pmode,
./arm/pe.c: rtx newrtl = gen_rtx (SYMBOL_REF, Pmode, IDENTIFIER_POINTER (idp));
./c4x/c4x.c: libcall = gen_rtx_SYMBOL_REF (Pmode, name);
./c4x/c4x.c: libcall = gen_rtx_SYMBOL_REF (Pmode, name);
./convex/convex.c: emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "memcpy"), 0,
./convex/convex.h: gen_rtx (SYMBOL_REF, Pmode, \
./dsp16xx/dsp16xx.c: dsp16xx_ucmphi2_libcall = gen_rtx_SYMBOL_REF (Pmode, UCMPHI2_LIBCALL);
./i386/i386.c: gotsym = gen_rtx_SYMBOL_REF (Pmode, global_offset_table_name);
./i386/i386.c: pclab = gen_rtx_MEM (QImode, gen_rtx_SYMBOL_REF (Pmode, pic_label_name));
./i386/i386.c: gen_rtx_SYMBOL_REF (Pmode, "_alloca"));
./i386/i386.c: xops[1] = gen_rtx_SYMBOL_REF (VOIDmode, block_table);
./i386/i386.c: gen_rtx_SYMBOL_REF (VOIDmode, "__bb_init_trace_func"));
./i386/i386.c: gen_rtx_SYMBOL_REF (VOIDmode, false_label));
./i386/i386.c: gen_rtx_SYMBOL_REF (VOIDmode, "__bb_init_func"));
./i386/i386.c: xops[1] = gen_rtx_SYMBOL_REF (VOIDmode, block_table);
./i386/i386.c: gen_rtx_SYMBOL_REF (VOIDmode, "__bb_trace_func"));
./i386/i386.c: xops[4] = gen_rtx_SYMBOL_REF (VOIDmode, "__bb");
./i386/i386.c: cnt_rtx = gen_rtx_SYMBOL_REF (VOIDmode, counts);
./i386/i386-interix.h: gen_rtx (SYMBOL_REF, Pmode, gen_stdcall_suffix (DECL)); \
./i386/i386.h: gen_rtx_SYMBOL_REF (VOIDmode, "__bb_trace_ret")), \
./i386/osfrose.h: symref = HALF_PIC_PTR (gen_rtx_SYMBOL_REF (Pmode, \
./i386/osfrose.h: symdef = HALF_PIC_PTR (gen_rtx_SYMBOL_REF (Pmode, "mcount")); \
./i386/win-nt.h: gen_rtx_SYMBOL_REF (Pmode, gen_stdcall_suffix (DECL)); \
./i386/winnt.c: gen_rtx (SYMBOL_REF, Pmode, IDENTIFIER_POINTER (idp));
./i386/winnt.c: gen_rtx (SYMBOL_REF, Pmode,
./i386/winnt.c: gen_rtx (SYMBOL_REF, Pmode, gen_stdcall_suffix (decl));
./i386/winnt.c: rtx newrtl = gen_rtx (SYMBOL_REF, Pmode, IDENTIFIER_POINTER (idp));
./i386/cygwin.h: gen_rtx_SYMBOL_REF (Pmode, "_monstartup")), \
./i386/win32.h: gen_rtx (SYMBOL_REF, Pmode, gen_stdcall_suffix (DECL)); \
./i386/win32.h: gen_rtx (SYMBOL_REF, Pmode, "_monstartup")); \
./i860/i860.c: rtx fn = gen_rtx_SYMBOL_REF (Pmode, "__builtin_saveregs");
./m32r/m32r.c: emit_library_call (gen_rtx (SYMBOL_REF, Pmode, "memcpy"), 0,
./m32r/m32r.c: emit_library_call (gen_rtx (SYMBOL_REF, Pmode, "bcopy"), 0,
./m68k/a-ux.h: emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__clear_cache"), \
./m68k/linux.h: emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__clear_cache"), \
./m68k/mot3300.h: emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__clear_insn_cache"), \
./m68k/next.h: emit_library_call(gen_rtx_SYMBOL_REF (Pmode, "__enable_execute_stack"), \
./m88k/m88k.c: emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "memcpy"), 0,
./m88k/m88k.c: emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "bcopy"), 0,
./m88k/m88k.c: (gen_rtx_SYMBOL_REF (Pmode, IDENTIFIER_POINTER (entry_name)),
./m88k/m88k.c: (gen_rtx_SYMBOL_REF (Pmode, IDENTIFIER_POINTER (entry_name)),
./m88k/sysv3.h: gen_rtx_SYMBOL_REF (Pmode, "__enable_execute_stack")), \
./mips/mips.c: emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "memcpy"), 0,
./mips/mips.c: emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "bcopy"), 0,
./mips/mips.c: gen_rtx (SYMBOL_REF, Pmode,
./mips/mips.c: stub_fn = gen_rtx (SYMBOL_REF, Pmode, IDENTIFIER_POINTER (id));
./mips/mips.h: emit_library_call (gen_rtx_SYMBOL_REF (Pmode, CACHE_FLUSH_FUNC), \
./pa/pa.c: hp_profile_label_rtx = gen_rtx_SYMBOL_REF (Pmode,
./pa/pa.c: assemble_integer (gen_rtx_SYMBOL_REF (VOIDmode,
./pa/pa.c: return output_millicode_call (insn, gen_rtx_SYMBOL_REF (Pmode, "$$mulI"));
./pa/pa.c: gen_rtx_SYMBOL_REF (SImode, buf));
./pa/pa.c: gen_rtx_SYMBOL_REF (SImode, buf));
./pa/pa.c: gen_rtx_SYMBOL_REF (SImode, "$$divU"));
./pa/pa.c: gen_rtx_SYMBOL_REF (SImode, "$$divI"));
./pa/pa.c: gen_rtx_SYMBOL_REF (SImode, "$$remU"));
./pa/pa.c: gen_rtx_SYMBOL_REF (SImode, "$$remI"));
./pyr/pyr.h: gen_rtx_SYMBOL_REF (Pmode, "__enable_execute_stack")), \
./romp/romp.c: p->symref = gen_rtx_SYMBOL_REF (Pmode,
./rs6000/rs6000.c: emit_library_call (gen_rtx_SYMBOL_REF (SImode, "__trampoline_setup"),
./rs6000/rs6000.c: emit_move_insn (tramp_reg, gen_rtx_SYMBOL_REF (pmode, "..LTRAMP1..0"));
./rs6000/rs6000.c: reg1 = force_reg (Pmode, gen_rtx_SYMBOL_REF (VOIDmode,
./rs6000/rs6000.c: call_ref = gen_rtx_SYMBOL_REF (VOIDmode, IDENTIFIER_POINTER (node));
./sh/sh.c: gen_rtx_SYMBOL_REF (Pmode,
./sh/sh.c: gen_rtx_SYMBOL_REF (Pmode,
./sh/sh.c: gen_rtx_SYMBOL_REF
./sh/sh.c: gen_rtx_SYMBOL_REF
./sh/sh.c: emit_move_insn (wrk, gen_rtx_SYMBOL_REF (Pmode,
./sh/sh.c: sp_switch = gen_rtx_SYMBOL_REF (VOIDmode,
./sparc/sparc.c: global_offset_table = gen_rtx_SYMBOL_REF (Pmode, "_GLOBAL_OFFSET_TABLE_");
./sparc/sparc.c: get_pc_symbol = gen_rtx_SYMBOL_REF (Pmode, get_pc_symbol_name);
./sparc/sparc.c: emit_library_call (gen_rtx (SYMBOL_REF, Pmode, "__enable_execute_stack"),
./sparc/sparc.c: emit_library_call (gen_rtx (SYMBOL_REF, Pmode, "__enable_execute_stack"),
./sparc/sparc.h: gen_rtx_MEM (SImode, gen_rtx_SYMBOL_REF (Pmode, "errno"))
linux1.codesourcery.com%
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com