llvm/lib/Target/AMDGPU/AMDGPUMachineModuleInfo.cpp
Konstantin Zhuravlyov 4c49579c51 AMDGPU: Implement memory model
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308781 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-21 21:19:23 +00:00

30 lines
927 B
C++

//===--- AMDGPUMachineModuleInfo.cpp ----------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
/// \file
/// \brief AMDGPU Machine Module Info.
///
//
//===----------------------------------------------------------------------===//
#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");
}
} // end namespace llvm