LLVM  15.0.0git
AMDGPUMachineModuleInfo.cpp
Go to the documentation of this file.
1 //===--- AMDGPUMachineModuleInfo.cpp ----------------------------*- 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 /// \file
10 /// AMDGPU Machine Module Info.
11 ///
12 //
13 //===----------------------------------------------------------------------===//
14 
16 #include "llvm/MC/MCSymbol.h"
17 
18 namespace llvm {
19 
21  : MachineModuleInfoELF(MMI) {
22  LLVMContext &CTX = MMI.getModule()->getContext();
23  AgentSSID = CTX.getOrInsertSyncScopeID("agent");
24  WorkgroupSSID = CTX.getOrInsertSyncScopeID("workgroup");
25  WavefrontSSID = CTX.getOrInsertSyncScopeID("wavefront");
26  SystemOneAddressSpaceSSID =
27  CTX.getOrInsertSyncScopeID("one-as");
28  AgentOneAddressSpaceSSID =
29  CTX.getOrInsertSyncScopeID("agent-one-as");
30  WorkgroupOneAddressSpaceSSID =
31  CTX.getOrInsertSyncScopeID("workgroup-one-as");
32  WavefrontOneAddressSpaceSSID =
33  CTX.getOrInsertSyncScopeID("wavefront-one-as");
34  SingleThreadOneAddressSpaceSSID =
35  CTX.getOrInsertSyncScopeID("singlethread-one-as");
36 }
37 
38 } // end namespace llvm
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:17
MCSymbol.h
llvm::MachineModuleInfo
This class contains meta information specific to a module.
Definition: MachineModuleInfo.h:75
llvm::LLVMContext::getOrInsertSyncScopeID
SyncScope::ID getOrInsertSyncScopeID(StringRef SSN)
getOrInsertSyncScopeID - Maps synchronization scope name to synchronization scope ID.
Definition: LLVMContext.cpp:305
llvm::LLVMContext
This is an important class for using LLVM in a threaded context.
Definition: LLVMContext.h:68
AMDGPUMachineModuleInfo.h
llvm::AMDGPUMachineModuleInfo::AMDGPUMachineModuleInfo
AMDGPUMachineModuleInfo(const MachineModuleInfo &MMI)
Definition: AMDGPUMachineModuleInfo.cpp:20
llvm::Module::getContext
LLVMContext & getContext() const
Get the global data context.
Definition: Module.h:262
llvm::MachineModuleInfoELF
MachineModuleInfoELF - This is a MachineModuleInfoImpl implementation for ELF targets.
Definition: MachineModuleInfoImpls.h:63
llvm::MachineModuleInfo::getModule
const Module * getModule() const
Definition: MachineModuleInfo.h:151