[PATCH] D83674: [AMDGPU] Calculate minimum allowed occupancy based on threads per lane

Nicolai Hähnle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 16 13:01:14 PDT 2020


nhaehnle added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h:919
 
-  unsigned getMinAllowedOccupancy() const {
-    if (!isMemoryBound() && !needsWaveLimiter())
-      return Occupancy;
-    return (Occupancy < 4) ? Occupancy : 4;
-  }
+  unsigned getMinAllowedOccupancy(const GCNSubtarget &ST) const;
 
----------------
arsenm wrote:
> nhaehnle wrote:
> > The `ST` argument requirement seems annoying. Wouldn't it make sense for the MachineFunctionInfo to know the underlying MachineFunction, which would allow access to the GCNSubtarget (i.e. most-derived TargetSubtargetInfo)?
> No, I'm actively trying to remove references to the machine function state from MachineFunctionInfo
Why is that? MachineFunctionInfo is explicitly created with the MachineFunction as a constructor argument?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83674





More information about the llvm-commits mailing list