xref: /llvm-project/llvm/lib/Target/AMDGPU/AMDGPUMachineModuleInfo.cpp (revision 2946cd701067404b99c39fb29dc9c74bd7193eb3)
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 
18 namespace llvm {
19 
20 AMDGPUMachineModuleInfo::AMDGPUMachineModuleInfo(const MachineModuleInfo &MMI)
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 }
27 
28 } // end namespace llvm
29