[all-commits] [llvm/llvm-project] 0d1392: [MachineOutliner] Remove LOHs from outlined candid...

Ellis Hoag via All-commits all-commits at lists.llvm.org
Mon Jun 30 14:29:28 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0d1392e979ba113304211832265613b81e21dc89
      https://github.com/llvm/llvm-project/commit/0d1392e979ba113304211832265613b81e21dc89
  Author: Ellis Hoag <ellis.sparky.hoag at gmail.com>
  Date:   2025-06-30 (Mon, 30 Jun 2025)

  Changed paths:
    M llvm/include/llvm/Target/TargetMachine.h
    M llvm/lib/CodeGen/MachineOutliner.cpp
    M llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
    M llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h
    M llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
    M llvm/lib/Target/AArch64/AArch64TargetMachine.h
    A llvm/test/CodeGen/AArch64/machine-outliner-loh.ll
    A llvm/test/CodeGen/AArch64/machine-outliner-loh.mir

  Log Message:
  -----------
  [MachineOutliner] Remove LOHs from outlined candidates (#143617)

Remove Linker Optimization Hints (LOHs) from outlining candidates
instead of simply preventing outlining if LOH labels are found in the
candidate. This will improve the effectiveness of the machine outliner
when LOHs are enabled (which is the default).

In
https://discourse.llvm.org/t/loh-conflicting-with-machineoutliner/83279/1
it was observed that the machine outliner is much more effective when
LOHs are disabled. Rather than completely disabling LOH, this PR aims to
keep LOH in most places and removing them from outlined functions where
it could be illegal. Note that we are conservatively removing all LOHs
from outlined functions for simplicity, but I believe we could retain
LOHs that are in the intersection of all candidates.

It should be ok to remove these LOHs since these blocks are being
outlined anyway, which will harm performance much more than the gain
from keeping the LOHs.



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