[llvm] ce76d15 - AMDGPU: Use MCRegister for preloaded arguments

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 20 10:34:35 PDT 2020


Author: Matt Arsenault
Date: 2020-07-20T13:34:28-04:00
New Revision: ce76d15a70d036f4a307a41b91b5051ff492b2e9

URL: https://github.com/llvm/llvm-project/commit/ce76d15a70d036f4a307a41b91b5051ff492b2e9
DIFF: https://github.com/llvm/llvm-project/commit/ce76d15a70d036f4a307a41b91b5051ff492b2e9.diff

LOG: AMDGPU: Use MCRegister for preloaded arguments

Attempt to fix build error with ancient GCC

Added: 
    

Modified: 
    llvm/lib/Target/AMDGPU/AMDGPUArgumentUsageInfo.h
    llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AMDGPU/AMDGPUArgumentUsageInfo.h b/llvm/lib/Target/AMDGPU/AMDGPUArgumentUsageInfo.h
index 576e6cfe929e..22d29a2c9935 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUArgumentUsageInfo.h
+++ b/llvm/lib/Target/AMDGPU/AMDGPUArgumentUsageInfo.h
@@ -27,7 +27,7 @@ struct ArgDescriptor {
   friend class AMDGPUArgumentUsageInfo;
 
   union {
-    Register Reg;
+    MCRegister Reg;
     unsigned StackOffset;
   };
 
@@ -69,7 +69,7 @@ struct ArgDescriptor {
     return !IsStack;
   }
 
-  Register getRegister() const {
+  MCRegister getRegister() const {
     assert(!IsStack);
     return Reg;
   }

diff  --git a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h
index cf1629fda0af..57a89d9acc81 100644
--- a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h
+++ b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h
@@ -684,9 +684,9 @@ class SIMachineFunctionInfo final : public AMDGPUMachineFunction {
     return ArgInfo.getPreloadedValue(Value);
   }
 
-  Register getPreloadedReg(AMDGPUFunctionArgInfo::PreloadedValue Value) const {
+  MCRegister getPreloadedReg(AMDGPUFunctionArgInfo::PreloadedValue Value) const {
     auto Arg = std::get<0>(ArgInfo.getPreloadedValue(Value));
-    return Arg ? Arg->getRegister() : Register();
+    return Arg ? Arg->getRegister() : MCRegister();
   }
 
   unsigned getGITPtrHigh() const {


        


More information about the llvm-commits mailing list