From: Fraser Cormack Date: Wed, 11 May 2022 11:32:24 +0000 (+0100) Subject: [RISCV][NFC] Move variable down closer to its first use X-Git-Tag: upstream/15.0.7~8041 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=874b802a6de106308b54df4268397184b209f610;p=platform%2Fupstream%2Fllvm.git [RISCV][NFC] Move variable down closer to its first use --- diff --git a/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp b/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp index e7673ea..87d13aa 100644 --- a/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp +++ b/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp @@ -854,7 +854,6 @@ void RISCVFrameLowering::determineCalleeSaves(MachineFunction &MF, int64_t RISCVFrameLowering::assignRVVStackObjectOffsets(MachineFrameInfo &MFI) const { - int64_t Offset = 0; // Create a buffer of RVV objects to allocate. SmallVector ObjectsToAllocate; for (int I = 0, E = MFI.getObjectIndexEnd(); I != E; ++I) { @@ -868,6 +867,7 @@ RISCVFrameLowering::assignRVVStackObjectOffsets(MachineFrameInfo &MFI) const { } // Allocate all RVV locals and spills + int64_t Offset = 0; for (int FI : ObjectsToAllocate) { // ObjectSize in bytes. int64_t ObjectSize = MFI.getObjectSize(FI);