diff options
author | Konstantin Zhuravlyov <kzhuravl_dev@outlook.com> | 2017-03-22 23:27:09 +0000 |
---|---|---|
committer | Konstantin Zhuravlyov <kzhuravl_dev@outlook.com> | 2017-03-22 23:27:09 +0000 |
commit | 4cbb68959b793136a6eb333312fb0b7eb1d3f32b (patch) | |
tree | 8bc5161a79868d3545e0bfb1ec2eb05cbfe3ac1f /llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUCodeObjectMetadataStreamer.cpp | |
parent | ee66d6e18e672937275e3d9d1eeb91cb9eec853e (diff) | |
download | bcm5719-llvm-4cbb68959b793136a6eb333312fb0b7eb1d3f32b.tar.gz bcm5719-llvm-4cbb68959b793136a6eb333312fb0b7eb1d3f32b.zip |
[AMDGPU] Do not emit isa info as code object metadata
- It was decided to expose this information through other means (rocr)
Differential Revision: https://reviews.llvm.org/D30970
llvm-svn: 298560
Diffstat (limited to 'llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUCodeObjectMetadataStreamer.cpp')
-rw-r--r-- | llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUCodeObjectMetadataStreamer.cpp | 43 |
1 files changed, 2 insertions, 41 deletions
diff --git a/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUCodeObjectMetadataStreamer.cpp b/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUCodeObjectMetadataStreamer.cpp index 29f36028328..2c71d706dd4 100644 --- a/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUCodeObjectMetadataStreamer.cpp +++ b/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUCodeObjectMetadataStreamer.cpp @@ -15,7 +15,6 @@ #include "AMDGPU.h" #include "AMDGPUCodeObjectMetadataStreamer.h" -#include "Utils/AMDGPUBaseInfo.h" #include "llvm/ADT/StringSwitch.h" #include "llvm/IR/Constants.h" #include "llvm/IR/Module.h" @@ -23,7 +22,6 @@ using namespace llvm::AMDGPU; using namespace llvm::AMDGPU::CodeObject; -using namespace llvm::AMDGPU::IsaInfo; LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR(uint32_t) LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR(std::string) @@ -103,23 +101,6 @@ struct ScalarEnumerationTraits<ValueType> { }; template <> -struct MappingTraits<Isa::Metadata> { - static void mapping(IO &YIO, Isa::Metadata &MD) { - YIO.mapRequired(Isa::Key::WavefrontSize, MD.mWavefrontSize); - YIO.mapRequired(Isa::Key::LocalMemorySize, MD.mLocalMemorySize); - YIO.mapRequired(Isa::Key::EUsPerCU, MD.mEUsPerCU); - YIO.mapRequired(Isa::Key::MaxWavesPerEU, MD.mMaxWavesPerEU); - YIO.mapRequired(Isa::Key::MaxFlatWorkGroupSize, MD.mMaxFlatWorkGroupSize); - YIO.mapRequired(Isa::Key::SGPRAllocGranule, MD.mSGPRAllocGranule); - YIO.mapRequired(Isa::Key::TotalNumSGPRs, MD.mTotalNumSGPRs); - YIO.mapRequired(Isa::Key::AddressableNumSGPRs, MD.mAddressableNumSGPRs); - YIO.mapRequired(Isa::Key::VGPRAllocGranule, MD.mVGPRAllocGranule); - YIO.mapRequired(Isa::Key::TotalNumVGPRs, MD.mTotalNumVGPRs); - YIO.mapRequired(Isa::Key::AddressableNumVGPRs, MD.mAddressableNumVGPRs); - } -}; - -template <> struct MappingTraits<Kernel::Attrs::Metadata> { static void mapping(IO &YIO, Kernel::Attrs::Metadata &MD) { YIO.mapOptional(Kernel::Attrs::Key::ReqdWorkGroupSize, @@ -215,7 +196,6 @@ template <> struct MappingTraits<CodeObject::Metadata> { static void mapping(IO &YIO, CodeObject::Metadata &MD) { YIO.mapRequired(Key::Version, MD.mVersion); - YIO.mapOptional(Key::Isa, MD.mIsa); YIO.mapOptional(Key::Printf, MD.mPrintf, std::vector<std::string>()); if (!MD.mKernels.empty() || !YIO.outputting()) YIO.mapOptional(Key::Kernels, MD.mKernels); @@ -417,22 +397,6 @@ void MetadataStreamer::emitVersion() { Version.push_back(MetadataVersionMinor); } -void MetadataStreamer::emitIsa(const FeatureBitset &Features) { - auto &Isa = CodeObjectMetadata.mIsa; - - Isa.mWavefrontSize = getWavefrontSize(Features); - Isa.mLocalMemorySize = getLocalMemorySize(Features); - Isa.mEUsPerCU = getEUsPerCU(Features); - Isa.mMaxWavesPerEU = getMaxWavesPerEU(Features); - Isa.mMaxFlatWorkGroupSize = getMaxFlatWorkGroupSize(Features); - Isa.mSGPRAllocGranule = getSGPRAllocGranule(Features); - Isa.mTotalNumSGPRs = getTotalNumSGPRs(Features); - Isa.mAddressableNumSGPRs = getAddressableNumSGPRs(Features); - Isa.mVGPRAllocGranule = getVGPRAllocGranule(Features); - Isa.mTotalNumVGPRs = getTotalNumVGPRs(Features); - Isa.mAddressableNumVGPRs = getAddressableNumVGPRs(Features); -} - void MetadataStreamer::emitPrintf(const Module &Mod) { auto &Printf = CodeObjectMetadata.mPrintf; @@ -611,9 +575,8 @@ void MetadataStreamer::emitKernelDebugProps( KernelCode.debug_wavefront_private_segment_offset_sgpr; } -void MetadataStreamer::begin(const FeatureBitset &Features, const Module &Mod) { +void MetadataStreamer::begin(const Module &Mod) { emitVersion(); - emitIsa(Features); emitPrintf(Mod); } @@ -646,12 +609,10 @@ ErrorOr<std::string> MetadataStreamer::toYamlString() { return YamlString; } -ErrorOr<std::string> MetadataStreamer::toYamlString( - const FeatureBitset &Features, StringRef YamlString) { +ErrorOr<std::string> MetadataStreamer::toYamlString(StringRef YamlString) { if (auto Error = Metadata::fromYamlString(YamlString, CodeObjectMetadata)) return Error; - emitIsa(Features); return toYamlString(); } |