[all-commits] [llvm/llvm-project] 6588ac: [MachineCombiner] Don't ignore PHI depths (#82025)

Jonas Paulsson via All-commits all-commits at lists.llvm.org
Thu Mar 14 08:47:52 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6588ac3017df0095b160510f56dcb3e4c32a09f0
      https://github.com/llvm/llvm-project/commit/6588ac3017df0095b160510f56dcb3e4c32a09f0
  Author: Jonas Paulsson <paulson1 at linux.ibm.com>
  Date:   2024-03-14 (Thu, 14 Mar 2024)

  Changed paths:
    M llvm/lib/CodeGen/MachineCombiner.cpp
    M llvm/test/CodeGen/RISCV/umulo-128-legalisation-lowering.ll
    M llvm/test/CodeGen/X86/bitcast-and-setcc-256.ll

  Log Message:
  -----------
  [MachineCombiner] Don't ignore PHI depths (#82025)

The depths of the Root and the NewRoot are to be compared in
MachineCombiner::improvesCriticalPathLen(), and while the call to
BlockTrace.getInstrCycles(*Root) includes the Depth of a PHI, for some
reason PHI nodes have been ignored in getOperandDef(). 

This patch removes the special handling of PHIs in getOperandDef() so that
Root and NewRoot get a fair comparison. This does not affect loop headers
as MachineTraceMetrics handles that case by ignoring incoming PHI edges.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list