[PATCH] D65354: [X86] Let MachineCombiner reassociate adds for ILP

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 1 16:19:26 PDT 2019


reames added a comment.

Skimming through the RegisterPressure class and the approach MachineLICM uses, the mechanics of adding regrester pressure tracking to MachineCombiner don't seem too bad.  I'm fairly confident we can do so without too much work, though I haven't fully worked it through much less written the code, so that might be a gotcha.  Thanks everyone for the pointers.

The question left is what would we use the register pressure *for*?  As in, what heuristics would make sense to impose the machine combiner?

Should we only do transforms which don't increase register pressure?  Only increase it by an amount under the register class limit?  The later is tempting, but then we might inhibit other transforms which also want to increase register pressure. What's the right tradeoff?  I think register pressure preserving is probably too restrictive, but I'm not sure where the sweat spot is.

Additionally, if we have many combine opportunities within a BB, and running all of them would exceed our reg pressure limit, how do we prioritize which ones to perform?  Is a simple greedy algorithm from the front of the block "good enough"?

This is outside my practical experience, so I'd welcome input anyone might have.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65354/new/

https://reviews.llvm.org/D65354





More information about the llvm-commits mailing list