2017-07-21 23:19:23 +02:00
|
|
|
//===--- AMDGPUMachineModuleInfo.cpp ----------------------------*- C++ -*-===//
|
|
|
|
//
|
2019-01-19 09:50:56 +01:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2017-07-21 23:19:23 +02:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
/// \file
|
2018-05-01 17:54:18 +02:00
|
|
|
/// AMDGPU Machine Module Info.
|
2017-07-21 23:19:23 +02:00
|
|
|
///
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "AMDGPUMachineModuleInfo.h"
|
|
|
|
#include "llvm/IR/Module.h"
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
|
|
|
AMDGPUMachineModuleInfo::AMDGPUMachineModuleInfo(const MachineModuleInfo &MMI)
|
|
|
|
: MachineModuleInfoELF(MMI) {
|
|
|
|
LLVMContext &CTX = MMI.getModule()->getContext();
|
|
|
|
AgentSSID = CTX.getOrInsertSyncScopeID("agent");
|
|
|
|
WorkgroupSSID = CTX.getOrInsertSyncScopeID("workgroup");
|
|
|
|
WavefrontSSID = CTX.getOrInsertSyncScopeID("wavefront");
|
2019-03-25 21:50:21 +01:00
|
|
|
SystemOneAddressSpaceSSID =
|
|
|
|
CTX.getOrInsertSyncScopeID("one-as");
|
|
|
|
AgentOneAddressSpaceSSID =
|
|
|
|
CTX.getOrInsertSyncScopeID("agent-one-as");
|
|
|
|
WorkgroupOneAddressSpaceSSID =
|
|
|
|
CTX.getOrInsertSyncScopeID("workgroup-one-as");
|
|
|
|
WavefrontOneAddressSpaceSSID =
|
|
|
|
CTX.getOrInsertSyncScopeID("wavefront-one-as");
|
|
|
|
SingleThreadOneAddressSpaceSSID =
|
|
|
|
CTX.getOrInsertSyncScopeID("singlethread-one-as");
|
2017-07-21 23:19:23 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
} // end namespace llvm
|