On Fri, Apr 8, 2011 at 8:06 AM, Xinliang David Li <davi...@google.com> wrote:
> Hi, due to race conditions, it is common that the value profile
> information for an indirect call site is 'corrupted' -- resulting in
> false target function to be recorded. The value profile transformation
> won't cause runtime problem as the path will never be executed,
> however it may cause compile time ICE because of the incompatible
> signature of the callee target. The attached patch does minimal sanity
> check to make compiler happy in such cases. The fix was tested with
> lots of MT programs and works really well in practice.
>
> Ok for trunk after testing?

Please instead refactor and re-use gimple_check_call_args ().
Also look at tree_can_inline_p () which has code to deal with
result mismatches.

Richard.

> Thanks,
>
> David
>
> 2011-04-07  Xinliang David Li  <davi...@google.com>
>
>        * value-profile.c (function_decl_num_args): New function.
>        (check_ic_target): New function.
>        (gimple_ic_transform): Sanity check indirect call target.
>

Reply via email to