[llvm] r294454 - [AMDGPU][NFC] Assign IsaInfo to reference variable in order to shorten long lines

Konstantin Zhuravlyov via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 8 06:34:10 PST 2017


Author: kzhuravl
Date: Wed Feb  8 08:34:10 2017
New Revision: 294454

URL: http://llvm.org/viewvc/llvm-project?rev=294454&view=rev
Log:
[AMDGPU][NFC] Assign IsaInfo to reference variable in order to shorten long lines

Modified:
    llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPURuntimeMD.cpp

Modified: llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPURuntimeMD.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPURuntimeMD.cpp?rev=294454&r1=294453&r2=294454&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPURuntimeMD.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPURuntimeMD.cpp Wed Feb  8 08:34:10 2017
@@ -410,22 +410,19 @@ std::string llvm::getRuntimeMDYAMLString
   Program::Metadata Prog;
   Prog.MDVersionSeq.push_back(MDVersion);
   Prog.MDVersionSeq.push_back(MDRevision);
-  Prog.IsaInfo.WavefrontSize = AMDGPU::IsaInfo::getWavefrontSize(Features);
-  Prog.IsaInfo.LocalMemorySize = AMDGPU::IsaInfo::getLocalMemorySize(Features);
-  Prog.IsaInfo.EUsPerCU = AMDGPU::IsaInfo::getEUsPerCU(Features);
-  Prog.IsaInfo.MaxWavesPerEU = AMDGPU::IsaInfo::getMaxWavesPerEU(Features);
-  Prog.IsaInfo.MaxFlatWorkGroupSize =
-      AMDGPU::IsaInfo::getMaxFlatWorkGroupSize(Features);
-  Prog.IsaInfo.SGPRAllocGranule =
-      AMDGPU::IsaInfo::getSGPRAllocGranule(Features);
-  Prog.IsaInfo.TotalNumSGPRs = AMDGPU::IsaInfo::getTotalNumSGPRs(Features);
-  Prog.IsaInfo.AddressableNumSGPRs =
-      AMDGPU::IsaInfo::getAddressableNumSGPRs(Features);
-  Prog.IsaInfo.VGPRAllocGranule =
-      AMDGPU::IsaInfo::getVGPRAllocGranule(Features);
-  Prog.IsaInfo.TotalNumVGPRs = AMDGPU::IsaInfo::getTotalNumVGPRs(Features);
-  Prog.IsaInfo.AddressableNumVGPRs =
-      AMDGPU::IsaInfo::getAddressableNumVGPRs(Features);
+
+  IsaInfo::Metadata &IIM = Prog.IsaInfo;
+  IIM.WavefrontSize = AMDGPU::IsaInfo::getWavefrontSize(Features);
+  IIM.LocalMemorySize = AMDGPU::IsaInfo::getLocalMemorySize(Features);
+  IIM.EUsPerCU = AMDGPU::IsaInfo::getEUsPerCU(Features);
+  IIM.MaxWavesPerEU = AMDGPU::IsaInfo::getMaxWavesPerEU(Features);
+  IIM.MaxFlatWorkGroupSize = AMDGPU::IsaInfo::getMaxFlatWorkGroupSize(Features);
+  IIM.SGPRAllocGranule = AMDGPU::IsaInfo::getSGPRAllocGranule(Features);
+  IIM.TotalNumSGPRs = AMDGPU::IsaInfo::getTotalNumSGPRs(Features);
+  IIM.AddressableNumSGPRs = AMDGPU::IsaInfo::getAddressableNumSGPRs(Features);
+  IIM.VGPRAllocGranule = AMDGPU::IsaInfo::getVGPRAllocGranule(Features);
+  IIM.TotalNumVGPRs = AMDGPU::IsaInfo::getTotalNumVGPRs(Features);
+  IIM.AddressableNumVGPRs = AMDGPU::IsaInfo::getAddressableNumVGPRs(Features);
 
   // Set PrintfInfo.
   if (auto MD = M.getNamedMetadata("llvm.printf.fmts")) {




More information about the llvm-commits mailing list