[llvm] r179957 - SimplifyCFG: If convert single conditional stores

Shuxin Yang shuxin.llvm at gmail.com
Sat Apr 20 18:30:05 PDT 2013


On 4/20/13 6:04 PM, Arnold Schwaighofer wrote:
> On Apr 20, 2013, at 7:54 PM, Shuxin Yang <shuxin.llvm at gmail.com> wrote:
>
>> It tail dup the load, which dosen't necessarily simplify the CFG.
>> I'm from CFG simplification perspective.
>>
> It does not perform select/if conversation of the store - hence my patch.
I guess the "it" here refers to the GVN. The GVN actually perform some 
PRE here. I don't like PRE
is taking place in the early stage (actually in my local hack to GVN, 
I'm actually trying to disable all
PRE  in the early invocation of GVN). It only complicate the CFG because 
it insert some code in
empty block (by edge-splitting) during code motion phase

Actually, PRE dose not always win here, what if the branch is balanced 
and the ISA dosen't have
instruction for conditional store? We will suffer from branch 
misprediction here.

What I'm talking about here is about the better motivation to get rid of 
the guarding condition of
the store --- blindly strip if off vs with some motivations.

I'm sorry I were not clear in my previous mails. Seems like I should not 
write email during week-end:-)


 >But the loads are already eliminated so I can't use them to motivate 
my patch - that is all I am saying.
I believe you change takes place early than GVN?



More information about the llvm-commits mailing list