diff options
Diffstat (limited to 'llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp')
-rw-r--r-- | llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp b/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp index e5e75198b2d..f8da40a7bc3 100644 --- a/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp +++ b/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp @@ -1,4 +1,4 @@ -//===-- HexagonFrameLowering.cpp - Define frame lowering ------------------===// +//===- HexagonFrameLowering.cpp - Define frame lowering -------------------===// // // The LLVM Compiler Infrastructure // @@ -38,6 +38,7 @@ #include "llvm/CodeGen/MachinePostDominators.h" #include "llvm/CodeGen/MachineRegisterInfo.h" #include "llvm/CodeGen/RegisterScavenging.h" +#include "llvm/IR/Attributes.h" #include "llvm/IR/DebugLoc.h" #include "llvm/IR/Function.h" #include "llvm/MC/MCDwarf.h" @@ -45,11 +46,13 @@ #include "llvm/Pass.h" #include "llvm/Support/CodeGen.h" #include "llvm/Support/CommandLine.h" +#include "llvm/Support/Compiler.h" #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/MathExtras.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Target/TargetMachine.h" +#include "llvm/Target/TargetOptions.h" #include "llvm/Target/TargetRegisterInfo.h" #include <algorithm> #include <cassert> @@ -57,7 +60,6 @@ #include <iterator> #include <limits> #include <map> -#include <new> #include <utility> #include <vector> @@ -406,9 +408,10 @@ void HexagonFrameLowering::findShrunkPrologEpilog(MachineFunction &MF, MachinePostDominatorTree MPT; MPT.runOnMachineFunction(MF); - typedef DenseMap<unsigned,unsigned> UnsignedMap; + using UnsignedMap = DenseMap<unsigned, unsigned>; + using RPOTType = ReversePostOrderTraversal<const MachineFunction *>; + UnsignedMap RPO; - typedef ReversePostOrderTraversal<const MachineFunction*> RPOTType; RPOTType RPOT(&MF); unsigned RPON = 0; for (RPOTType::rpo_iterator I = RPOT.begin(), E = RPOT.end(); I != E; ++I) @@ -1452,7 +1455,8 @@ bool HexagonFrameLowering::assignCalleeSavedSpillSlots(MachineFunction &MF, // object for it. CSI.clear(); - typedef TargetFrameLowering::SpillSlot SpillSlot; + using SpillSlot = TargetFrameLowering::SpillSlot; + unsigned NumFixed; int MinOffset = 0; // CS offsets are negative. const SpillSlot *FixedSlots = getCalleeSavedSpillSlots(NumFixed); @@ -2019,11 +2023,11 @@ void HexagonFrameLowering::optimizeSpillSlots(MachineFunction &MF, auto &MRI = MF.getRegInfo(); HexagonBlockRanges HBR(MF); - typedef std::map<MachineBasicBlock*,HexagonBlockRanges::InstrIndexMap> - BlockIndexMap; - typedef std::map<MachineBasicBlock*,HexagonBlockRanges::RangeList> - BlockRangeMap; - typedef HexagonBlockRanges::IndexType IndexType; + using BlockIndexMap = + std::map<MachineBasicBlock *, HexagonBlockRanges::InstrIndexMap>; + using BlockRangeMap = + std::map<MachineBasicBlock *, HexagonBlockRanges::RangeList>; + using IndexType = HexagonBlockRanges::IndexType; struct SlotInfo { BlockRangeMap Map; |