[PATCH] D35049: LSR tunings for SystemZ, with some minor common code changes

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 20 11:43:32 PDT 2017


qcolombet accepted this revision.
qcolombet added a comment.
This revision is now accepted and ready to land.

Hi Jonas,

Thanks for digging into the regressions.

The patch makes sense now.

> #0: It seems that LSR is not aware if a live-out PHI is reused or not. The formula that reuses a live-out phi does not need the extra phi, which should mean a cost difference of one add in the loop. So if LSR comes up with a formula that offsets the original PHI with some offset which makes the total Offset bits of the fixups less, it will insert a new phi.
> 
> Since this is clearly bad (205/5), my guess is that LSR most of the time manages to first use an existing PHI. Without the fixups ImmCost, the formulas have the same cost, and the formula with the original PHI remains.

That sounds sensible, we should improve that in a different patch.

Cheers,
-Quentin


https://reviews.llvm.org/D35049





More information about the llvm-commits mailing list