[all-commits] [llvm/llvm-project] fb47bb: [MachineTraceMetrics] Pick the trace successor for...

Anton Sidorenko via All-commits all-commits at lists.llvm.org
Mon Nov 21 02:12:01 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fb47bb37e4fe7b67bde31bca93d9b31dd55c0caa
      https://github.com/llvm/llvm-project/commit/fb47bb37e4fe7b67bde31bca93d9b31dd55c0caa
  Author: Anton Sidorenko <anton.sidorenko at syntacore.com>
  Date:   2022-11-21 (Mon, 21 Nov 2022)

  Changed paths:
    M llvm/lib/CodeGen/MachineTraceMetrics.cpp
    M llvm/test/CodeGen/X86/machine-trace-metrics-entryBB-critpath.ll

  Log Message:
  -----------
  [MachineTraceMetrics] Pick the trace successor for an entry block

We generate erroneous trace for a basic block if it does not have at least one
predecessor when MinInstr strategy is used. Currently only this strategy is
implemented, so we always have a wrong trace for any entry block. This results in
wrong instructions heights calculation and also leads to wrong critical path.

The described behavior is demonstrated on a simple test. It shows that early
if-conv pass makes wrong decisions due to incorrectly calculated critical path
lenght.

Differential Revision: https://reviews.llvm.org/D138272




More information about the All-commits mailing list