[PATCH] D51148: [RISCV] Fix std::advance slowness
Ana Pazos via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 24 16:15:01 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL340669: [RISCV] Fix std::advance slowness (authored by apazos, committed by ).
Herald added a subscriber: jrtc27.
Changed prior to commit:
https://reviews.llvm.org/D51148?vs=162494&id=162496#toc
Repository:
rL LLVM
https://reviews.llvm.org/D51148
Files:
llvm/trunk/lib/Target/RISCV/RISCVFrameLowering.cpp
Index: llvm/trunk/lib/Target/RISCV/RISCVFrameLowering.cpp
===================================================================
--- llvm/trunk/lib/Target/RISCV/RISCVFrameLowering.cpp
+++ llvm/trunk/lib/Target/RISCV/RISCVFrameLowering.cpp
@@ -148,8 +148,7 @@
// Skip to before the restores of callee-saved registers
// FIXME: assumes exactly one instruction is used to restore each
// callee-saved register.
- MachineBasicBlock::iterator LastFrameDestroy = MBBI;
- std::advance(LastFrameDestroy, -MFI.getCalleeSavedInfo().size());
+ auto LastFrameDestroy = std::prev(MBBI, MFI.getCalleeSavedInfo().size());
uint64_t StackSize = MFI.getStackSize();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51148.162496.patch
Type: text/x-patch
Size: 664 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180824/6a40d4dd/attachment.bin>
More information about the llvm-commits
mailing list