LLVM  14.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 
17 namespace llvm {
18 
20  : MachineModuleInfoELF(MMI) {
21  LLVMContext &CTX = MMI.getModule()->getContext();
22  AgentSSID = CTX.getOrInsertSyncScopeID("agent");
23  WorkgroupSSID = CTX.getOrInsertSyncScopeID("workgroup");
24  WavefrontSSID = CTX.getOrInsertSyncScopeID("wavefront");
25  SystemOneAddressSpaceSSID =
26  CTX.getOrInsertSyncScopeID("one-as");
27  AgentOneAddressSpaceSSID =
28  CTX.getOrInsertSyncScopeID("agent-one-as");
29  WorkgroupOneAddressSpaceSSID =
30  CTX.getOrInsertSyncScopeID("workgroup-one-as");
31  WavefrontOneAddressSpaceSSID =
32  CTX.getOrInsertSyncScopeID("wavefront-one-as");
33  SingleThreadOneAddressSpaceSSID =
34  CTX.getOrInsertSyncScopeID("singlethread-one-as");
35 }
36 
37 } // end namespace llvm
llvm
This file implements support for optimizing divisions by a constant.
Definition: AllocatorList.h:23
llvm::MachineModuleInfo
This class contains meta information specific to a module.
Definition: MachineModuleInfo.h:78
llvm::LLVMContext::getOrInsertSyncScopeID
SyncScope::ID getOrInsertSyncScopeID(StringRef SSN)
getOrInsertSyncScopeID - Maps synchronization scope name to synchronization scope ID.
Definition: LLVMContext.cpp:290
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:19
llvm::Module::getContext
LLVMContext & getContext() const
Get the global data context.
Definition: Module.h:261
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:174