]> granicus.if.org Git - llvm/commitdiff
AMDGPU/SI: Make a function const
authorTom Stellard <thomas.stellard@amd.com>
Tue, 20 Dec 2016 17:26:34 +0000 (17:26 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Tue, 20 Dec 2016 17:26:34 +0000 (17:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290185 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
lib/Target/AMDGPU/SIMachineFunctionInfo.h

index 8b511d4677bddf9a1c184d40706364d808570922..e911817c451d3027ceca7381cd8a08ce260f12c9 100644 (file)
@@ -52,7 +52,6 @@ SIMachineFunctionInfo::SIMachineFunctionInfo(const MachineFunction &MF)
     WavesPerEU(0, 0),
     DebuggerWorkGroupIDStackObjectIndices({{0, 0, 0}}),
     DebuggerWorkItemIDStackObjectIndices({{0, 0, 0}}),
-    ImagePSV(llvm::make_unique<AMDGPUImagePseudoSourceValue>()),
     LDSWaveSpillSize(0),
     PSInputEna(0),
     NumUserSGPRs(0),
index f4c210f1f2c20e04b36f31465f4d442127c5288c..3b4e233cd787d3746e7a0adb6c24381b0941388a 100644 (file)
@@ -122,7 +122,7 @@ class SIMachineFunctionInfo final : public AMDGPUMachineFunction {
   std::array<int, 3> DebuggerWorkItemIDStackObjectIndices;
 
   AMDGPUBufferPseudoSourceValue BufferPSV;
-  std::unique_ptr<AMDGPUImagePseudoSourceValue> ImagePSV;
+  AMDGPUImagePseudoSourceValue ImagePSV;
 
 public:
   // FIXME: Make private
@@ -490,8 +490,8 @@ public:
     return &BufferPSV;
   }
 
-  AMDGPUImagePseudoSourceValue *getImagePSV() {
-    return ImagePSV.get();
+  const AMDGPUImagePseudoSourceValue *getImagePSV() const {
+    return &ImagePSV;
   }
 };