Skip to content

Commit 01abb8b

Browse files
committed
[AsmPrinter] Remove timers from instruction-loop
Doing per-instruction timing is inaccurate and too costly for a profiling functionality
1 parent 9b9a40a commit 01abb8b

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
@@ -1773,11 +1773,8 @@ void AsmPrinter::emitFunctionBody() {
17731773
if (MDNode *MD = MI.getPCSections())
17741774
emitPCSectionsLabel(*MF, *MD);
17751775

1776-
for (const auto &HI : DebugHandlers) {
1777-
NamedRegionTimer T(HI.TimerName, HI.TimerDescription, HI.TimerGroupName,
1778-
HI.TimerGroupDescription, TimePassesIsEnabled);
1776+
for (const auto &HI : DebugHandlers)
17791777
HI.Handler->beginInstruction(&MI);
1780-
}
17811778

17821779
if (isVerbose())
17831780
emitComments(MI, OutStreamer->getCommentOS());
@@ -1871,11 +1868,8 @@ void AsmPrinter::emitFunctionBody() {
18711868
if (MCSymbol *S = MI.getPostInstrSymbol())
18721869
OutStreamer->emitLabel(S);
18731870

1874-
for (const auto &HI : DebugHandlers) {
1875-
NamedRegionTimer T(HI.TimerName, HI.TimerDescription, HI.TimerGroupName,
1876-
HI.TimerGroupDescription, TimePassesIsEnabled);
1871+
for (const auto &HI : DebugHandlers)
18771872
HI.Handler->endInstruction();
1878-
}
18791873
}
18801874

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

0 commit comments

Comments
 (0)