Skip to content

Commit c150c0f

Browse files
jgu222igcbot
authored andcommitted
[Autobackout][FuncReg]Revert of change: 190b1f4
Minor change to visa disas Minor refactor to visa disaa. No functional change.
1 parent 190b1f4 commit c150c0f

File tree

1 file changed

+7
-26
lines changed

1 file changed

+7
-26
lines changed

visa/IsaDisassembly.cpp

Lines changed: 7 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -909,11 +909,11 @@ static std::string printInstructionCommon(
909909
static std::string printInstructionControlFlow(
910910
const print_format_provider_t* header,
911911
const CISA_INST* inst,
912-
const Options* opt)
912+
const Options *opt)
913913
{
914914
ISA_Opcode opcode = (ISA_Opcode)inst->opcode;
915915
unsigned i = 0;
916-
uint16_t label_id = 0;
916+
uint16_t label_id = 0;
917917

918918
std::stringstream sstr;
919919

@@ -965,14 +965,11 @@ static std::string printInstructionControlFlow(
965965
}
966966
else
967967
{
968-
auto printInstName = [](std::stringstream& SS, const CISA_INST* I, const char* IName) {
969-
SS << printPredicate(I->opcode, I->pred)
970-
<< ISA_Inst_Table[I->opcode].str
971-
<< " "
972-
<< printExecutionSize(I->opcode, I->execsize);
973-
};
974-
975-
const char* InstName = ISA_Inst_Table[opcode].str;
968+
sstr << printPredicate(inst->opcode, inst->pred)
969+
<< ISA_Inst_Table[opcode].str
970+
<< " "
971+
<< printExecutionSize(inst->opcode, inst->execsize);
972+
976973
switch (opcode)
977974
{
978975
case ISA_JMP:
@@ -983,13 +980,6 @@ static std::string printInstructionControlFlow(
983980
/// label / function id to jump / call to.
984981
label_id = getPrimitiveOperand<uint16_t>(inst, i++);
985982

986-
// If it is fccall, using "fccall" as text name.
987-
bool is_fccall = false; // (opcode == ISA_CALL && header->getLabel(label_id)->kind == LABEL_FC);
988-
InstName = is_fccall ? "fccall" : InstName;
989-
990-
// print instruction name, etc
991-
printInstName(sstr, inst, InstName);
992-
993983
if (opcode == ISA_FCALL)
994984
{
995985
/// function name in string
@@ -1015,9 +1005,6 @@ static std::string printInstructionControlFlow(
10151005
}
10161006
case ISA_IFCALL:
10171007
{
1018-
// print instruction name, etc
1019-
printInstName(sstr, inst, InstName);
1020-
10211008
sstr << printOperand(header, inst, i++, opt);
10221009
/// arg size
10231010
sstr << " " << getPrimitiveOperand<unsigned>(inst, i++);
@@ -1027,9 +1014,6 @@ static std::string printInstructionControlFlow(
10271014
}
10281015
case ISA_FADDR:
10291016
{
1030-
// print instruction name, etc
1031-
printInstName(sstr, inst, InstName);
1032-
10331017
/// symbol name in string
10341018
sstr << header->getString(getPrimitiveOperand<uint16_t>(inst, i++));
10351019
/// dst
@@ -1038,9 +1022,6 @@ static std::string printInstructionControlFlow(
10381022
}
10391023
case ISA_SWITCHJMP:
10401024
{
1041-
// print instruction name, etc
1042-
printInstName(sstr, inst, InstName);
1043-
10441025
/// skip num_labels
10451026
i++;
10461027
/// index

0 commit comments

Comments
 (0)