Fix PR52448 (cselim with calls)
Michael Matz
matz@suse.de
Wed Feb 6 14:21:00 GMT 2013
Hi,
On Wed, 6 Feb 2013, Jakub Jelinek wrote:
> First of all, I'd use gimple_call_builtin_p (call, BUILT_IN_NORMAL)
> test. And, the function should certainly conservatively return false
> for all builtins that aren't (gimple_call_flags (call) & ECF_LEAF) != 0,
> otherwise they might call hooks in the current CU and similar and free
> in those hooks (likewise setjmp or similar, but again, that is not
> ECF_LEAF).
Sure. Consider the patch changed to introduce this function:
static bool
nonfreeing_call_p (gimple call)
{
if (gimple_call_builtin_p (call, BUILT_IN_NORMAL)
&& gimple_call_flags (call) & ECF_LEAF)
return true;
return false;
}
Tested on the testcases and hmmer, okay after regstrapping?
Ciao,
Michael.
More information about the Gcc-patches
mailing list