[PATCH] D31411: AMDGPU: Use MachineRegisterInfo to find max used register
Konstantin Zhuravlyov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 12 13:27:47 PDT 2017
kzhuravl accepted this revision.
kzhuravl added a comment.
This revision is now accepted and ready to land.
LGTM.
================
Comment at: lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp:420
+ ProgInfo.NumVGPR = NumVGPRReg == AMDGPU::NoRegister ? 0 :
+ (RI->getEncodingValue(NumVGPRReg) & 0xff) + 1;
+ ProgInfo.NumSGPR = NumSGPRReg == AMDGPU::NoRegister ? 0 :
----------------
`RI->getEncodingValue(NumVGPRReg) & 0xff` -> `RI->getHWRegIndex(NumVGPRReg)`?
================
Comment at: lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp:422
+ ProgInfo.NumSGPR = NumSGPRReg == AMDGPU::NoRegister ? 0 :
+ (RI->getEncodingValue(NumSGPRReg) & 0xff) + 1;
unsigned ExtraSGPRs = 0;
----------------
Similar.
https://reviews.llvm.org/D31411
More information about the llvm-commits
mailing list