LLVM  10.0.0svn
AMDGPUMachineFunction.h
Go to the documentation of this file.
1 //===-- AMDGPUMachineFunctionInfo.h -------------------------------*- 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 #ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUMACHINEFUNCTION_H
10 #define LLVM_LIB_TARGET_AMDGPU_AMDGPUMACHINEFUNCTION_H
11 
12 #include "llvm/ADT/DenseMap.h"
14 
15 namespace llvm {
16 
17 class GCNSubtarget;
18 
20  /// A map to keep track of local memory objects and their offsets within the
21  /// local memory space.
23 
24 protected:
25  uint64_t ExplicitKernArgSize; // Cache for this.
26  unsigned MaxKernArgAlign; // Cache for this.
27 
28  /// Number of bytes in the LDS that are being used.
29  unsigned LDSSize;
30 
31  // Kernels + shaders. i.e. functions called by the driver and not called
32  // by other functions.
34 
36 
37  // Function may be memory bound.
39 
40  // Kernel may need limited waves per EU for better performance.
42 
43 public:
45 
46  uint64_t getExplicitKernArgSize() const {
47  return ExplicitKernArgSize;
48  }
49 
50  unsigned getMaxKernArgAlign() const {
51  return MaxKernArgAlign;
52  }
53 
54  unsigned getLDSSize() const {
55  return LDSSize;
56  }
57 
58  bool isEntryFunction() const {
59  return IsEntryFunction;
60  }
61 
62  bool hasNoSignedZerosFPMath() const {
63  return NoSignedZerosFPMath;
64  }
65 
66  bool isMemoryBound() const {
67  return MemoryBound;
68  }
69 
70  bool needsWaveLimiter() const {
71  return WaveLimiter;
72  }
73 
74  unsigned allocateLDSGlobal(const DataLayout &DL, const GlobalValue &GV);
75 };
76 
77 }
78 #endif
A parsed version of the target data layout string in and methods for querying it. ...
Definition: DataLayout.h:112
unsigned allocateLDSGlobal(const DataLayout &DL, const GlobalValue &GV)
This class represents lattice values for constants.
Definition: AllocatorList.h:23
AMDGPUMachineFunction(const MachineFunction &MF)
MachineFunctionInfo - This class can be derived from and used by targets to hold private target-speci...
unsigned LDSSize
Number of bytes in the LDS that are being used.