This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR target/25758, x86-darwin cannot bootstrap itself
- From: Mike Stump <mrs at apple dot com>
- To: Andrew Pinski <pinskia at physics dot uc dot edu>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 18 Jan 2006 18:00:14 -0800
- Subject: Re: [PATCH] Fix PR target/25758, x86-darwin cannot bootstrap itself
- References: <d0ea7dde5c831884e11e4f7b34bf9980@physics.uc.edu>
On Jan 16, 2006, at 12:17 PM, Andrew Pinski wrote:
The problem here is we are not marking a function as needed so we
don't emit
the function at all. The reason why we don't mark it as needed is
because
the target back-end emits the constant address through its own
function
and not through the normal way so we need to mark the SYMBOL_REF's
decl
as being referenced.
OK?
This mirrors what is done on rs6000 as well, previously you did:
r82141 | zack | 2004-05-22 11:18:46 -0700 (Sat, 22 May 2004) | 6 lines
2004-05-22 Andrew Pinski <pinskia@physics.uc.edu>
PR 15546
* config/i386/i386.c (output_pic_addr_const <case SYMBOL_REF>):
Call mark_decl_referenced on the SYMBOL_REF_DECL.
So, certainly the issue comes up from time to time, :-(
but the mitigating factor appears to be:
r97287 | hubicka | 2005-03-30 14:28:02 -0800 (Wed, 30 Mar 2005) | 41
lines
2005-03-31 Jan Hubicka <jh@suse.cz>
2004-11-02 Jan Hubicka <jh@suse.cz>
* cgraph.c (cgraph_varpool_node_name): New function.
(dump_cgraph_varpool_node): New function.
(dump_varpool): New function.
* cgraphunit.c (cgraph_optimize): Dump varpool.
2004-10-16 Jan Hubicka <jh@suse.cz>
* cgraph.c (decide_is_variable_needed): New function.
(cgraph_varpool_finalize_decl): Use it.
* cgraphunit.c (cgraph_optimize): Assemble_pending_decls
when not doing
unit-at-a-time.
* final.c (output_addr_const): Do not call mark_referenced.
* passes.c (rest_of_decl_compilation): ifdef out
DECL_RTL_SET_P hack;
always go via cgraph.
* toplev.c (wrapup_global_declarations): Kill non-unit-at-a-
time code.
(check_global_declarations): Ifdef out code clearing DECL_RTL.
* tree-optimize.c (execute_inline): Mark functions called.
* i386.c (output_pic_addr_const): Do not call
mark_decl_referenced.
2004-10-11 Jan Hubicka <jh@suse.cz>
* cgraph.c (cgraph_varpool_first_unanalyzed_node): New
global voriable
(cgraph_varpool_last_needed_node): New static variable.
(enqueue_needed_varpool_node): Break out from ...; add items
to the
end of queue; update first pointers.
(cgraph_varpool_mark_needed_node): ... here.
(cgraph_varpool_finalize_decl): Use
enqueue_needed_varpool_node.
(cgraph_varpool_assemble_pending_decls): Move to cgraphunit.c
* cgraph.h (cgraph_varpool_node): Add analyzed field.
(cgraph_varpool_first_unanalyzed_node): Declare.
* cgraphunit.c: Include output.h.
(cgraph_varpool_analyze_pending_decls): New function.
(cgraph_varpool_assemble_pending_decls): Move from cgraph.c;
bail out
for errors, analyze pending decls.
(cgraph_finalize_compilation_unit): Only analyze decls.
(cgraph_optimize): Assemble the decls after expanding.
Oops. Hopefully that can provide a hint of how `fix' this issue, or
Jan can chime in and explain how to address this issue. I'll leave
this issue to rth and/or Jan to comment on.