xref: /netbsd-src/external/apache2/llvm/dist/llvm/lib/Target/AMDGPU/Utils/AMDGPULDSUtils.h (revision 82d56013d7b633d116a93943de88e08335357a7c)
1 //===- AMDGPULDSUtils.h - LDS related helper functions -*- C++ -*----------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // AMDGPU LDS related helper utility functions.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_LIB_TARGET_AMDGPU_UTILS_AMDGPULDSUTILS_H
14 #define LLVM_LIB_TARGET_AMDGPU_UTILS_AMDGPULDSUTILS_H
15 
16 #include "AMDGPU.h"
17 
18 namespace llvm {
19 
20 namespace AMDGPU {
21 
22 bool isKernelCC(Function *Func);
23 
24 Align getAlign(DataLayout const &DL, const GlobalVariable *GV);
25 
26 bool userRequiresLowering(const SmallPtrSetImpl<GlobalValue *> &UsedList,
27                           User *InitialUser);
28 
29 std::vector<GlobalVariable *>
30 findVariablesToLower(Module &M, const SmallPtrSetImpl<GlobalValue *> &UsedList);
31 
32 SmallPtrSet<GlobalValue *, 32> getUsedList(Module &M);
33 
34 } // end namespace AMDGPU
35 
36 } // end namespace llvm
37 
38 #endif // LLVM_LIB_TARGET_AMDGPU_UTILS_AMDGPULDSUTILS_H
39