[all-commits] [llvm/llvm-project] a11bf9: [AMDGPU][Inliner] Remove amdgpu-inline and add a n...

aeubanks via All-commits all-commits at lists.llvm.org
Thu Jan 21 20:29:43 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a11bf9a7fbd3693d6d4bca8ef2ba1d2f0758f9be
      https://github.com/llvm/llvm-project/commit/a11bf9a7fbd3693d6d4bca8ef2ba1d2f0758f9be
  Author: Arthur Eubanks <aeubanks at google.com>
  Date:   2021-01-21 (Thu, 21 Jan 2021)

  Changed paths:
    M llvm/include/llvm/Analysis/TargetTransformInfo.h
    M llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
    M llvm/include/llvm/CodeGen/BasicTTIImpl.h
    M llvm/lib/Analysis/InlineCost.cpp
    M llvm/lib/Analysis/TargetTransformInfo.cpp
    M llvm/lib/Target/AMDGPU/AMDGPU.h
    R llvm/lib/Target/AMDGPU/AMDGPUInline.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h
    M llvm/lib/Target/AMDGPU/CMakeLists.txt
    M llvm/test/CodeGen/AMDGPU/amdgpu-inline.ll
    M llvm/test/CodeGen/AMDGPU/inline-maxbb.ll
    M llvm/test/CodeGen/AMDGPU/opt-pipeline.ll
    M llvm/test/Transforms/Inline/AMDGPU/amdgpu-inline-alloca-argument.ll
    M llvm/test/Transforms/Inline/AMDGPU/inline-amdgpu-vecbonus.ll
    M llvm/test/Transforms/Inline/AMDGPU/inline-hint.ll
    M llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/BUILD.gn

  Log Message:
  -----------
  [AMDGPU][Inliner] Remove amdgpu-inline and add a new TTI inline hook

Having a custom inliner doesn't really fit in with the new PM's
pipeline. It's also extra technical debt.

amdgpu-inline only does a couple of custom things compared to the normal
inliner:
1) It disables inlining if the number of BBs in a function would exceed
   some limit
2) It increases the threshold if there are pointers to private arrays(?)

These can all be handled as TTI inliner hooks.
There already exists a hook for backends to multiply the inlining
threshold.

This way we can remove the custom amdgpu-inline pass.

This caused inline-hint.ll to fail, and after some investigation, it
looks like getInliningThresholdMultiplier() was previously getting
applied twice in amdgpu-inline (https://reviews.llvm.org/D62707 fixed it
not applying at all, so some later inliner change must have fixed
something), so I had to change the threshold in the test.

Reviewed By: rampitec

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




More information about the All-commits mailing list