[PATCH] D86925: [MachineSink] add one more profitable pattern for sinking

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 15 11:15:13 PDT 2020


qcolombet added a comment.

> The real world case I met is not a loop invariant instruction, it has an operand which is a user of PHI in loop header.

I see, yes, then having this in MachineSink makes sense. At least as a start :).

`struct RegisterPressure` is a good start, though I don't remember how it ties with the register pressure sets (`TargetRegisterInfo::getRegClassPressureSets`), which is ultimately what we want to use.

Given adding that is going to take some time, you could push your patch for the cases we know are always profitable: when the uses are alive across the whole loop (line 636 in the current implementation.)

Cheers,
-Quentin


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86925



More information about the llvm-commits mailing list