File tree Expand file tree Collapse file tree 2 files changed +459
-2
lines changed
Optimizer/OpenCLPasses/ProgramScopeConstants
tests/ProgramScopeConstantAnalysis Expand file tree Collapse file tree 2 files changed +459
-2
lines changed Original file line number Diff line number Diff line change @@ -264,12 +264,17 @@ bool ProgramScopeConstantAnalysis::runOnModule(Module& M)
264264 // Stackcalls:
265265 // Stackcall ABI does not allow implicit args, so rely on relocation for global variable access
266266
267+ // Disable ConstBase and GlobalBase implicit arguments on PVC+.
268+ // StatelessToStateful pass is not enabled for most of the cases so there
269+ // is no benefit to add the implicit arguments. Const/Global variables
270+ // access can just go through relocations.
267271 // Workaround: When there is stringConstants in the module, do not insert
268272 // implicit arguments to prevent const vars getting promoted
269273 // at statelessToStateful pass. In zebin path, stateful promotion
270274 // of const vars can't work well with printf strings.
271- bool skipConstAndGlobalBaseArgs =
272- Ctx->enableZEBinary () && !m_pModuleMd->stringConstants .empty ();
275+ bool skipConstAndGlobalBaseArgs = Ctx->enableZEBinary () &&
276+ (Ctx->platform .GetProductFamily () >= IGFX_PVC ||
277+ !m_pModuleMd->stringConstants .empty ());
273278
274279 if (!skipConstAndGlobalBaseArgs && hasInlineConstantBuffer)
275280 {
You can’t perform that action at this time.
0 commit comments