diff options
author | David Greene <greened@obbligato.org> | 2009-12-04 22:46:04 +0000 |
---|---|---|
committer | David Greene <greened@obbligato.org> | 2009-12-04 22:46:04 +0000 |
commit | f7ea2a534ba4151e091e270c5b908167ab4bba4d (patch) | |
tree | 3313f064729bc1108ca22a84f04eb3b31ab52f17 /lib | |
parent | 29dbf50b180bb3342af84ff042a3ff06405c5071 (diff) | |
download | external_llvm-f7ea2a534ba4151e091e270c5b908167ab4bba4d.zip external_llvm-f7ea2a534ba4151e091e270c5b908167ab4bba4d.tar.gz external_llvm-f7ea2a534ba4151e091e270c5b908167ab4bba4d.tar.bz2 |
Use new interfaces to print spill size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90611 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 993cdbf..35892ab 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -1857,35 +1857,38 @@ void AsmPrinter::EmitComments(const MachineInstr &MI) const { // We assume a single instruction only has a spill or reload, not // both. + const MachineMemOperand *MMO; if (TM.getInstrInfo()->isLoadFromStackSlotPostFE(&MI, FI)) { if (FrameInfo->isSpillSlotObjectIndex(FI)) { + MMO = *MI.memoperands_begin(); if (Newline) O << '\n'; O.PadToColumn(MAI->getCommentColumn()); - O << MAI->getCommentString() << " Reload"; + O << MAI->getCommentString() << MMO->getSize() << "-byte Reload"; Newline = true; } } - else if (TM.getInstrInfo()->hasLoadFromStackSlot(&MI, FI)) { + else if (TM.getInstrInfo()->hasLoadFromStackSlot(&MI, MMO, FI)) { if (FrameInfo->isSpillSlotObjectIndex(FI)) { if (Newline) O << '\n'; O.PadToColumn(MAI->getCommentColumn()); - O << MAI->getCommentString() << " Folded Reload"; + O << MAI->getCommentString() << MMO->getSize() << "-byte Folded Reload"; Newline = true; } } else if (TM.getInstrInfo()->isStoreToStackSlotPostFE(&MI, FI)) { if (FrameInfo->isSpillSlotObjectIndex(FI)) { + MMO = *MI.memoperands_begin(); if (Newline) O << '\n'; O.PadToColumn(MAI->getCommentColumn()); - O << MAI->getCommentString() << " Spill"; + O << MAI->getCommentString() << MMO->getSize() << "-byte Spill"; Newline = true; } } - else if (TM.getInstrInfo()->hasStoreToStackSlot(&MI, FI)) { + else if (TM.getInstrInfo()->hasStoreToStackSlot(&MI, MMO, FI)) { if (FrameInfo->isSpillSlotObjectIndex(FI)) { if (Newline) O << '\n'; O.PadToColumn(MAI->getCommentColumn()); - O << MAI->getCommentString() << " Folded Spill"; + O << MAI->getCommentString() << MMO->getSize() << "-byte Folded Spill"; Newline = true; } } |