[llvm-commits] [llvm] r154987 - /llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp

Bill Wendling isanbard at gmail.com
Wed Apr 18 16:55:13 PDT 2012


On Apr 18, 2012, at 4:31 PM, Andrew Trick wrote:

> On Apr 17, 2012, at 11:00 PM, Bill Wendling <isanbard at gmail.com> wrote:
> 
>> Author: void
>> Date: Wed Apr 18 01:00:09 2012
>> New Revision: 154987
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=154987&view=rev
>> Log:
>> Use a heavy hammer to fix PR12573.
>> 
>> If the loop contains invoke instructions, whose unwind edge escapes the loop,
>> then don't try to unswitch the loop. Doing so may cause the unwind edge to be
>> split, which not only is non-trivial but doesn't preserve loop simplify
>> information.
>> 
>> Fixes PR12573
> 
> Bill,
> 
> I think disabling loop-unswitch for odd control flow is ok. The weird thing about this one is the landing pad edge broke outside the loop currently being unswitched. Being terrified of shared landing pads, I started looking at the critical edge breaking code to see if this could possibly crop up again. Can you take a look at this patch and see if it looks safe to you?
> 

I'm not sure if it's safe because the SplitLandingPadPredecessor function doesn't preserve the LoopSimplify analysis information. But the LoopUnswitch pass claims to preserve it.

-bw





More information about the llvm-commits mailing list