[PATCH] D29835: Correct register pressure calculation in presence of subregs
Matthias Braun via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 24 11:35:07 PST 2017
MatzeB added a comment.
The current implementation will miscalculate the PressureDiff objects. Could you revert this until we can further investigate and fix this.
================
Comment at: llvm/trunk/include/llvm/Target/TargetRegisterInfo.h:723-724
+ /// Get the weight in units of pressure for a sub register of this register
+ /// unit given a lane mask.
+ virtual unsigned getRegUnitWeight(const MachineRegisterInfo &MRI,
----------------
This description makes no sense like that: Register units have no subregisters.
================
Comment at: llvm/trunk/lib/CodeGen/MachineScheduler.cpp:1088
PressureDiff &PDiff = getPressureDiff(&SU);
- PDiff.addPressureChange(Reg, Decrement, &MRI);
+ PDiff.addPressureChange(P, Decrement, &MRI);
DEBUG(
----------------
The LiveUses array here only contains register that have become live or completely dead, you do not get updates of some lanes getting added/remove at the moment. So the calculations for the pressure diffs will be out of sync when you do them at lane granularity like this.
Repository:
rL LLVM
https://reviews.llvm.org/D29835
More information about the llvm-commits
mailing list