[all-commits] [llvm/llvm-project] e5296c: [AMDGPU] Relax restrictions on unbreakable PHI use...

Pierre van Houtryve via All-commits all-commits at lists.llvm.org
Fri Jul 14 00:03:05 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e5296c52e51bf214da32734d2344c9380c58a347
      https://github.com/llvm/llvm-project/commit/e5296c52e51bf214da32734d2344c9380c58a347
  Author: pvanhout <pierre.vanhoutryve at amd.com>
  Date:   2023-07-14 (Fri, 14 Jul 2023)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
    M llvm/test/CodeGen/AMDGPU/amdgpu-codegenprepare-break-large-phis-heuristics.ll

  Log Message:
  -----------
  [AMDGPU] Relax restrictions on unbreakable PHI users in BreakLargePHis

The previous heuristic rejected a PHI if one of its user was an unbreakable PHI, no matter what the other users were.

This worked well in most cases, but there's one case in rocRAND where
it doesn't work. In that case, a PHI node has 2 PHI users where one is
breakable but not the other. When that PHI node isn't broken performance falls by 35%.

Relaxing the restriction to "require that  half of the PHI node users are breakable" fixes the issue, and seems like a sensible change.

Solves SWDEV-409648, SWDEV-398393

Reviewed By: #amdgpu, arsenm

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




More information about the All-commits mailing list