[PATCH] D64642: [AMDGPU] Tune inlining parameters for AMDGPU target

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 12 09:11:54 PDT 2019


arsenm added inline comments.


================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfo.h:276
+  /// scientific. A target may has no bonus on vector instructions.
+  int getVectorBonusPercent() const;
+
----------------
I think this need a name indicating it's an inliner control. getInlinerVectorBonusPercent?


================
Comment at: llvm/lib/Analysis/InlineCost.cpp:883
   //
-  // Vector bonuses: We want to more aggressively inline vector-dense kernels
-  // and apply this bonus based on the percentage of vector instructions. A
----------------
How does it decide what "vector dense" means? We already report costs that approximately say scalarize everything, and scalarization is free


================
Comment at: llvm/test/CodeGen/AMDGPU/amdgpu-inline.ll:28-41
 define coldcc void @foo_private_ptr2(float addrspace(5)* nocapture %p1, float addrspace(5)* nocapture %p2) {
 entry:
   %tmp1 = load float, float addrspace(5)* %p1, align 4
-  %cmp = fcmp ogt float %tmp1, 1.000000e+00
-  br i1 %cmp, label %if.then, label %if.end
-
-if.then:                                          ; preds = %entry
----------------
Why this test change? I would expect a separate version without the control flow?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D64642





More information about the llvm-commits mailing list