LLVM
20.0.0git
lib
Target
AMDGPU
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
15
#include "
AMDGPUMachineModuleInfo.h
"
16
#include "
llvm/IR/Module.h
"
17
#include "
llvm/MC/MCSymbol.h
"
18
19
namespace
llvm
{
20
21
AMDGPUMachineModuleInfo::AMDGPUMachineModuleInfo
(
const
MachineModuleInfo
&MMI)
22
:
MachineModuleInfoELF
(MMI) {
23
LLVMContext
&CTX = MMI.
getModule
()->
getContext
();
24
AgentSSID = CTX.
getOrInsertSyncScopeID
(
"agent"
);
25
WorkgroupSSID = CTX.
getOrInsertSyncScopeID
(
"workgroup"
);
26
WavefrontSSID = CTX.
getOrInsertSyncScopeID
(
"wavefront"
);
27
SystemOneAddressSpaceSSID =
28
CTX.
getOrInsertSyncScopeID
(
"one-as"
);
29
AgentOneAddressSpaceSSID =
30
CTX.
getOrInsertSyncScopeID
(
"agent-one-as"
);
31
WorkgroupOneAddressSpaceSSID =
32
CTX.
getOrInsertSyncScopeID
(
"workgroup-one-as"
);
33
WavefrontOneAddressSpaceSSID =
34
CTX.
getOrInsertSyncScopeID
(
"wavefront-one-as"
);
35
SingleThreadOneAddressSpaceSSID =
36
CTX.
getOrInsertSyncScopeID
(
"singlethread-one-as"
);
37
}
38
39
}
// end namespace llvm
AMDGPUMachineModuleInfo.h
AMDGPU Machine Module Info.
MCSymbol.h
Module.h
Module.h This file contains the declarations for the Module class.
llvm::AMDGPUMachineModuleInfo::AMDGPUMachineModuleInfo
AMDGPUMachineModuleInfo(const MachineModuleInfo &MMI)
Definition:
AMDGPUMachineModuleInfo.cpp:21
llvm::LLVMContext
This is an important class for using LLVM in a threaded context.
Definition:
LLVMContext.h:67
llvm::LLVMContext::getOrInsertSyncScopeID
SyncScope::ID getOrInsertSyncScopeID(StringRef SSN)
getOrInsertSyncScopeID - Maps synchronization scope name to synchronization scope ID.
Definition:
LLVMContext.cpp:325
llvm::MachineModuleInfoELF
MachineModuleInfoELF - This is a MachineModuleInfoImpl implementation for ELF targets.
Definition:
MachineModuleInfoImpls.h:77
llvm::MachineModuleInfo
This class contains meta information specific to a module.
Definition:
MachineModuleInfo.h:82
llvm::MachineModuleInfo::getModule
const Module * getModule() const
Definition:
MachineModuleInfo.h:133
llvm::Module::getContext
LLVMContext & getContext() const
Get the global data context.
Definition:
Module.h:299
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition:
AddressRanges.h:18
Generated on Wed Nov 20 2024 07:49:39 for LLVM by
1.9.6