[all-commits] [llvm/llvm-project] b9e433: Prevent machine licm if remattable with a vreg use

Stanislav Mekhanoshin via All-commits all-commits at lists.llvm.org
Mon Aug 16 12:18:48 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b9e433b02a77830b9ba13406b459ab905371e346
      https://github.com/llvm/llvm-project/commit/b9e433b02a77830b9ba13406b459ab905371e346
  Author: Stanislav Mekhanoshin <Stanislav.Mekhanoshin at amd.com>
  Date:   2021-08-16 (Mon, 16 Aug 2021)

  Changed paths:
    M llvm/lib/CodeGen/MachineLICM.cpp
    M llvm/test/CodeGen/AMDGPU/licm-regpressure.mir

  Log Message:
  -----------
  Prevent machine licm if remattable with a vreg use

Check if a remateralizable nstruction does not have any virtual
register uses. Even though rematerializable RA might not actually
rematerialize it in this scenario. In that case we do not want to
hoist such instruction out of the loop in a believe RA will sink
it back if needed.

This already has impact on AMDGPU target which does not check for
this condition in its isTriviallyReMaterializable implementation
and have instructions with virtual register uses enabled. The
other targets are not impacted at this point although will be when
D106408 lands.

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




More information about the All-commits mailing list