Skip to content

Commit f0d867c

Browse files
authored
[SYCL] Disable reassociate pass to reduce register pressure (#3615)
We rely on target specific compiler back-end to run this transformation if it's profitable for particular target.
1 parent 7d94edf commit f0d867c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

llvm/lib/Transforms/IPO/PassManagerBuilder.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,10 @@ void PassManagerBuilder::addFunctionSimplificationPasses(
435435
if (OptLevel > 1)
436436
MPM.add(createTailCallEliminationPass()); // Eliminate tail calls
437437
MPM.add(createCFGSimplificationPass()); // Merge & remove BBs
438-
MPM.add(createReassociatePass()); // Reassociate expressions
438+
// FIXME: re-association increases variables liveness and therefore register
439+
// pressure.
440+
if (!SYCLOptimizationMode)
441+
MPM.add(createReassociatePass()); // Reassociate expressions
439442

440443
// Do not run loop pass pipeline in "SYCL Optimization Mode". Loop
441444
// optimizations rely on TTI, which is not accurate for SPIR target.

0 commit comments

Comments
 (0)