LLVM  10.0.0
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 #include "Utils/AMDGPUBaseInfo.h"
15 
16 namespace llvm {
17 
18 class GCNSubtarget;
19 
21  /// A map to keep track of local memory objects and their offsets within the
22  /// local memory space.
24 
25 protected:
26  uint64_t ExplicitKernArgSize; // Cache for this.
27  Align MaxKernArgAlign; // Cache for this.
28 
29  /// Number of bytes in the LDS that are being used.
30  unsigned LDSSize;
31 
32  // State of MODE register, assumed FP mode.
34 
35  // Kernels + shaders. i.e. functions called by the driver and not called
36  // by other functions.
38 
40 
41  // Function may be memory bound.
43 
44  // Kernel may need limited waves per EU for better performance.
46 
47 public:
49 
50  uint64_t getExplicitKernArgSize() const {
51  return ExplicitKernArgSize;
52  }
53 
54  unsigned getMaxKernArgAlign() const { return MaxKernArgAlign.value(); }
55 
56  unsigned getLDSSize() const {
57  return LDSSize;
58  }
59 
61  return Mode;
62  }
63 
64  bool isEntryFunction() const {
65  return IsEntryFunction;
66  }
67 
68  bool hasNoSignedZerosFPMath() const {
69  return NoSignedZerosFPMath;
70  }
71 
72  bool isMemoryBound() const {
73  return MemoryBound;
74  }
75 
76  bool needsWaveLimiter() const {
77  return WaveLimiter;
78  }
79 
80  unsigned allocateLDSGlobal(const DataLayout &DL, const GlobalValue &GV);
81 };
82 
83 }
84 #endif
A parsed version of the target data layout string in and methods for querying it. ...
Definition: DataLayout.h:111
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...
uint64_t value() const
This is a hole in the type system and should not be abused.
Definition: Alignment.h:86
AMDGPU::SIModeRegisterDefaults getMode() const
AMDGPU::SIModeRegisterDefaults Mode
This struct is a compact representation of a valid (non-zero power of two) alignment.
Definition: Alignment.h:40
unsigned LDSSize
Number of bytes in the LDS that are being used.