Skip to content

Commit

Permalink
[Autobackout][FuncReg]Revert of change: 86f42e2
Browse files Browse the repository at this point in the history
 Check scratch usage kernel attribute to set scratch surface
offset

Check scratch usage kernel attribute to set scratch surface offset
  • Loading branch information
anikaushik authored and igcbot committed Dec 23, 2023
1 parent 139d5ca commit bd4058a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions visa/FlowGraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -633,10 +633,8 @@ void FlowGraph::constructFlowGraph(INST_LIST &instlist) {
//vISA_ASSERT(!instlist.empty(), ERROR_SYNTAX("empty instruction list"));
setCurrentDebugPass("CFG");
VISA_DEBUG(std::cout << "Entering CFG construction\n");
bool scratchUse = (
getKernel()->getKernelAttrs()->getInt32KernelAttr(Attributes::ATTR_SpillMemOffset) > 0);
// Why should we and with (isStackCallFunc || hasStackCalls)?
if (builder->hasScratchSurface() && (isStackCallFunc || hasStackCalls || scratchUse)) {

if (builder->hasScratchSurface() && (isStackCallFunc || hasStackCalls)) {
// unfortunately we can't put this in stack call prolog since this has to be
// done before RA ToDo: just hard-wire the scratch-surface offset register?
builder->initScratchSurfaceOffset();
Expand Down

0 comments on commit bd4058a

Please sign in to comment.