[PATCH] D62917: [AMDGPU] Constrain the inliner on maximum number of basic blocks in a caller function

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 5 11:32:41 PDT 2019


arsenm added inline comments.


================
Comment at: lib/Target/AMDGPU/AMDGPUInline.cpp:53
+static cl::opt<size_t>
+MaxBB("amd-inline-max-bb", cl::Hidden, cl::init(300),
+      cl::desc("Maximum BB number allowed in a function after inlining"));
----------------
rampitec wrote:
> Use prefix amdgpu.
Should add a comment explaining this is a compile time hack


================
Comment at: test/CodeGen/AMDGPU/inline-maxbb.ll:1-2
+; RUN: opt -mtriple=amdgcn-- -O3 -S -amd-inline-max-bb=2 %s | FileCheck %s --check-prefix=NOINL
+; RUN: opt -mtriple=amdgcn-- -O3 -S -amd-inline-max-bb=3 %s | FileCheck %s --check-prefix=INL
+
----------------
Should only run the amdgpu-inline pass, not all of -O3


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62917/new/

https://reviews.llvm.org/D62917





More information about the llvm-commits mailing list