[llvm] r179957 - SimplifyCFG: If convert single conditional stores
Arnold Schwaighofer
aschwaighofer at apple.com
Sat Apr 20 18:36:35 PDT 2013
On Apr 20, 2013, at 8:30 PM, Shuxin Yang <shuxin.llvm at gmail.com> wrote:
> 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
By "it" I meant the LLVM opt pass pipeline. GVN gets rid of a redundant load. (It sees a store on one side of the if and a store one the other so no need to load again just use a phi of the two store values - no need to split an edge either)
>
> 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.
>
My motivation are branch mispredictions. This is why we are so bad on hmmer. We (clang) already gets rid of those loads.
> 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?
Yes, but the motivation are not the load because we already get rid of them.
More information about the llvm-commits
mailing list