Skip to content

Commit 8873b97

Browse files
fangliu2020igcbot
authored andcommitted
[IGC vISA] Dump ALU pipe in asm comment
Dump ALU pipe in asm comment
1 parent 3463654 commit 8873b97

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

visa/LocalScheduler/SWSB_G4IR.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5981,6 +5981,22 @@ bool G4_BB_SB::hasIntraReadSuppression(SBNode *node,
59815981
return false;
59825982
}
59835983

5984+
static std::string generateALUPipeComment(SB_INST_PIPE aluPipe) {
5985+
switch (aluPipe) {
5986+
case PIPE_INT:
5987+
return "ALU pipe: int";
5988+
case PIPE_FLOAT:
5989+
return "ALU pipe: float";
5990+
case PIPE_LONG:
5991+
return "ALU pipe: long";
5992+
case PIPE_MATH:
5993+
return "ALU pipe: math";
5994+
default:
5995+
// non-ALU pipe: do not print anything
5996+
return "";
5997+
}
5998+
}
5999+
59846000
void G4_BB_SB::SBDDD(G4_BB *bb, LiveGRFBuckets *&LB,
59856001
LiveGRFBuckets *&globalSendsLB, SBNODE_VECT *SBNodes,
59866002
SBNODE_VECT *SBSendNodes,
@@ -6638,6 +6654,9 @@ void G4_BB_SB::SBDDD(G4_BB *bb, LiveGRFBuckets *&LB,
66386654
}
66396655
}
66406656

6657+
// dump ALU pipe in asm comment
6658+
node->GetInstruction()->addComment(generateALUPipeComment(node->ALUPipe));
6659+
66416660
if (node->hasDistInfo()) {
66426661
if (builder.hasFiveALUPipes()) {
66436662
node->finalizeDistanceType2(builder, latestInstID);

0 commit comments

Comments
 (0)