[llvm-commits] [patch] Use the new edge dominance functions in GVN

Eli Friedman eli.friedman at gmail.com
Fri Aug 10 18:03:40 PDT 2012


On Fri, Aug 10, 2012 at 5:25 PM, Rafael EspĂ­ndola
<rafael.espindola at gmail.com> wrote:
>> Did you send the right patch?
>
> Sorry, looks like I created a diff from the wrong branch. One from
> trunk is attached.
>
> A quick note on the patch. It still uses a simple dominance check in
> GVN. With your previous patch I could now turn the two
>
> +  if (!BBE.isSingleEdge())
> +    return false;
>
> into
>
> assert(BBE.isSingleEdge());
>
> and modify GVN to stop earlier if it finds multiple edges. Let me know
> what you think.

I'm still kind of concerned about the loop in isSingleEdge(), but if
you're convinced it's okay, it's probably fine.

I'm not really a GVN expert, but the patch looks fine otherwise.

-Eli




More information about the llvm-commits mailing list