[MachineTraceMetrics] Add local strategy
authorAnton Sidorenko <anton.sidorenko@syntacore.com>
Tue, 14 Feb 2023 10:30:44 +0000 (13:30 +0300)
committerAnton Sidorenko <anton.sidorenko@syntacore.com>
Wed, 15 Feb 2023 12:53:14 +0000 (15:53 +0300)
commit980aa8d740dac77dfe722b04892457b731d1c58b
tree6d7a717b09afe5696968f6cb741f264acfd2464c
parentb0e7ca79ab0cd22a6dbac853ace1e8f0a00b0a94
[MachineTraceMetrics] Add local strategy

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

Reviewed By: spatel

Differential Revision: https://reviews.llvm.org/D140540
llvm/include/llvm/CodeGen/MachineTraceMetrics.h
llvm/lib/CodeGen/MachineTraceMetrics.cpp