[llvm] 874b802 - [RISCV][NFC] Move variable down closer to its first use
Fraser Cormack via llvm-commits
llvm-commits at lists.llvm.org
Wed May 11 04:45:29 PDT 2022
Author: Fraser Cormack
Date: 2022-05-11T12:33:01+01:00
New Revision: 874b802a6de106308b54df4268397184b209f610
URL: https://github.com/llvm/llvm-project/commit/874b802a6de106308b54df4268397184b209f610
DIFF: https://github.com/llvm/llvm-project/commit/874b802a6de106308b54df4268397184b209f610.diff
LOG: [RISCV][NFC] Move variable down closer to its first use
Added:
Modified:
llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp b/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
index e7673ea95502..87d13aa6f70e 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<int, 8> 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);
More information about the llvm-commits
mailing list