This is an archive of the discontinued LLVM Phabricator instance.

[MachineTraceMetrics] Add local strategy
ClosedPublic

Authored by asi-sc on Dec 22 2022, 2:55 AM.

Details

Summary

This strategy makes each trace local to the basic block. For in-order cores some
heuristics work better when we do local decisions. For example, MachineCombiner
may expect that instructions outside the current basic block do not lengthen
the critical path when we execute instructions in order or the core has a
small re-order buffer.

This patch only introduce the strategy, real use-case is added in the further
pathes.

Depends on D140539

Diff Detail

Event Timeline

asi-sc created this revision.Dec 22 2022, 2:55 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 22 2022, 2:55 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
asi-sc requested review of this revision.Dec 22 2022, 2:55 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 22 2022, 2:55 AM
spatel added inline comments.Feb 6 2023, 5:10 AM
llvm/lib/CodeGen/MachineTraceMetrics.cpp
321–322

I see that this is replicating the previous code comment, but we shouldn't repeat the class/variable/function name in the block comment, and it should probably use "///" to produce the expected doxygen output.

spatel accepted this revision.Feb 6 2023, 5:10 AM

LGTM - see inline comment for adjustment to code comment.

This revision is now accepted and ready to land.Feb 6 2023, 5:10 AM
This revision was automatically updated to reflect the committed changes.