[llvm] 6b9e102 - [ARM][MachineOutliner] Remove unneeded dynamic allocation.
Yvan Roux via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 4 04:17:04 PDT 2020
Author: Yvan Roux
Date: 2020-06-04T13:12:26+02:00
New Revision: 6b9e1022436336b4ee7fa425f641f1cdcbd8f839
URL: https://github.com/llvm/llvm-project/commit/6b9e1022436336b4ee7fa425f641f1cdcbd8f839
DIFF: https://github.com/llvm/llvm-project/commit/6b9e1022436336b4ee7fa425f641f1cdcbd8f839.diff
LOG: [ARM][MachineOutliner] Remove unneeded dynamic allocation.
Added:
Modified:
llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
index 471a062e8158..6c94697665fb 100644
--- a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
+++ b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
@@ -5649,7 +5649,7 @@ outliner::OutlinedFunction ARMBaseInstrInfo::getOutliningCandidateInfo(
C.setCallInfo(CallID, NumBytesForCall);
};
- auto Costs = std::make_unique<OutlinerCosts>(Subtarget);
+ OutlinerCosts Costs(Subtarget);
unsigned FrameID = 0;
unsigned NumBytesToCreateFrame = 0;
@@ -5657,14 +5657,14 @@ outliner::OutlinedFunction ARMBaseInstrInfo::getOutliningCandidateInfo(
// tail call all of the candidates.
if (RepeatedSequenceLocs[0].back()->isTerminator()) {
FrameID = MachineOutlinerTailCall;
- NumBytesToCreateFrame = Costs->FrameTailCall;
- SetCandidateCallInfo(MachineOutlinerTailCall, Costs->CallTailCall);
+ NumBytesToCreateFrame = Costs.FrameTailCall;
+ SetCandidateCallInfo(MachineOutlinerTailCall, Costs.CallTailCall);
} else if (LastInstrOpcode == ARM::BL || LastInstrOpcode == ARM::BLX ||
LastInstrOpcode == ARM::tBL || LastInstrOpcode == ARM::tBLXr ||
LastInstrOpcode == ARM::tBLXi) {
FrameID = MachineOutlinerThunk;
- NumBytesToCreateFrame = Costs->FrameThunk;
- SetCandidateCallInfo(MachineOutlinerThunk, Costs->CallThunk);
+ NumBytesToCreateFrame = Costs.FrameThunk;
+ SetCandidateCallInfo(MachineOutlinerThunk, Costs.CallThunk);
} else
return outliner::OutlinedFunction();
More information about the llvm-commits
mailing list