[all-commits] [llvm/llvm-project] a383d3: [TargetRegisterInfo] Speed up getAllocatableSet. N...

Jay Foad via All-commits all-commits at lists.llvm.org
Wed May 12 06:09:31 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a383d325f6c6c8d9bb52d1da221d9a144dfc475c
      https://github.com/llvm/llvm-project/commit/a383d325f6c6c8d9bb52d1da221d9a144dfc475c
  Author: Jay Foad <jay.foad at amd.com>
  Date:   2021-05-12 (Wed, 12 May 2021)

  Changed paths:
    M llvm/lib/CodeGen/TargetRegisterInfo.cpp

  Log Message:
  -----------
  [TargetRegisterInfo] Speed up getAllocatableSet. NFCI.

MachineRegisterInfo caches the reserved register set that is computed by
by TargetRegisterInfo::getReservedRegs, so call into MRI to get the
reserved regs to avoid recomputing them.

In particular this speeds up AMDGPU's SIFormMemoryClauses pass because
AMDGPU has a particularly complicated reserved set that is expensive to
compute.

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




More information about the All-commits mailing list