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: PR85787: Extend malloc_candidate_p to handle multiple phis.


On 28 August 2018 at 16:56, Prathamesh Kulkarni
<prathamesh.kulkarni@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


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