Skip to content

Commit 0fb26fa

Browse files
committed
[AsmPrinter] Remove timers from instruction-loop
Doing per-instruction timing is inaccurate and too costly for a profiling functionality
1 parent 117b53a commit 0fb26fa

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1776,11 +1776,8 @@ void AsmPrinter::emitFunctionBody() {
17761776
if (MDNode *MD = MI.getPCSections())
17771777
emitPCSectionsLabel(*MF, *MD);
17781778

1779-
for (const auto &HI : DebugHandlers) {
1780-
NamedRegionTimer T(HI.TimerName, HI.TimerDescription, HI.TimerGroupName,
1781-
HI.TimerGroupDescription, TimePassesIsEnabled);
1779+
for (const auto &HI : DebugHandlers)
17821780
HI.Handler->beginInstruction(&MI);
1783-
}
17841781

17851782
if (isVerbose())
17861783
emitComments(MI, OutStreamer->getCommentOS());
@@ -1874,11 +1871,8 @@ void AsmPrinter::emitFunctionBody() {
18741871
if (MCSymbol *S = MI.getPostInstrSymbol())
18751872
OutStreamer->emitLabel(S);
18761873

1877-
for (const auto &HI : DebugHandlers) {
1878-
NamedRegionTimer T(HI.TimerName, HI.TimerDescription, HI.TimerGroupName,
1879-
HI.TimerGroupDescription, TimePassesIsEnabled);
1874+
for (const auto &HI : DebugHandlers)
18801875
HI.Handler->endInstruction();
1881-
}
18821876
}
18831877

18841878
// We must emit temporary symbol for the end of this basic block, if either

0 commit comments

Comments
 (0)