Skip to content

Commit c13a4e5

Browse files
aratajewigcbot
authored andcommitted
Add mechanism to lower generic pointers returned by functions
This change introduces a mechanism to lower functions returning generic pointer to functions returning non-generic pointer. The mechanism iterates thorugh functions in down-top order (starting from most nested functions). Once a return type for particular function gets changed to non-generic, then regular GAS resolver is triggered on all functions calling updated function to propagate the non-generic pointer.
1 parent 807588b commit c13a4e5

8 files changed

+780
-63
lines changed

IGC/AdaptorOCL/UnifyIROCL.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,8 @@ static void CommonOCLBasedPasses(
444444
mpm.add(createLowerGPCallArg());
445445
}
446446

447+
mpm.add(createGASRetValuePropagatorPass());
448+
447449
// Run another round of constant breaking as GAS resolving may generate constants (constant address)
448450
mpm.add(new BreakConstantExpr());
449451
}

0 commit comments

Comments
 (0)