Skip to content

Commit c7ba5a8

Browse files
anikaushikigcbot
authored andcommitted
Minor refactor to check scratch usage
Minor refactor to check scratch usage
1 parent 26db67b commit c7ba5a8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

visa/FlowGraph.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,8 @@ void FlowGraph::constructFlowGraph(INST_LIST &instlist) {
634634
setCurrentDebugPass("CFG");
635635
VISA_DEBUG(std::cout << "Entering CFG construction\n");
636636

637-
if (builder->hasScratchSurface() && (isStackCallFunc || hasStackCalls)) {
637+
bool scratchUse = false;
638+
if (builder->hasScratchSurface() && (isStackCallFunc || hasStackCalls || scratchUse)) {
638639
// unfortunately we can't put this in stack call prolog since this has to be
639640
// done before RA ToDo: just hard-wire the scratch-surface offset register?
640641
builder->initScratchSurfaceOffset();

0 commit comments

Comments
 (0)