LLVM 22.0.0git
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
16#include "llvm/IR/Module.h"
17
18using namespace llvm;
19
22 LLVMContext &CTX = MMI.getModule()->getContext();
23 AgentSSID = CTX.getOrInsertSyncScopeID("agent");
24 WorkgroupSSID = CTX.getOrInsertSyncScopeID("workgroup");
25 WavefrontSSID = CTX.getOrInsertSyncScopeID("wavefront");
26 ClusterSSID = CTX.getOrInsertSyncScopeID("cluster");
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 ClusterOneAddressSpaceSSID = CTX.getOrInsertSyncScopeID("cluster-one-as");
38}
AMDGPU Machine Module Info.
Module.h This file contains the declarations for the Module class.
AMDGPUMachineModuleInfo(const MachineModuleInfo &MMI)
This is an important class for using LLVM in a threaded context.
Definition LLVMContext.h:68
LLVM_ABI SyncScope::ID getOrInsertSyncScopeID(StringRef SSN)
getOrInsertSyncScopeID - Maps synchronization scope name to synchronization scope ID.
MachineModuleInfoELF(const MachineModuleInfo &)
This class contains meta information specific to a module.
const Module * getModule() const
This is an optimization pass for GlobalISel generic memory operations.