This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix inliner WRT indirect calls


On Sun, May 10, 2009 at 8:17 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
> Hi,
> 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.

This caused:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40095

-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]