diff options
author | Eugene Zelenko <eugene.zelenko@gmail.com> | 2017-07-26 23:20:35 +0000 |
---|---|---|
committer | Eugene Zelenko <eugene.zelenko@gmail.com> | 2017-07-26 23:20:35 +0000 |
commit | e4fc6ee790009a1486af2ec1c0ee4f55d1ef6a26 (patch) | |
tree | 671c1eb69f6a406a0a30ede46e652989f166f8b6 /llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp | |
parent | 08e38d6b3d89bd04a41c1a0518ef8e7217a72b38 (diff) | |
download | bcm5719-llvm-e4fc6ee790009a1486af2ec1c0ee4f55d1ef6a26.tar.gz bcm5719-llvm-e4fc6ee790009a1486af2ec1c0ee4f55d1ef6a26.zip |
[Hexagon] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 309230
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; |