mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-12 23:40:43 +00:00
Move declaration of variables down to first use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198794 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
54c69e1377
commit
b9271b0ec5
@ -201,15 +201,13 @@ void AMDGPUAsmPrinter::findNumUsedRegistersSI(MachineFunction &MF,
|
||||
unsigned numOperands = MI.getNumOperands();
|
||||
for (unsigned op_idx = 0; op_idx < numOperands; op_idx++) {
|
||||
MachineOperand &MO = MI.getOperand(op_idx);
|
||||
unsigned maxUsed;
|
||||
unsigned width = 0;
|
||||
bool isSGPR = false;
|
||||
unsigned reg;
|
||||
unsigned hwReg;
|
||||
|
||||
if (!MO.isReg()) {
|
||||
continue;
|
||||
}
|
||||
reg = MO.getReg();
|
||||
unsigned reg = MO.getReg();
|
||||
if (reg == AMDGPU::VCC) {
|
||||
VCCUsed = true;
|
||||
continue;
|
||||
@ -259,8 +257,8 @@ void AMDGPUAsmPrinter::findNumUsedRegistersSI(MachineFunction &MF,
|
||||
} else {
|
||||
llvm_unreachable("Unknown register class");
|
||||
}
|
||||
hwReg = RI->getEncodingValue(reg) & 0xff;
|
||||
maxUsed = hwReg + width - 1;
|
||||
unsigned hwReg = RI->getEncodingValue(reg) & 0xff;
|
||||
unsigned maxUsed = hwReg + width - 1;
|
||||
if (isSGPR) {
|
||||
MaxSGPR = maxUsed > MaxSGPR ? maxUsed : MaxSGPR;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user