On 28 August 2018 at 16:56, Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> wrote: > H > The attached patch extends malloc_candidate_p to handle multiple phis. > There's a lot of noise in the patch because I moved most of > malloc_candidate_p into > new function malloc_candidate_p_1. The only real change is following hunk: > > + gimple *arg_def = SSA_NAME_DEF_STMT (arg); > + if (is_a<gphi *> (arg_def)) > + { > + if (!malloc_candidate_p_1 (fun, arg, phi, ipa)) > + DUMP_AND_RETURN ("nested phi fail") > + continue; > + } > + > > Which checks recursively that the phi argument is used only within > comparisons against 0 > and the phi. > > Bootstrapped+tested on x86_64-unknown-linux-gnu. > OK to commit ? ping https://gcc.gnu.org/ml/gcc-patches/2018-08/msg01757.html
Thanks, Prathamesh > > Thanks, > Prathamesh