mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-16 11:24:39 +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:
@@ -201,15 +201,13 @@ void AMDGPUAsmPrinter::findNumUsedRegistersSI(MachineFunction &MF,
|
|||||||
unsigned numOperands = MI.getNumOperands();
|
unsigned numOperands = MI.getNumOperands();
|
||||||
for (unsigned op_idx = 0; op_idx < numOperands; op_idx++) {
|
for (unsigned op_idx = 0; op_idx < numOperands; op_idx++) {
|
||||||
MachineOperand &MO = MI.getOperand(op_idx);
|
MachineOperand &MO = MI.getOperand(op_idx);
|
||||||
unsigned maxUsed;
|
|
||||||
unsigned width = 0;
|
unsigned width = 0;
|
||||||
bool isSGPR = false;
|
bool isSGPR = false;
|
||||||
unsigned reg;
|
|
||||||
unsigned hwReg;
|
|
||||||
if (!MO.isReg()) {
|
if (!MO.isReg()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
reg = MO.getReg();
|
unsigned reg = MO.getReg();
|
||||||
if (reg == AMDGPU::VCC) {
|
if (reg == AMDGPU::VCC) {
|
||||||
VCCUsed = true;
|
VCCUsed = true;
|
||||||
continue;
|
continue;
|
||||||
@@ -259,8 +257,8 @@ void AMDGPUAsmPrinter::findNumUsedRegistersSI(MachineFunction &MF,
|
|||||||
} else {
|
} else {
|
||||||
llvm_unreachable("Unknown register class");
|
llvm_unreachable("Unknown register class");
|
||||||
}
|
}
|
||||||
hwReg = RI->getEncodingValue(reg) & 0xff;
|
unsigned hwReg = RI->getEncodingValue(reg) & 0xff;
|
||||||
maxUsed = hwReg + width - 1;
|
unsigned maxUsed = hwReg + width - 1;
|
||||||
if (isSGPR) {
|
if (isSGPR) {
|
||||||
MaxSGPR = maxUsed > MaxSGPR ? maxUsed : MaxSGPR;
|
MaxSGPR = maxUsed > MaxSGPR ? maxUsed : MaxSGPR;
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user