[all-commits] [llvm/llvm-project] 56ad6d: [MachineLICM] Hoist COPY instruction only when use...

michaelselehov via All-commits all-commits at lists.llvm.org
Tue Feb 27 04:31:42 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 56ad6d19397c4286fa412f5070fd1a563b6c43e4
      https://github.com/llvm/llvm-project/commit/56ad6d19397c4286fa412f5070fd1a563b6c43e4
  Author: michaelselehov <michael.selehov at amd.com>
  Date:   2024-02-27 (Tue, 27 Feb 2024)

  Changed paths:
    M llvm/include/llvm/CodeGen/MachineLoopInfo.h
    M llvm/lib/CodeGen/MachineLICM.cpp
    M llvm/lib/CodeGen/MachineLoopInfo.cpp
    A llvm/test/CodeGen/AMDGPU/copy-hoist-no-spills.ll

  Log Message:
  -----------
  [MachineLICM] Hoist COPY instruction only when user can be hoisted (#81735)

befa925acac8fd6a9266e introduced preliminary hoisting of COPY
instructions when the user of the COPY is inside the same loop. That
optimization appeared to be too aggressive and hoisted too many COPY's
greatly increasing register pressure causing performance regressions for
AMDGPU target.

This is intended to fix the regression by hoisting COPY instruction only
if either:
 - User of COPY can be hoisted (other args are invariant) 
 or
 - Hoisting COPY doesn't bring high register pressure



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