Re: [PATCH] Fix some ICF gimple_call handling issues

2014-11-11 Thread Martin Liška
On 11/11/2014 12:11 AM, Jakub Jelinek wrote: On Mon, Nov 10, 2014 at 10:08:54PM +0100, Richard Biener wrote: @@ -662,9 +662,49 @@ func_checker::compare_gimple_call (gimpl t1 = gimple_call_fndecl (s1); t2 = gimple_call_fndecl (s2); Just drop these and compare gimple_call_fn only. +

Re: [PATCH] Fix some ICF gimple_call handling issues

2014-11-10 Thread Richard Biener
On November 10, 2014 9:45:27 PM CET, Jakub Jelinek ja...@redhat.com wrote: Hi! As the following two testcases shows, there are lots of issues in ICF compare_gimple_call, in particular, it doesn't handle indirect calls properly (see the ipa-icf-31.c testcase), doesn't handle internal calls

Re: [PATCH] Fix some ICF gimple_call handling issues

2014-11-10 Thread Jan Hubicka
Hi! As the following two testcases shows, there are lots of issues in ICF compare_gimple_call, in particular, it doesn't handle indirect calls properly (see the ipa-icf-31.c testcase), doesn't handle internal calls properly (see ubsan/ipa-icf-1.c), didn't check gimple_call flags at all.

Re: [PATCH] Fix some ICF gimple_call handling issues

2014-11-10 Thread Jakub Jelinek
On Mon, Nov 10, 2014 at 10:08:54PM +0100, Richard Biener wrote: @@ -662,9 +662,49 @@ func_checker::compare_gimple_call (gimpl t1 = gimple_call_fndecl (s1); t2 = gimple_call_fndecl (s2); Just drop these and compare gimple_call_fn only. + tree chain1 = gimple_call_chain (s1); +

[PATCH] Fix some ICF gimple_call handling issues

2014-11-10 Thread Jakub Jelinek
Hi! As the following two testcases shows, there are lots of issues in ICF compare_gimple_call, in particular, it doesn't handle indirect calls properly (see the ipa-icf-31.c testcase), doesn't handle internal calls properly (see ubsan/ipa-icf-1.c), didn't check gimple_call flags at all. As