Skip to content

Commit 18295b8

Browse files
pratikasharZuul
authored andcommitted
Improve support for spill/fill intrinsincs in presence of stack call
Change-Id: I6d64093b017d2c059c473ae2382d9b51322fd89a
1 parent 801a119 commit 18295b8

File tree

5 files changed

+421
-249
lines changed

5 files changed

+421
-249
lines changed

visa/GraphColor.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8968,7 +8968,8 @@ int GlobalRA::coloringRegAlloc()
89688968
}
89698969
#endif
89708970
bool disableSpillCoalecse = builder.getOption(vISA_DisableSpillCoalescing) ||
8971-
builder.getOption(vISA_FastSpill) || builder.getOption(vISA_Debug);
8971+
builder.getOption(vISA_FastSpill) || builder.getOption(vISA_Debug) ||
8972+
!useScratchMsgForSpill;
89728973
if (!reserveSpillReg && !disableSpillCoalecse && builder.useSends())
89738974
{
89748975
CoalesceSpillFills c(kernel, liveAnalysis, coloring, spillGRF, iterationNo, rpe, *this);

visa/GraphColor.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,11 @@ namespace vISA
742742
// new temps for each reference of spilled address/flag decls
743743
std::unordered_set<G4_Declare*> addrFlagSpillDcls;
744744

745+
void expandFillNonStackcall(uint32_t& numRows, uint32_t& offset, short& rowOffset, G4_SrcRegRegion* header, G4_DstRegRegion* resultRgn, G4_BB* bb, INST_LIST_ITER& instIt);
746+
void expandSpillNonStackcall(uint32_t& numRows, uint32_t& offset, short& rowOffset, G4_SrcRegRegion* header, G4_SrcRegRegion* payload, G4_BB* bb, INST_LIST_ITER& instIt);
747+
void expandFillStackcall(uint32_t& numRows, uint32_t& offset, short& rowOffset, G4_SrcRegRegion* header, G4_DstRegRegion* resultRgn, G4_BB* bb, INST_LIST_ITER& instIt);
748+
void expandSpillStackcall(uint32_t& numRows, uint32_t& offset, short& rowOffset, G4_SrcRegRegion* payload, G4_BB* bb, INST_LIST_ITER& instIt);
749+
745750
public:
746751
G4_Kernel& kernel;
747752
IR_Builder& builder;

visa/RegAlloc.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1797,6 +1797,9 @@ bool LivenessAnalysis::writeWholeRegion(G4_BB* bb,
17971797
return false;
17981798
}
17991799

1800+
if (inst->isFCall())
1801+
return true;
1802+
18001803
// Flags may be partially written when used as the destination
18011804
// e.g., setp (M5_NM, 16) P11 V97(8,0)<0;1,0>
18021805
// It can be only considered as a complete kill

0 commit comments

Comments
 (0)