forked from OSchip/llvm-project
[Hexagon] Reduce excessive indentation in .s output
llvm-svn: 328898
This commit is contained in:
parent
0f983d69a4
commit
74096f7258
|
@ -69,20 +69,12 @@ void HexagonInstPrinter::printInst(const MCInst *MI, raw_ostream &OS,
|
||||||
OS << "\n";
|
OS << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HexagonMCInstrInfo::isInnerLoop(*MI)) {
|
bool IsLoop0 = HexagonMCInstrInfo::isInnerLoop(*MI);
|
||||||
if (HexagonMCInstrInfo::isOuterLoop(*MI)) {
|
bool IsLoop1 = HexagonMCInstrInfo::isOuterLoop(*MI);
|
||||||
MCInst ME;
|
if (IsLoop0) {
|
||||||
ME.setOpcode(Hexagon::ENDLOOP01);
|
OS << (IsLoop1 ? " :endloop01" : " :endloop0");
|
||||||
printInstruction(&ME, OS);
|
} else if (IsLoop1) {
|
||||||
} else {
|
OS << " :endloop1";
|
||||||
MCInst ME;
|
|
||||||
ME.setOpcode(Hexagon::ENDLOOP0);
|
|
||||||
printInstruction(&ME, OS);
|
|
||||||
}
|
|
||||||
} else if (HexagonMCInstrInfo::isOuterLoop(*MI)) {
|
|
||||||
MCInst ME;
|
|
||||||
ME.setOpcode(Hexagon::ENDLOOP1);
|
|
||||||
printInstruction(&ME, OS);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -147,7 +147,7 @@ public:
|
||||||
auto PacketBundle = Contents.rsplit('\n');
|
auto PacketBundle = Contents.rsplit('\n');
|
||||||
auto HeadTail = PacketBundle.first.split('\n');
|
auto HeadTail = PacketBundle.first.split('\n');
|
||||||
StringRef Separator = "\n";
|
StringRef Separator = "\n";
|
||||||
StringRef Indent = "\t\t";
|
StringRef Indent = "\t";
|
||||||
OS << "\t{\n";
|
OS << "\t{\n";
|
||||||
while (!HeadTail.first.empty()) {
|
while (!HeadTail.first.empty()) {
|
||||||
StringRef InstTxt;
|
StringRef InstTxt;
|
||||||
|
@ -164,7 +164,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HexagonMCInstrInfo::isMemReorderDisabled(Inst))
|
if (HexagonMCInstrInfo::isMemReorderDisabled(Inst))
|
||||||
OS << "\n\t}:mem_noshuf" << PacketBundle.second;
|
OS << "\n\t} :mem_noshuf" << PacketBundle.second;
|
||||||
else
|
else
|
||||||
OS << "\t}" << PacketBundle.second;
|
OS << "\t}" << PacketBundle.second;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue