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

Evan Cheng evan.cheng at apple.com
Sun Apr 21 12:05:11 PDT 2013


On Apr 21, 2013, at 1:21 AM, Andrew Trick <atrick at apple.com> wrote:

> 
> This is different than Chandler's case, because we know the MI "early" if-converter doesn't currently handle Arnold's optimization. Also, Arnold has not yet proposed any target level heuristics that attempt to predict cpu behavior, which was the main objection.
> 
> That said, we should have a reason to if-convert before lowering other than optimizing for a machine's cpu pipeline.
> 
> Are we all convinced that if-converting a single store is the proper canonical form?
> 
> I would only be convinced if
> (1a) It is a locally profitable thing to do for most normal targets (independent of surrounding code)
> (1b) AND downstream IR optimizations are highly likely to benefit
> (2) OR we can specifically detect a target-indendent optimization that depends on the transformation
> 
> I understand that the MI if-converter will eventually do the same thing, but that doesn't argue for doing it early. We don't want canonicalization passes to produce lowered IR that differs across targets (or worse, subtargets). The "optimizer likes larger blocks" has never been a compelling argument for me (I could argue either way).
> 
> MI "early" if-conversion is clearly a good place to do this. Is there any reason not to implement it there?
> 
> If there are temporary benefits to be derived then I think we should put the effort into evaluating MI if-conversion performance instead of just focusing on this patch. I think it can be turned on as soon as someone declares it worthwhile.

What's preventing early-if-converter from being enabled for x86? I thought the x86 scheduling model is more or less done?

Evan

> 
> -Andy




More information about the llvm-commits mailing list