[PATCH] D91516: [AMDGPU][WIP] Lower Function Local LDS Variables.

Mahesha S via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 22 20:01:54 PST 2021


hsmhsm updated this revision to Diff 318723.
hsmhsm added a comment.

Build all the required data structures which will be later used to lower function local LDS. Below are the data structures being built.

[1] `Kernel Set` - Holds all the kernels in the module
[2] `Function Local LDS Set` - Holds all the function local LDS from all functions
[3] `Function Address Taken Set` - Holds all the functions whose address is taken within the module

[4] `LDS to Function Map` - Maps each function local LDS to a function within which the LDS is defined
[5] `Function to LDS Map` - Reverse of above map, which maps each functon F to a SET of LDS which are defined within F

[6] `Kernel to Callee Map` - Maps each kernel K to a SET of functions which define LDS and there exists call graph path from K to these functions.
[7] `Kernel to LDS` - Maps each kernel K to a set of function local LDS which are supposed to lowered w.r.t K.

Data structures [1], [2], [3] are built by iterating over the globals and functions defined within the module.
Data structures [4] and [5] are built using BOTTOM-UP based on the use list of function local LDS.
Data structures [6] and [7] are built using TOP-DOWN via call graph traversal.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91516

Files:
  llvm/lib/Target/AMDGPU/AMDGPU.h
  llvm/lib/Target/AMDGPU/AMDGPUAlwaysInlinePass.cpp
  llvm/lib/Target/AMDGPU/AMDGPULowerFunctionLocalLDS.cpp
  llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
  llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.h
  llvm/lib/Target/AMDGPU/CMakeLists.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91516.318723.patch
Type: text/x-patch
Size: 25496 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210123/a41a9491/attachment-0001.bin>


More information about the llvm-commits mailing list