diff options
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/IfConversion.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/CodeGen/LiveDebugVariables.cpp | 7 | ||||
-rw-r--r-- | llvm/lib/CodeGen/MachineInstrBundle.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h | 10 | ||||
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h | 18 |
5 files changed, 25 insertions, 16 deletions
diff --git a/llvm/lib/CodeGen/IfConversion.cpp b/llvm/lib/CodeGen/IfConversion.cpp index 319c4f5b995..c2586b5bf8c 100644 --- a/llvm/lib/CodeGen/IfConversion.cpp +++ b/llvm/lib/CodeGen/IfConversion.cpp @@ -34,6 +34,7 @@ #include "llvm/Target/TargetRegisterInfo.h" #include "llvm/Target/TargetSubtargetInfo.h" #include <algorithm> +#include <utility> using namespace llvm; @@ -177,7 +178,7 @@ namespace { public: static char ID; IfConverter(std::function<bool(const Function &)> Ftor = nullptr) - : MachineFunctionPass(ID), FnNum(-1), PredicateFtor(Ftor) { + : MachineFunctionPass(ID), FnNum(-1), PredicateFtor(std::move(Ftor)) { initializeIfConverterPass(*PassRegistry::getPassRegistry()); } diff --git a/llvm/lib/CodeGen/LiveDebugVariables.cpp b/llvm/lib/CodeGen/LiveDebugVariables.cpp index c95077718aa..c73db0d7e2e 100644 --- a/llvm/lib/CodeGen/LiveDebugVariables.cpp +++ b/llvm/lib/CodeGen/LiveDebugVariables.cpp @@ -42,6 +42,7 @@ #include "llvm/Target/TargetRegisterInfo.h" #include "llvm/Target/TargetSubtargetInfo.h" #include <memory> +#include <utility> using namespace llvm; @@ -84,7 +85,7 @@ class UserValueScopes { SmallPtrSet<const MachineBasicBlock *, 4> LBlocks; public: - UserValueScopes(DebugLoc D, LexicalScopes &L) : DL(D), LS(L) {} + UserValueScopes(DebugLoc D, LexicalScopes &L) : DL(std::move(D)), LS(L) {} /// dominates - Return true if current scope dominates at least one machine /// instruction in a given machine basic block. @@ -141,8 +142,8 @@ public: /// UserValue - Create a new UserValue. UserValue(const MDNode *var, const MDNode *expr, unsigned o, bool i, DebugLoc L, LocMap::Allocator &alloc) - : Variable(var), Expression(expr), offset(o), IsIndirect(i), dl(L), - leader(this), next(nullptr), locInts(alloc) {} + : Variable(var), Expression(expr), offset(o), IsIndirect(i), + dl(std::move(L)), leader(this), next(nullptr), locInts(alloc) {} /// getLeader - Get the leader of this value's equivalence class. UserValue *getLeader() { diff --git a/llvm/lib/CodeGen/MachineInstrBundle.cpp b/llvm/lib/CodeGen/MachineInstrBundle.cpp index 985a08631b9..cbfbf1d1205 100644 --- a/llvm/lib/CodeGen/MachineInstrBundle.cpp +++ b/llvm/lib/CodeGen/MachineInstrBundle.cpp @@ -17,6 +17,7 @@ #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetRegisterInfo.h" #include "llvm/Target/TargetSubtargetInfo.h" +#include <utility> using namespace llvm; namespace { @@ -24,7 +25,7 @@ namespace { public: static char ID; // Pass identification UnpackMachineBundles(std::function<bool(const Function &)> Ftor = nullptr) - : MachineFunctionPass(ID), PredicateFtor(Ftor) { + : MachineFunctionPass(ID), PredicateFtor(std::move(Ftor)) { initializeUnpackMachineBundlesPass(*PassRegistry::getPassRegistry()); } diff --git a/llvm/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h b/llvm/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h index d4756f7f416..237d541b4cb 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h +++ b/llvm/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h @@ -16,6 +16,7 @@ #include "llvm/IR/DebugLoc.h" #include "llvm/Support/DataTypes.h" +#include <utility> namespace llvm { @@ -55,7 +56,8 @@ public: // Constructor for non-constants. SDDbgValue(MDNode *Var, MDNode *Expr, SDNode *N, unsigned R, bool indir, uint64_t off, DebugLoc dl, unsigned O) - : Var(Var), Expr(Expr), Offset(off), DL(dl), Order(O), IsIndirect(indir) { + : Var(Var), Expr(Expr), Offset(off), DL(std::move(dl)), Order(O), + IsIndirect(indir) { kind = SDNODE; u.s.Node = N; u.s.ResNo = R; @@ -64,7 +66,8 @@ public: // Constructor for constants. SDDbgValue(MDNode *Var, MDNode *Expr, const Value *C, uint64_t off, DebugLoc dl, unsigned O) - : Var(Var), Expr(Expr), Offset(off), DL(dl), Order(O), IsIndirect(false) { + : Var(Var), Expr(Expr), Offset(off), DL(std::move(dl)), Order(O), + IsIndirect(false) { kind = CONST; u.Const = C; } @@ -72,7 +75,8 @@ public: // Constructor for frame indices. SDDbgValue(MDNode *Var, MDNode *Expr, unsigned FI, uint64_t off, DebugLoc dl, unsigned O) - : Var(Var), Expr(Expr), Offset(off), DL(dl), Order(O), IsIndirect(false) { + : Var(Var), Expr(Expr), Offset(off), DL(std::move(dl)), Order(O), + IsIndirect(false) { kind = FRAMEIX; u.FrameIx = FI; } diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h index 4905b8b7d1f..a7d296929a3 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h @@ -22,10 +22,11 @@ #include "llvm/CodeGen/SelectionDAG.h" #include "llvm/CodeGen/SelectionDAGNodes.h" #include "llvm/IR/CallSite.h" -#include "llvm/IR/Statepoint.h" #include "llvm/IR/Constants.h" +#include "llvm/IR/Statepoint.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Target/TargetLowering.h" +#include <utility> #include <vector> namespace llvm { @@ -101,8 +102,8 @@ class SelectionDAGBuilder { unsigned SDNodeOrder; public: DanglingDebugInfo() : DI(nullptr), dl(DebugLoc()), SDNodeOrder(0) { } - DanglingDebugInfo(const DbgValueInst *di, DebugLoc DL, unsigned SDNO) : - DI(di), dl(DL), SDNodeOrder(SDNO) { } + DanglingDebugInfo(const DbgValueInst *di, DebugLoc DL, unsigned SDNO) + : DI(di), dl(std::move(DL)), SDNodeOrder(SDNO) {} const DbgValueInst* getDI() { return DI; } DebugLoc getdl() { return dl; } unsigned getSDNodeOrder() { return SDNodeOrder; } @@ -260,8 +261,9 @@ private: }; struct JumpTableHeader { JumpTableHeader(APInt F, APInt L, const Value *SV, MachineBasicBlock *H, - bool E = false): - First(F), Last(L), SValue(SV), HeaderBB(H), Emitted(E) {} + bool E = false) + : First(std::move(F)), Last(std::move(L)), SValue(SV), HeaderBB(H), + Emitted(E) {} APInt First; APInt Last; const Value *SValue; @@ -286,9 +288,9 @@ private: BitTestBlock(APInt F, APInt R, const Value *SV, unsigned Rg, MVT RgVT, bool E, bool CR, MachineBasicBlock *P, MachineBasicBlock *D, BitTestInfo C, BranchProbability Pr) - : First(F), Range(R), SValue(SV), Reg(Rg), RegVT(RgVT), Emitted(E), - ContiguousRange(CR), Parent(P), Default(D), Cases(std::move(C)), - Prob(Pr) {} + : First(std::move(F)), Range(std::move(R)), SValue(SV), Reg(Rg), + RegVT(RgVT), Emitted(E), ContiguousRange(CR), Parent(P), Default(D), + Cases(std::move(C)), Prob(Pr) {} APInt First; APInt Range; const Value *SValue; |