[PATCH] [SimplifyCFG] Revise common code sinking

Manman Ren mren at apple.com
Fri Dec 19 11:06:58 PST 2014


Hi Michael,

Looks to me that some changes do not affect functionality:
  The initial value of Op1Idx, checking of DifferentOp1 vs “Op1Idx != ~0U”

If they do not affect functionality, could you separate the changes if you think they are necessary?

LGTM otherwise,

Thanks,
Manman

> On Dec 18, 2014, at 5:13 PM, Liao, Michael <michael.liao at intel.com> wrote:
> 
> The existing common code sinking in SimplifyCFG maintains a mapping from BB1 value to BB2 value pairing the phi node. This prevents case where a single value has two or more derived values in both if and else branches as, once one derived is sunk, that single value is added into that map and prevent further sinking. The added test reveal that issue. With the existing implementation, only one function call could be sunk instead of both. After the fix, both function calls are sunk. The fix changes the BB1->BB2 pairing phi map with a (BB1,BB2) -> phi map, which is more accurate to track the common code.
> 
> Yours
> - Michael
> 
> -----Original Message-----
> From: Manman Ren [mailto:mren at apple.com] 
> Sent: Thursday, December 18, 2014 4:25 PM
> To: reviews+D6688+public+a29c903f391f6bb2 at reviews.llvm.org
> Cc: Liao, Michael; nrotem at apple.com; llvm-commits at cs.uiuc.edu
> Subject: Re: [PATCH] [SimplifyCFG] Revise common code sinking
> 
> Hi Michael,
> 
> Can you explain what is fixed here? For the given testing case in the patch, what do we generate before and after the patch.
> 
> Thanks,
> Manman
> 
>> On Dec 16, 2014, at 12:04 PM, Michael Liao <michael.liao at intel.com> wrote:
>> 
>> Hi Nadav & Manman
>> 
>> Could you help me reviewing the fix of common code sinking in SimplifyCFG?
>> 
>> Yours
>> 
>> - Michael
>> 
>> 
>> REPOSITORY
>> rL LLVM
>> 
>> http://reviews.llvm.org/D6688
>> 
>> EMAIL PREFERENCES
>> http://reviews.llvm.org/settings/panel/emailpreferences/
>> 
>> 
>> 
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 





More information about the llvm-commits mailing list