1 //===--- AMDGPUMachineModuleInfo.cpp ----------------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
10 /// AMDGPU Machine Module Info.
13 //===----------------------------------------------------------------------===//
15 #include "AMDGPUMachineModuleInfo.h"
19 AMDGPUMachineModuleInfo::AMDGPUMachineModuleInfo(const MachineModuleInfo
&MMI
)
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");
37 } // end namespace llvm