This is the mail archive of the
mailing list for the GCC project.
Re: Fix inliner WRT indirect calls
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 10 May 2009 12:11:44 -0700
- Subject: Re: Fix inliner WRT indirect calls
- References: <20090510151710.GF22531@kam.mff.cuni.cz>
On Sun, May 10, 2009 at 8:17 AM, Jan Hubicka <email@example.com> wrote:
> this patch fixes two problems in inliner. ?First estimate_move_cost is called on
> VOID types in code estimating cost of call funptr(); and it returns non-trivial
> cost since size of VOID is -1 and it thinks that memcpy loop will be needed.
> Second since we are now able to keep cgraph intact in inlining, I added verification
> and also removal of unreachable blocks so we don't have stale edges after execution.
> These two changes are needed to make early inliner handle indirect calls correctly.
> Bootstrappe/regtested x86_64-linux, will commit it shortly.
> ? ? ? ?* tree-inline.c (delete_unreachable_blocks_update_callgraph): Declare.
> ? ? ? ?(estimate_move_cost): Assert that it does not get called for VOID_TYPE_P.
> ? ? ? ?(estimate_num_insns): Skip VOID types in argument handling.
> ? ? ? ?(optimize_inline_calls): Delete unreachable blocks and verify that
> ? ? ? ?callgraph is valid.