Skip to content

Commit 049782d

Browse files
srividyakarumurisys_zuul
authored and
sys_zuul
committed
Not limiting the loop unroll to small loops for high register pressure
shaders if constant folding Change-Id: I1932c885722a3351058acf7109aed7dddf734a4e
1 parent e3d52da commit 049782d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

IGC/Compiler/GenTTI.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ namespace llvm {
137137
// For OCL shaders, do a two-step loop unrolling. The first
138138
// unrolling is simple and full, and the second runs after
139139
// LICM, which allows partial unrolling. Same for other APIs?
140-
if (lowPressure || (ctx->type == ShaderType::OPENCL_SHADER))
140+
if (lowPressure || (ctx->type == ShaderType::OPENCL_SHADER) ||
141+
(!IGC_IS_FLAG_ENABLED(DisableDynamicConstantFolding) && (!ctx->getModuleMetaData()->inlineDynConstants.empty())))
141142
{
142143
UP.Threshold = LoopUnrollThreshold;
143144
UP.PartialThreshold = LoopUnrollThreshold;

0 commit comments

Comments
 (0)