[llvm-commits] Patch to delete loops with multiple exiting blocks

Andrew Clinton andrew at sidefx.com
Tue Feb 22 14:06:42 PST 2011


On 02/22/2011 04:43 PM, Cameron Zwarich wrote:
> On Feb 20, 2011, at 9:28 AM, Andrew Clinton wrote:
>
>> This is a simple patch to improve the loop-delete pass so that it will
>> delete loops with multiple exiting blocks (but still a single exit).
> The patch looks good to me. There probably shouldn't be braces here according to our (often inconsistent) coding style:
>
> +    P->replaceUsesOfWith(exitingBlocks[0], preheader);
> +    for (unsigned i = 1; i<  exitingBlocks.size(); ++i) {
> +      P->removeIncomingValue(exitingBlocks[i]);
> +    }
>
> Do you want me to commit this for you?
>


Yes, that would be great if you could commit this for me - thanks for 
having a look!

Andrew



More information about the llvm-commits mailing list