[PATCH] D86836: Support a list of CostPerUse values
Christudasan Devadasan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 16 00:40:20 PDT 2020
cdevadas added inline comments.
================
Comment at: llvm/lib/CodeGen/RegAllocGreedy.cpp:1129
const TargetRegisterClass *RC = MRI->getRegClass(VirtReg.reg());
- unsigned MinCost = RegClassInfo.getMinCost(RC);
+ uint8_t MinCost = RegClassInfo.getMinCost(RC);
if (MinCost >= CostPerUseLimit) {
----------------
qcolombet wrote:
> Ditto about leaking the implementation details of something we shouldn't care (here MinCost).
MinCost is actually declared as uint8_t in `RegisterClassInfo.h` and I think it is good to keep it uint8_t everywhere.
The comparison with CostPerUseLimit in the next line makes it all consistent since I reduced the reg-cost type to uint8_t with this patch.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86836/new/
https://reviews.llvm.org/D86836
More information about the llvm-commits
mailing list