AsmPrinter.cpp (199989) | AsmPrinter.cpp (200581) |
---|---|
1//===-- AsmPrinter.cpp - Common AsmPrinter code ---------------------------===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 1360 unchanged lines hidden (view full) --- 1369 if (CurDLT.Scope == 0) 1370 return; 1371 1372 if (BeforePrintingInsn) { 1373 if (CurDLT != PrevDLT) { 1374 unsigned L = DW->RecordSourceLine(CurDLT.Line, CurDLT.Col, 1375 CurDLT.Scope); 1376 printLabel(L); | 1//===-- AsmPrinter.cpp - Common AsmPrinter code ---------------------------===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 1360 unchanged lines hidden (view full) --- 1369 if (CurDLT.Scope == 0) 1370 return; 1371 1372 if (BeforePrintingInsn) { 1373 if (CurDLT != PrevDLT) { 1374 unsigned L = DW->RecordSourceLine(CurDLT.Line, CurDLT.Col, 1375 CurDLT.Scope); 1376 printLabel(L); |
1377 O << '\n'; |
|
1377 DW->BeginScope(MI, L); 1378 PrevDLT = CurDLT; 1379 } 1380 } else { 1381 // After printing instruction 1382 DW->EndScope(MI); 1383 } 1384} --- 447 unchanged lines hidden (view full) --- 1832 1833 bool Newline = false; 1834 1835 if (!MI.getDebugLoc().isUnknown()) { 1836 DebugLocTuple DLT = MF->getDebugLocTuple(MI.getDebugLoc()); 1837 1838 // Print source line info. 1839 O.PadToColumn(MAI->getCommentColumn()); | 1378 DW->BeginScope(MI, L); 1379 PrevDLT = CurDLT; 1380 } 1381 } else { 1382 // After printing instruction 1383 DW->EndScope(MI); 1384 } 1385} --- 447 unchanged lines hidden (view full) --- 1833 1834 bool Newline = false; 1835 1836 if (!MI.getDebugLoc().isUnknown()) { 1837 DebugLocTuple DLT = MF->getDebugLocTuple(MI.getDebugLoc()); 1838 1839 // Print source line info. 1840 O.PadToColumn(MAI->getCommentColumn()); |
1840 O << MAI->getCommentString() << " SrcLine "; 1841 if (DLT.Scope) { 1842 DICompileUnit CU(DLT.Scope); 1843 if (!CU.isNull()) 1844 O << CU.getFilename() << " "; 1845 } 1846 O << DLT.Line; | 1841 O << MAI->getCommentString() << ' '; 1842 DIScope Scope(DLT.Scope); 1843 // Omit the directory, because it's likely to be long and uninteresting. 1844 if (!Scope.isNull()) 1845 O << Scope.getFilename(); 1846 else 1847 O << "<unknown>"; 1848 O << ':' << DLT.Line; |
1847 if (DLT.Col != 0) | 1849 if (DLT.Col != 0) |
1848 O << ":" << DLT.Col; | 1850 O << ':' << DLT.Col; |
1849 Newline = true; 1850 } 1851 1852 // Check for spills and reloads 1853 int FI; 1854 1855 const MachineFrameInfo *FrameInfo = 1856 MI.getParent()->getParent()->getFrameInfo(); 1857 1858 // We assume a single instruction only has a spill or reload, not 1859 // both. | 1851 Newline = true; 1852 } 1853 1854 // Check for spills and reloads 1855 int FI; 1856 1857 const MachineFrameInfo *FrameInfo = 1858 MI.getParent()->getParent()->getFrameInfo(); 1859 1860 // We assume a single instruction only has a spill or reload, not 1861 // both. |
1862 const MachineMemOperand *MMO; |
|
1860 if (TM.getInstrInfo()->isLoadFromStackSlotPostFE(&MI, FI)) { 1861 if (FrameInfo->isSpillSlotObjectIndex(FI)) { | 1863 if (TM.getInstrInfo()->isLoadFromStackSlotPostFE(&MI, FI)) { 1864 if (FrameInfo->isSpillSlotObjectIndex(FI)) { |
1865 MMO = *MI.memoperands_begin(); |
|
1862 if (Newline) O << '\n'; 1863 O.PadToColumn(MAI->getCommentColumn()); | 1866 if (Newline) O << '\n'; 1867 O.PadToColumn(MAI->getCommentColumn()); |
1864 O << MAI->getCommentString() << " Reload"; | 1868 O << MAI->getCommentString() << ' ' << MMO->getSize() << "-byte Reload"; |
1865 Newline = true; 1866 } 1867 } | 1869 Newline = true; 1870 } 1871 } |
1868 else if (TM.getInstrInfo()->hasLoadFromStackSlot(&MI, FI)) { | 1872 else if (TM.getInstrInfo()->hasLoadFromStackSlot(&MI, MMO, FI)) { |
1869 if (FrameInfo->isSpillSlotObjectIndex(FI)) { 1870 if (Newline) O << '\n'; 1871 O.PadToColumn(MAI->getCommentColumn()); | 1873 if (FrameInfo->isSpillSlotObjectIndex(FI)) { 1874 if (Newline) O << '\n'; 1875 O.PadToColumn(MAI->getCommentColumn()); |
1872 O << MAI->getCommentString() << " Folded Reload"; | 1876 O << MAI->getCommentString() << ' ' 1877 << MMO->getSize() << "-byte Folded Reload"; |
1873 Newline = true; 1874 } 1875 } 1876 else if (TM.getInstrInfo()->isStoreToStackSlotPostFE(&MI, FI)) { 1877 if (FrameInfo->isSpillSlotObjectIndex(FI)) { | 1878 Newline = true; 1879 } 1880 } 1881 else if (TM.getInstrInfo()->isStoreToStackSlotPostFE(&MI, FI)) { 1882 if (FrameInfo->isSpillSlotObjectIndex(FI)) { |
1883 MMO = *MI.memoperands_begin(); |
|
1878 if (Newline) O << '\n'; 1879 O.PadToColumn(MAI->getCommentColumn()); | 1884 if (Newline) O << '\n'; 1885 O.PadToColumn(MAI->getCommentColumn()); |
1880 O << MAI->getCommentString() << " Spill"; | 1886 O << MAI->getCommentString() << ' ' << MMO->getSize() << "-byte Spill"; |
1881 Newline = true; 1882 } 1883 } | 1887 Newline = true; 1888 } 1889 } |
1884 else if (TM.getInstrInfo()->hasStoreToStackSlot(&MI, FI)) { | 1890 else if (TM.getInstrInfo()->hasStoreToStackSlot(&MI, MMO, FI)) { |
1885 if (FrameInfo->isSpillSlotObjectIndex(FI)) { 1886 if (Newline) O << '\n'; 1887 O.PadToColumn(MAI->getCommentColumn()); | 1891 if (FrameInfo->isSpillSlotObjectIndex(FI)) { 1892 if (Newline) O << '\n'; 1893 O.PadToColumn(MAI->getCommentColumn()); |
1888 O << MAI->getCommentString() << " Folded Spill"; | 1894 O << MAI->getCommentString() << ' ' 1895 << MMO->getSize() << "-byte Folded Spill"; |
1889 Newline = true; 1890 } 1891 } 1892 1893 // Check for spill-induced copies 1894 unsigned SrcReg, DstReg, SrcSubIdx, DstSubIdx; 1895 if (TM.getInstrInfo()->isMoveInstr(MI, SrcReg, DstReg, 1896 SrcSubIdx, DstSubIdx)) { --- 86 unchanged lines hidden --- | 1896 Newline = true; 1897 } 1898 } 1899 1900 // Check for spill-induced copies 1901 unsigned SrcReg, DstReg, SrcSubIdx, DstSubIdx; 1902 if (TM.getInstrInfo()->isMoveInstr(MI, SrcReg, DstReg, 1903 SrcSubIdx, DstSubIdx)) { --- 86 unchanged lines hidden --- |