diff options
| author | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2018-02-08 23:42:27 +0000 |
|---|---|---|
| committer | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2018-02-08 23:42:27 +0000 |
| commit | d65438d0ca7cf1e03a27767dbf2e455ac0b9b154 (patch) | |
| tree | dc67b185fe6f440bce12c1748bad100c75269ca5 /llvm/lib/Target/AArch64/AArch64CollectLOH.cpp | |
| parent | 9849f595b9f92914263f80cdb8c48ec78499ba0b (diff) | |
| download | bcm5719-llvm-d65438d0ca7cf1e03a27767dbf2e455ac0b9b154.tar.gz bcm5719-llvm-d65438d0ca7cf1e03a27767dbf2e455ac0b9b154.zip | |
[CodeGen] Move printing '\n' from MachineInstr::print to MachineBasicBlock::print
MBB.print wasn't printing it, but the MIRPrinter is printing it. The
goal is to unify that as much as possible.
llvm-svn: 324681
Diffstat (limited to 'llvm/lib/Target/AArch64/AArch64CollectLOH.cpp')
| -rw-r--r-- | llvm/lib/Target/AArch64/AArch64CollectLOH.cpp | 44 |
1 files changed, 28 insertions, 16 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64CollectLOH.cpp b/llvm/lib/Target/AArch64/AArch64CollectLOH.cpp index 0a9167edcdb..baa1b0e21b8 100644 --- a/llvm/lib/Target/AArch64/AArch64CollectLOH.cpp +++ b/llvm/lib/Target/AArch64/AArch64CollectLOH.cpp @@ -380,8 +380,9 @@ static bool handleMiddleInst(const MachineInstr &MI, LOHInfo &DefInfo, static void handleADRP(const MachineInstr &MI, AArch64FunctionInfo &AFI, LOHInfo &Info) { if (Info.LastADRP != nullptr) { - DEBUG(dbgs() << "Adding MCLOH_AdrpAdrp:\n" << '\t' << MI << '\t' - << *Info.LastADRP); + DEBUG(dbgs() << "Adding MCLOH_AdrpAdrp:\n" + << '\t' << MI << '\n' + << '\t' << *Info.LastADRP << '\n'); AFI.addLOHDirective(MCLOH_AdrpAdrp, {&MI, Info.LastADRP}); ++NumADRPSimpleCandidate; } @@ -390,48 +391,59 @@ static void handleADRP(const MachineInstr &MI, AArch64FunctionInfo &AFI, if (Info.IsCandidate) { switch (Info.Type) { case MCLOH_AdrpAdd: - DEBUG(dbgs() << "Adding MCLOH_AdrpAdd:\n" << '\t' << MI << '\t' - << *Info.MI0); + DEBUG(dbgs() << "Adding MCLOH_AdrpAdd:\n" + << '\t' << MI << '\n' + << '\t' << *Info.MI0 << '\n'); AFI.addLOHDirective(MCLOH_AdrpAdd, {&MI, Info.MI0}); ++NumADRSimpleCandidate; break; case MCLOH_AdrpLdr: if (supportLoadFromLiteral(*Info.MI0)) { - DEBUG(dbgs() << "Adding MCLOH_AdrpLdr:\n" << '\t' << MI << '\t' - << *Info.MI0); + DEBUG(dbgs() << "Adding MCLOH_AdrpLdr:\n" + << '\t' << MI << '\n' + << '\t' << *Info.MI0 << '\n'); AFI.addLOHDirective(MCLOH_AdrpLdr, {&MI, Info.MI0}); ++NumADRPToLDR; } break; case MCLOH_AdrpAddLdr: - DEBUG(dbgs() << "Adding MCLOH_AdrpAddLdr:\n" << '\t' << MI << '\t' - << *Info.MI1 << '\t' << *Info.MI0); + DEBUG(dbgs() << "Adding MCLOH_AdrpAddLdr:\n" + << '\t' << MI << '\n' + << '\t' << *Info.MI1 << '\n' + << '\t' << *Info.MI0 << '\n'); AFI.addLOHDirective(MCLOH_AdrpAddLdr, {&MI, Info.MI1, Info.MI0}); ++NumADDToLDR; break; case MCLOH_AdrpAddStr: if (Info.MI1 != nullptr) { - DEBUG(dbgs() << "Adding MCLOH_AdrpAddStr:\n" << '\t' << MI << '\t' - << *Info.MI1 << '\t' << *Info.MI0); + DEBUG(dbgs() << "Adding MCLOH_AdrpAddStr:\n" + << '\t' << MI << '\n' + << '\t' << *Info.MI1 << '\n' + << '\t' << *Info.MI0 << '\n'); AFI.addLOHDirective(MCLOH_AdrpAddStr, {&MI, Info.MI1, Info.MI0}); ++NumADDToSTR; } break; case MCLOH_AdrpLdrGotLdr: - DEBUG(dbgs() << "Adding MCLOH_AdrpLdrGotLdr:\n" << '\t' << MI << '\t' - << *Info.MI1 << '\t' << *Info.MI0); + DEBUG(dbgs() << "Adding MCLOH_AdrpLdrGotLdr:\n" + << '\t' << MI << '\n' + << '\t' << *Info.MI1 << '\n' + << '\t' << *Info.MI0 << '\n'); AFI.addLOHDirective(MCLOH_AdrpLdrGotLdr, {&MI, Info.MI1, Info.MI0}); ++NumLDRToLDR; break; case MCLOH_AdrpLdrGotStr: - DEBUG(dbgs() << "Adding MCLOH_AdrpLdrGotStr:\n" << '\t' << MI << '\t' - << *Info.MI1 << '\t' << *Info.MI0); + DEBUG(dbgs() << "Adding MCLOH_AdrpLdrGotStr:\n" + << '\t' << MI << '\n' + << '\t' << *Info.MI1 << '\n' + << '\t' << *Info.MI0 << '\n'); AFI.addLOHDirective(MCLOH_AdrpLdrGotStr, {&MI, Info.MI1, Info.MI0}); ++NumLDRToSTR; break; case MCLOH_AdrpLdrGot: - DEBUG(dbgs() << "Adding MCLOH_AdrpLdrGot:\n" << '\t' << MI << '\t' - << *Info.MI0); + DEBUG(dbgs() << "Adding MCLOH_AdrpLdrGot:\n" + << '\t' << MI << '\n' + << '\t' << *Info.MI0 << '\n'); AFI.addLOHDirective(MCLOH_AdrpLdrGot, {&MI, Info.MI0}); break; case MCLOH_AdrpAdrp: |

