[PATCH] D26521: [X86] Allow folding of reloads from stack slots when loading a subreg of the spilled reg
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 10 14:48:05 PST 2016
MatzeB added inline comments.
================
Comment at: include/llvm/Target/TargetInstrInfo.h:820-828
+ /// Check whether the target can fold a load that feeds a subreg operand
+ /// (or a subreg operand that feeds a store).
+ /// For stores, LoadMI is always null. For loads, LoadMI is non-null if
+ /// we're trying to fold an existing load instruction, and null if we are
+ /// trying to fold a load
+ virtual bool isSubregFoldable(MachineOperand &MO,
+ MachineInstr *LoadMI) const {
----------------
Shouldn't we better fix the existing foldMemoryOperand() implementations in the targets instead of adding more API? A "fix" in the sense to actually check the SubReg and return nullptr if it is set would be enough.
https://reviews.llvm.org/D26521
More information about the llvm-commits
mailing list