2017-07-22 05:19:23 +08:00
|
|
|
//===--- AMDGPUMachineModuleInfo.cpp ----------------------------*- C++ -*-===//
|
|
|
|
//
|
2019-01-19 16:50:56 +08: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-22 05:19:23 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
/// \file
|
2018-05-01 23:54:18 +08:00
|
|
|
/// AMDGPU Machine Module Info.
|
2017-07-22 05:19:23 +08:00
|
|
|
///
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "AMDGPUMachineModuleInfo.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-26 04:50:21 +08: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-22 05:19:23 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
} // end namespace llvm
|