blob: 4d9f08b3af01db3c020094388d4e909471878ffb [file] [log] [blame]
Inna Palantff3f07a2019-07-11 16:15:26 -07001//===--- AMDGPUMachineModuleInfo.cpp ----------------------------*- C++ -*-===//
2//
Chih-Hung Hsieh43f06942019-12-19 15:01:08 -08003// 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
Inna Palantff3f07a2019-07-11 16:15:26 -07006//
7//===----------------------------------------------------------------------===//
8//
9/// \file
10/// AMDGPU Machine Module Info.
11///
12//
13//===----------------------------------------------------------------------===//
14
15#include "AMDGPUMachineModuleInfo.h"
16#include "llvm/IR/Module.h"
17
18namespace llvm {
19
20AMDGPUMachineModuleInfo::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");
Chih-Hung Hsieh43f06942019-12-19 15:01:08 -080026 SystemOneAddressSpaceSSID =
27 CTX.getOrInsertSyncScopeID("one-as");
28 AgentOneAddressSpaceSSID =
29 CTX.getOrInsertSyncScopeID("agent-one-as");
30 WorkgroupOneAddressSpaceSSID =
31 CTX.getOrInsertSyncScopeID("workgroup-one-as");
32 WavefrontOneAddressSpaceSSID =
33 CTX.getOrInsertSyncScopeID("wavefront-one-as");
34 SingleThreadOneAddressSpaceSSID =
35 CTX.getOrInsertSyncScopeID("singlethread-one-as");
Inna Palantff3f07a2019-07-11 16:15:26 -070036}
37
38} // end namespace llvm