HomePhabricator

[AMDGPU][CostModel] Refine cost model for control-flow instructions.

Authored by dfukalov on Feb 16 2021, 11:20 AM.

Description

[AMDGPU][CostModel] Refine cost model for control-flow instructions.

Added cost estimation for switch instruction, updated costs of branches, fixed
phi cost.
Had to increase -amdgpu-unroll-threshold-if default value since conditional
branch cost (size) was corrected to higher value.
Test renamed to "control-flow.ll".

Removed redundant code in X86TTIImpl::getCFInstrCost() and
PPCTTIImpl::getCFInstrCost().

Reviewed By: rampitec

Differential Revision: https://reviews.llvm.org/D96805

Details