[llvm-branch-commits] [llvm] fd0f5fb - PEI: Only call updateLiveness once per function
Matt Arsenault via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Dec 18 08:07:32 PST 2020
Author: Matt Arsenault
Date: 2020-12-18T11:02:28-05:00
New Revision: fd0f5fb8de26230cbb0eeedaef58036ddede4c63
URL: https://github.com/llvm/llvm-project/commit/fd0f5fb8de26230cbb0eeedaef58036ddede4c63
DIFF: https://github.com/llvm/llvm-project/commit/fd0f5fb8de26230cbb0eeedaef58036ddede4c63.diff
LOG: PEI: Only call updateLiveness once per function
This only needs to be called once for the function, and it visits all
the necessary blocks in the function. It looks like
631f6b888c50276450fee8b9ef129f37f83fc5a1 accidentally moved this into
the loop over all save blocks.
Added:
Modified:
llvm/lib/CodeGen/PrologEpilogInserter.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/PrologEpilogInserter.cpp b/llvm/lib/CodeGen/PrologEpilogInserter.cpp
index 9ae155a7b6fb..7c38b193a980 100644
--- a/llvm/lib/CodeGen/PrologEpilogInserter.cpp
+++ b/llvm/lib/CodeGen/PrologEpilogInserter.cpp
@@ -620,12 +620,12 @@ void PEI::spillCalleeSavedRegs(MachineFunction &MF) {
if (!MFI.hasCalls())
NumLeafFuncWithSpills++;
- for (MachineBasicBlock *SaveBlock : SaveBlocks) {
+ for (MachineBasicBlock *SaveBlock : SaveBlocks)
insertCSRSaves(*SaveBlock, CSI);
- // Update the live-in information of all the blocks up to the save
- // point.
- updateLiveness(MF);
- }
+
+ // Update the live-in information of all the blocks up to the save point.
+ updateLiveness(MF);
+
for (MachineBasicBlock *RestoreBlock : RestoreBlocks)
insertCSRRestores(*RestoreBlock, CSI);
}
More information about the llvm-branch-commits
mailing list