Skip to content

Commit dc04fb7

Browse files
pratikasharsys_zuul
authored andcommitted
Remove redundant copy in to r126 from stackcall functions.
Change-Id: I9047b8518fe2e3efcb227b0cb44dce7a3b51d8dc
1 parent a9c10d0 commit dc04fb7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

visa/GraphColor.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6843,7 +6843,12 @@ void GraphColor::stackCallProlog()
68436843
{
68446844
// mov (8) r126.0<1>:ud r0.0<8;8,1>:ud
68456845
// This sets up the header for oword block r/w used for caller/callee-save
6846-
// ToDo: check if this move is actually necessary
6846+
6847+
// Kernel should've already setup r0 in r126.
6848+
// Useful data in r126 is expected to be preserved by all functions.
6849+
if (kernel.fg.getIsStackCallFunc())
6850+
return;
6851+
68476852
auto dstRgn = builder.Create_Dst_Opnd_From_Dcl(builder.kernel.fg.scratchRegDcl, 1);
68486853
auto srcRgn = builder.Create_Src_Opnd_From_Dcl(builder.getBuiltinR0(), builder.getRegionStride1());
68496854

@@ -7803,7 +7808,6 @@ void GlobalRA::addCalleeSavePseudoCode()
78037808
builder.instList.clear();
78047809
}
78057810

7806-
78077811
//
78087812
// Insert pseudo operation to store fp at entry and restore before return.
78097813
// Dst of store will be a temp that will run through RA and get an allocation.

0 commit comments

Comments
 (0)