[PATCH] D86253: [AMDGPU] Disable stall weight calculation in regbank-reassign
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 20 00:04:15 PDT 2020
rampitec added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/GCNRegBankReassign.cpp:119
if (C.Weight) push_back(C);
else push_front(C);
}
----------------
critson wrote:
> Is push_front more expensive if we are calling it for every candidate?
> Probably just always push_back?
It's a list, cost of insertion is O(1).
================
Comment at: llvm/lib/Target/AMDGPU/GCNRegBankReassign.cpp:605
unsigned Weight = getOperandGatherWeight(MI, Reg1, Reg2, StallCycles);
Weight += MLI->getLoopDepth(MI.getParent()) * 10;
----------------
critson wrote:
> Presumably we don't need to do this if we are not using weights at all (i.e. no sorting)?
> Perhaps "if (UseWeight)" all of this?
Good point. It is cheap, but still.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86253/new/
https://reviews.llvm.org/D86253
More information about the llvm-commits
mailing list