[all-commits] [llvm/llvm-project] e585b3: [AMDGPU] PHI node cost should not be counted for t...
alex-t via All-commits
all-commits at lists.llvm.org
Wed Jun 30 06:11:42 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e585b332e42321870b2cf1eeefcd68b0717570e2
https://github.com/llvm/llvm-project/commit/e585b332e42321870b2cf1eeefcd68b0717570e2
Author: alex-t <alexander.timofeev at amd.com>
Date: 2021-06-30 (Wed, 30 Jun 2021)
Changed paths:
M llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
M llvm/test/Analysis/CostModel/AMDGPU/control-flow.ll
Log Message:
-----------
[AMDGPU] PHI node cost should not be counted for the size and latency.
Details: https://reviews.llvm.org/D96805 changed the GCNTTIImpl::getCFInstrCost to return 1 for the PHI nodes
for the TTI::TCK_CodeSize and TTI::TCK_SizeAndLatency. This is incorrect because the value moves that are the
result of the PHI lowering are inserted into the basic block predecessors - not into the block itself.
As a result of this change LoopRotate and LoopUnroll were broken because of the incorrect Loop header and loop
body size/cost estimation.
Reviewed By: rampitec
Differential Revision: https://reviews.llvm.org/D105104
More information about the All-commits
mailing list