[Hexagon] Reduce excessive indentation in .s output

llvm-svn: 328898
This commit is contained in:
Krzysztof Parzyszek 2018-03-30 19:30:28 +00:00
parent 0f983d69a4
commit 74096f7258
2 changed files with 8 additions and 16 deletions

View File

@ -69,20 +69,12 @@ void HexagonInstPrinter::printInst(const MCInst *MI, raw_ostream &OS,
OS << "\n";
}
if (HexagonMCInstrInfo::isInnerLoop(*MI)) {
if (HexagonMCInstrInfo::isOuterLoop(*MI)) {
MCInst ME;
ME.setOpcode(Hexagon::ENDLOOP01);
printInstruction(&ME, OS);
} else {
MCInst ME;
ME.setOpcode(Hexagon::ENDLOOP0);
printInstruction(&ME, OS);
}
} else if (HexagonMCInstrInfo::isOuterLoop(*MI)) {
MCInst ME;
ME.setOpcode(Hexagon::ENDLOOP1);
printInstruction(&ME, OS);
bool IsLoop0 = HexagonMCInstrInfo::isInnerLoop(*MI);
bool IsLoop1 = HexagonMCInstrInfo::isOuterLoop(*MI);
if (IsLoop0) {
OS << (IsLoop1 ? " :endloop01" : " :endloop0");
} else if (IsLoop1) {
OS << " :endloop1";
}
}

View File

@ -147,7 +147,7 @@ public:
auto PacketBundle = Contents.rsplit('\n');
auto HeadTail = PacketBundle.first.split('\n');
StringRef Separator = "\n";
StringRef Indent = "\t\t";
StringRef Indent = "\t";
OS << "\t{\n";
while (!HeadTail.first.empty()) {
StringRef InstTxt;
@ -164,7 +164,7 @@ public:
}
if (HexagonMCInstrInfo::isMemReorderDisabled(Inst))
OS << "\n\t}:mem_noshuf" << PacketBundle.second;
OS << "\n\t} :mem_noshuf" << PacketBundle.second;
else
OS << "\t}" << PacketBundle.second;
}