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 17 namespace llvm { 18 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"); 35 } 36 37 } // end namespace llvm 38