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

Cameron Zwarich zwarich at apple.com
Tue Feb 22 13:43:40 PST 2011


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?

Cameron



More information about the llvm-commits mailing list