mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
Apply clang-tidy's misc-move-constructor-init throughout LLVM.
No functionality change intended, maybe a tiny performance improvement. llvm-svn: 270997
This commit is contained in:
parent
18b7d75488
commit
a855b3205f
@ -24,6 +24,7 @@
|
|||||||
#include "llvm/ADT/SmallSet.h"
|
#include "llvm/ADT/SmallSet.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
@ -262,7 +263,8 @@ private:
|
|||||||
set_type &set_;
|
set_type &set_;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TestAndEraseFromSet(UnaryPredicate P, set_type &set_) : P(P), set_(set_) {}
|
TestAndEraseFromSet(UnaryPredicate P, set_type &set_)
|
||||||
|
: P(std::move(P)), set_(set_) {}
|
||||||
|
|
||||||
template <typename ArgumentT>
|
template <typename ArgumentT>
|
||||||
bool operator()(const ArgumentT &Arg) {
|
bool operator()(const ArgumentT &Arg) {
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
#include "llvm/IR/DebugLoc.h"
|
#include "llvm/IR/DebugLoc.h"
|
||||||
#include "llvm/Pass.h"
|
#include "llvm/Pass.h"
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
class AsmPrinter;
|
class AsmPrinter;
|
||||||
@ -54,7 +55,7 @@ struct GCPoint {
|
|||||||
DebugLoc Loc;
|
DebugLoc Loc;
|
||||||
|
|
||||||
GCPoint(GC::PointKind K, MCSymbol *L, DebugLoc DL)
|
GCPoint(GC::PointKind K, MCSymbol *L, DebugLoc DL)
|
||||||
: Kind(K), Label(L), Loc(DL) {}
|
: Kind(K), Label(L), Loc(std::move(DL)) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
/// GCRoot - Metadata for a pointer to an object managed by the garbage
|
/// GCRoot - Metadata for a pointer to an object managed by the garbage
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
#define LLVM_CODEGEN_PBQP_GRAPH_H
|
#define LLVM_CODEGEN_PBQP_GRAPH_H
|
||||||
|
|
||||||
#include "llvm/Support/Debug.h"
|
#include "llvm/Support/Debug.h"
|
||||||
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
@ -67,7 +68,7 @@ namespace PBQP {
|
|||||||
return std::numeric_limits<AdjEdgeIdx>::max();
|
return std::numeric_limits<AdjEdgeIdx>::max();
|
||||||
}
|
}
|
||||||
|
|
||||||
NodeEntry(VectorPtr Costs) : Costs(Costs) {}
|
NodeEntry(VectorPtr Costs) : Costs(std::move(Costs)) {}
|
||||||
|
|
||||||
AdjEdgeIdx addAdjEdgeId(EdgeId EId) {
|
AdjEdgeIdx addAdjEdgeId(EdgeId EId) {
|
||||||
AdjEdgeIdx Idx = AdjEdgeIds.size();
|
AdjEdgeIdx Idx = AdjEdgeIds.size();
|
||||||
@ -98,7 +99,7 @@ namespace PBQP {
|
|||||||
class EdgeEntry {
|
class EdgeEntry {
|
||||||
public:
|
public:
|
||||||
EdgeEntry(NodeId N1Id, NodeId N2Id, MatrixPtr Costs)
|
EdgeEntry(NodeId N1Id, NodeId N2Id, MatrixPtr Costs)
|
||||||
: Costs(Costs) {
|
: Costs(std::move(Costs)) {
|
||||||
NIds[0] = N1Id;
|
NIds[0] = N1Id;
|
||||||
NIds[1] = N2Id;
|
NIds[1] = N2Id;
|
||||||
ThisEdgeAdjIdxs[0] = NodeEntry::getInvalidAdjEdgeIdx();
|
ThisEdgeAdjIdxs[0] = NodeEntry::getInvalidAdjEdgeIdx();
|
||||||
@ -343,7 +344,8 @@ namespace PBQP {
|
|||||||
Graph() : Solver(nullptr) {}
|
Graph() : Solver(nullptr) {}
|
||||||
|
|
||||||
/// @brief Construct an empty PBQP graph with the given graph metadata.
|
/// @brief Construct an empty PBQP graph with the given graph metadata.
|
||||||
Graph(GraphMetadata Metadata) : Metadata(Metadata), Solver(nullptr) {}
|
Graph(GraphMetadata Metadata)
|
||||||
|
: Metadata(std::move(Metadata)), Solver(nullptr) {}
|
||||||
|
|
||||||
/// @brief Get a reference to the graph metadata.
|
/// @brief Get a reference to the graph metadata.
|
||||||
GraphMetadata& getMetadata() { return Metadata; }
|
GraphMetadata& getMetadata() { return Metadata; }
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
#include "llvm/DebugInfo/CodeView/TypeIndex.h"
|
#include "llvm/DebugInfo/CodeView/TypeIndex.h"
|
||||||
#include "llvm/Support/ErrorOr.h"
|
#include "llvm/Support/ErrorOr.h"
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
namespace codeview {
|
namespace codeview {
|
||||||
@ -746,7 +747,7 @@ public:
|
|||||||
explicit VFTableShapeRecord(ArrayRef<VFTableSlotKind> Slots)
|
explicit VFTableShapeRecord(ArrayRef<VFTableSlotKind> Slots)
|
||||||
: TypeRecord(TypeRecordKind::VFTableShape), SlotsRef(Slots) {}
|
: TypeRecord(TypeRecordKind::VFTableShape), SlotsRef(Slots) {}
|
||||||
explicit VFTableShapeRecord(std::vector<VFTableSlotKind> Slots)
|
explicit VFTableShapeRecord(std::vector<VFTableSlotKind> Slots)
|
||||||
: TypeRecord(TypeRecordKind::VFTableShape), Slots(Slots) {}
|
: TypeRecord(TypeRecordKind::VFTableShape), Slots(std::move(Slots)) {}
|
||||||
|
|
||||||
/// Rewrite member type indices with IndexMap. Returns false if a type index
|
/// Rewrite member type indices with IndexMap. Returns false if a type index
|
||||||
/// is not in the map.
|
/// is not in the map.
|
||||||
@ -1256,8 +1257,8 @@ private:
|
|||||||
class EnumeratorRecord : public TypeRecord {
|
class EnumeratorRecord : public TypeRecord {
|
||||||
public:
|
public:
|
||||||
EnumeratorRecord(MemberAccess Access, APSInt Value, StringRef Name)
|
EnumeratorRecord(MemberAccess Access, APSInt Value, StringRef Name)
|
||||||
: TypeRecord(TypeRecordKind::Enumerator), Access(Access), Value(Value),
|
: TypeRecord(TypeRecordKind::Enumerator), Access(Access),
|
||||||
Name(Name) {}
|
Value(std::move(Value)), Name(Name) {}
|
||||||
|
|
||||||
/// Rewrite member type indices with IndexMap. Returns false if a type index
|
/// Rewrite member type indices with IndexMap. Returns false if a type index
|
||||||
/// is not in the map.
|
/// is not in the map.
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#include <map>
|
#include <map>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
namespace symbolize {
|
namespace symbolize {
|
||||||
@ -40,7 +41,7 @@ public:
|
|||||||
bool RelativeAddresses = false, std::string DefaultArch = "")
|
bool RelativeAddresses = false, std::string DefaultArch = "")
|
||||||
: PrintFunctions(PrintFunctions), UseSymbolTable(UseSymbolTable),
|
: PrintFunctions(PrintFunctions), UseSymbolTable(UseSymbolTable),
|
||||||
Demangle(Demangle), RelativeAddresses(RelativeAddresses),
|
Demangle(Demangle), RelativeAddresses(RelativeAddresses),
|
||||||
DefaultArch(DefaultArch) {}
|
DefaultArch(std::move(DefaultArch)) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
LLVMSymbolizer(const Options &Opts = Options()) : Opts(Opts) {}
|
LLVMSymbolizer(const Options &Opts = Options()) : Opts(Opts) {}
|
||||||
|
@ -19,12 +19,12 @@
|
|||||||
#include "LambdaResolver.h"
|
#include "LambdaResolver.h"
|
||||||
#include "LogicalDylib.h"
|
#include "LogicalDylib.h"
|
||||||
#include "llvm/ADT/STLExtras.h"
|
#include "llvm/ADT/STLExtras.h"
|
||||||
|
#include "llvm/Support/Debug.h"
|
||||||
#include "llvm/Transforms/Utils/Cloning.h"
|
#include "llvm/Transforms/Utils/Cloning.h"
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
#include <utility>
|
||||||
#include "llvm/Support/Debug.h"
|
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
namespace orc {
|
namespace orc {
|
||||||
@ -173,7 +173,7 @@ public:
|
|||||||
CompileCallbackMgrT &CallbackMgr,
|
CompileCallbackMgrT &CallbackMgr,
|
||||||
IndirectStubsManagerBuilderT CreateIndirectStubsManager,
|
IndirectStubsManagerBuilderT CreateIndirectStubsManager,
|
||||||
bool CloneStubsIntoPartitions = true)
|
bool CloneStubsIntoPartitions = true)
|
||||||
: BaseLayer(BaseLayer), Partition(Partition),
|
: BaseLayer(BaseLayer), Partition(std::move(Partition)),
|
||||||
CompileCallbackMgr(CallbackMgr),
|
CompileCallbackMgr(CallbackMgr),
|
||||||
CreateIndirectStubsManager(std::move(CreateIndirectStubsManager)),
|
CreateIndirectStubsManager(std::move(CreateIndirectStubsManager)),
|
||||||
CloneStubsIntoPartitions(CloneStubsIntoPartitions) {}
|
CloneStubsIntoPartitions(CloneStubsIntoPartitions) {}
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include "llvm/Support/Memory.h"
|
#include "llvm/Support/Memory.h"
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
@ -78,7 +79,7 @@ public:
|
|||||||
typedef std::map<object::SectionRef, unsigned> ObjSectionToIDMap;
|
typedef std::map<object::SectionRef, unsigned> ObjSectionToIDMap;
|
||||||
|
|
||||||
LoadedObjectInfo(RuntimeDyldImpl &RTDyld, ObjSectionToIDMap ObjSecToIDMap)
|
LoadedObjectInfo(RuntimeDyldImpl &RTDyld, ObjSectionToIDMap ObjSecToIDMap)
|
||||||
: RTDyld(RTDyld), ObjSecToIDMap(ObjSecToIDMap) { }
|
: RTDyld(RTDyld), ObjSecToIDMap(std::move(ObjSecToIDMap)) {}
|
||||||
|
|
||||||
virtual object::OwningBinary<object::ObjectFile>
|
virtual object::OwningBinary<object::ObjectFile>
|
||||||
getObjectForDebug(const object::ObjectFile &Obj) const = 0;
|
getObjectForDebug(const object::ObjectFile &Obj) const = 0;
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
#define LLVM_SUPPORT_PROFILE_SUMMARY_H
|
#define LLVM_SUPPORT_PROFILE_SUMMARY_H
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "llvm/Support/Casting.h"
|
#include "llvm/Support/Casting.h"
|
||||||
@ -62,10 +63,10 @@ public:
|
|||||||
uint64_t TotalCount, uint64_t MaxCount,
|
uint64_t TotalCount, uint64_t MaxCount,
|
||||||
uint64_t MaxInternalCount, uint64_t MaxFunctionCount,
|
uint64_t MaxInternalCount, uint64_t MaxFunctionCount,
|
||||||
uint32_t NumCounts, uint32_t NumFunctions)
|
uint32_t NumCounts, uint32_t NumFunctions)
|
||||||
: PSK(K), DetailedSummary(DetailedSummary), TotalCount(TotalCount),
|
: PSK(K), DetailedSummary(std::move(DetailedSummary)),
|
||||||
MaxCount(MaxCount), MaxInternalCount(MaxInternalCount),
|
TotalCount(TotalCount), MaxCount(MaxCount),
|
||||||
MaxFunctionCount(MaxFunctionCount), NumCounts(NumCounts),
|
MaxInternalCount(MaxInternalCount), MaxFunctionCount(MaxFunctionCount),
|
||||||
NumFunctions(NumFunctions) {}
|
NumCounts(NumCounts), NumFunctions(NumFunctions) {}
|
||||||
Kind getKind() const { return PSK; }
|
Kind getKind() const { return PSK; }
|
||||||
/// \brief Return summary information as metadata.
|
/// \brief Return summary information as metadata.
|
||||||
Metadata *getMD(LLVMContext &Context);
|
Metadata *getMD(LLVMContext &Context);
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
@ -137,7 +138,7 @@ private:
|
|||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct ListCompleterModel : ListCompleterConcept {
|
struct ListCompleterModel : ListCompleterConcept {
|
||||||
ListCompleterModel(T Value) : Value(Value) {}
|
ListCompleterModel(T Value) : Value(std::move(Value)) {}
|
||||||
std::vector<Completion> getCompletions(StringRef Buffer,
|
std::vector<Completion> getCompletions(StringRef Buffer,
|
||||||
size_t Pos) const override {
|
size_t Pos) const override {
|
||||||
return Value(Buffer, Pos);
|
return Value(Buffer, Pos);
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
#include "llvm/Support/Compiler.h"
|
#include "llvm/Support/Compiler.h"
|
||||||
#include "llvm/Support/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
#include "llvm/Support/SMLoc.h"
|
#include "llvm/Support/SMLoc.h"
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
@ -66,7 +67,7 @@ private:
|
|||||||
public:
|
public:
|
||||||
AsmToken() {}
|
AsmToken() {}
|
||||||
AsmToken(TokenKind Kind, StringRef Str, APInt IntVal)
|
AsmToken(TokenKind Kind, StringRef Str, APInt IntVal)
|
||||||
: Kind(Kind), Str(Str), IntVal(IntVal) {}
|
: Kind(Kind), Str(Str), IntVal(std::move(IntVal)) {}
|
||||||
AsmToken(TokenKind Kind, StringRef Str, int64_t IntVal = 0)
|
AsmToken(TokenKind Kind, StringRef Str, int64_t IntVal = 0)
|
||||||
: Kind(Kind), Str(Str), IntVal(64, IntVal, true) {}
|
: Kind(Kind), Str(Str), IntVal(64, IntVal, true) {}
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
#include "llvm/Object/Binary.h"
|
#include "llvm/Object/Binary.h"
|
||||||
#include "llvm/Support/Format.h"
|
#include "llvm/Support/Format.h"
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
namespace object {
|
namespace object {
|
||||||
@ -58,7 +59,7 @@ class content_iterator
|
|||||||
content_type Current;
|
content_type Current;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
content_iterator(content_type symb) : Current(symb) {}
|
content_iterator(content_type symb) : Current(std::move(symb)) {}
|
||||||
|
|
||||||
const content_type *operator->() const { return &Current; }
|
const content_type *operator->() const { return &Current; }
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "llvm/IR/ProfileSummary.h"
|
#include "llvm/IR/ProfileSummary.h"
|
||||||
@ -52,7 +53,7 @@ private:
|
|||||||
protected:
|
protected:
|
||||||
SummaryEntryVector DetailedSummary;
|
SummaryEntryVector DetailedSummary;
|
||||||
ProfileSummaryBuilder(std::vector<uint32_t> Cutoffs)
|
ProfileSummaryBuilder(std::vector<uint32_t> Cutoffs)
|
||||||
: DetailedSummaryCutoffs(Cutoffs), TotalCount(0), MaxCount(0),
|
: DetailedSummaryCutoffs(std::move(Cutoffs)), TotalCount(0), MaxCount(0),
|
||||||
MaxFunctionCount(0), NumCounts(0), NumFunctions(0) {}
|
MaxFunctionCount(0), NumCounts(0), NumFunctions(0) {}
|
||||||
inline void addCount(uint64_t Count);
|
inline void addCount(uint64_t Count);
|
||||||
~ProfileSummaryBuilder() = default;
|
~ProfileSummaryBuilder() = default;
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
#include <functional>
|
#include <functional>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
class LLVMContext;
|
class LLVMContext;
|
||||||
@ -45,7 +46,7 @@ public:
|
|||||||
FunctionImporter(
|
FunctionImporter(
|
||||||
const ModuleSummaryIndex &Index,
|
const ModuleSummaryIndex &Index,
|
||||||
std::function<std::unique_ptr<Module>(StringRef Identifier)> ModuleLoader)
|
std::function<std::unique_ptr<Module>(StringRef Identifier)> ModuleLoader)
|
||||||
: Index(Index), ModuleLoader(ModuleLoader) {}
|
: Index(Index), ModuleLoader(std::move(ModuleLoader)) {}
|
||||||
|
|
||||||
/// Import functions in Module \p M based on the supplied import list.
|
/// Import functions in Module \p M based on the supplied import list.
|
||||||
/// \p ForceImportReferencedDiscardableSymbols will set the ModuleLinker in
|
/// \p ForceImportReferencedDiscardableSymbols will set the ModuleLinker in
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
#include "llvm/IR/Module.h"
|
#include "llvm/IR/Module.h"
|
||||||
#include "llvm/IR/Operator.h"
|
#include "llvm/IR/Operator.h"
|
||||||
#include "llvm/Support/ErrorHandling.h"
|
#include "llvm/Support/ErrorHandling.h"
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
@ -397,7 +398,7 @@ TargetIRAnalysis::TargetIRAnalysis() : TTICallback(&getDefaultTTI) {}
|
|||||||
|
|
||||||
TargetIRAnalysis::TargetIRAnalysis(
|
TargetIRAnalysis::TargetIRAnalysis(
|
||||||
std::function<Result(const Function &)> TTICallback)
|
std::function<Result(const Function &)> TTICallback)
|
||||||
: TTICallback(TTICallback) {}
|
: TTICallback(std::move(TTICallback)) {}
|
||||||
|
|
||||||
TargetIRAnalysis::Result TargetIRAnalysis::run(const Function &F) {
|
TargetIRAnalysis::Result TargetIRAnalysis::run(const Function &F) {
|
||||||
return TTICallback(F);
|
return TTICallback(F);
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
#include "llvm/Support/MemoryBuffer.h"
|
#include "llvm/Support/MemoryBuffer.h"
|
||||||
#include "llvm/Support/raw_ostream.h"
|
#include "llvm/Support/raw_ostream.h"
|
||||||
#include <deque>
|
#include <deque>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
@ -5713,13 +5714,13 @@ std::error_code ModuleSummaryIndexBitcodeReader::error(BitcodeError E) {
|
|||||||
ModuleSummaryIndexBitcodeReader::ModuleSummaryIndexBitcodeReader(
|
ModuleSummaryIndexBitcodeReader::ModuleSummaryIndexBitcodeReader(
|
||||||
MemoryBuffer *Buffer, DiagnosticHandlerFunction DiagnosticHandler,
|
MemoryBuffer *Buffer, DiagnosticHandlerFunction DiagnosticHandler,
|
||||||
bool CheckGlobalValSummaryPresenceOnly)
|
bool CheckGlobalValSummaryPresenceOnly)
|
||||||
: DiagnosticHandler(DiagnosticHandler), Buffer(Buffer),
|
: DiagnosticHandler(std::move(DiagnosticHandler)), Buffer(Buffer),
|
||||||
CheckGlobalValSummaryPresenceOnly(CheckGlobalValSummaryPresenceOnly) {}
|
CheckGlobalValSummaryPresenceOnly(CheckGlobalValSummaryPresenceOnly) {}
|
||||||
|
|
||||||
ModuleSummaryIndexBitcodeReader::ModuleSummaryIndexBitcodeReader(
|
ModuleSummaryIndexBitcodeReader::ModuleSummaryIndexBitcodeReader(
|
||||||
DiagnosticHandlerFunction DiagnosticHandler,
|
DiagnosticHandlerFunction DiagnosticHandler,
|
||||||
bool CheckGlobalValSummaryPresenceOnly)
|
bool CheckGlobalValSummaryPresenceOnly)
|
||||||
: DiagnosticHandler(DiagnosticHandler), Buffer(nullptr),
|
: DiagnosticHandler(std::move(DiagnosticHandler)), Buffer(nullptr),
|
||||||
CheckGlobalValSummaryPresenceOnly(CheckGlobalValSummaryPresenceOnly) {}
|
CheckGlobalValSummaryPresenceOnly(CheckGlobalValSummaryPresenceOnly) {}
|
||||||
|
|
||||||
void ModuleSummaryIndexBitcodeReader::freeState() { Buffer = nullptr; }
|
void ModuleSummaryIndexBitcodeReader::freeState() { Buffer = nullptr; }
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
#include "llvm/Target/TargetRegisterInfo.h"
|
#include "llvm/Target/TargetRegisterInfo.h"
|
||||||
#include "llvm/Target/TargetSubtargetInfo.h"
|
#include "llvm/Target/TargetSubtargetInfo.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
@ -177,7 +178,7 @@ namespace {
|
|||||||
public:
|
public:
|
||||||
static char ID;
|
static char ID;
|
||||||
IfConverter(std::function<bool(const Function &)> Ftor = nullptr)
|
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());
|
initializeIfConverterPass(*PassRegistry::getPassRegistry());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,6 +42,7 @@
|
|||||||
#include "llvm/Target/TargetRegisterInfo.h"
|
#include "llvm/Target/TargetRegisterInfo.h"
|
||||||
#include "llvm/Target/TargetSubtargetInfo.h"
|
#include "llvm/Target/TargetSubtargetInfo.h"
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
@ -84,7 +85,7 @@ class UserValueScopes {
|
|||||||
SmallPtrSet<const MachineBasicBlock *, 4> LBlocks;
|
SmallPtrSet<const MachineBasicBlock *, 4> LBlocks;
|
||||||
|
|
||||||
public:
|
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
|
/// dominates - Return true if current scope dominates at least one machine
|
||||||
/// instruction in a given machine basic block.
|
/// instruction in a given machine basic block.
|
||||||
@ -141,8 +142,8 @@ public:
|
|||||||
/// UserValue - Create a new UserValue.
|
/// UserValue - Create a new UserValue.
|
||||||
UserValue(const MDNode *var, const MDNode *expr, unsigned o, bool i,
|
UserValue(const MDNode *var, const MDNode *expr, unsigned o, bool i,
|
||||||
DebugLoc L, LocMap::Allocator &alloc)
|
DebugLoc L, LocMap::Allocator &alloc)
|
||||||
: Variable(var), Expression(expr), offset(o), IsIndirect(i), dl(L),
|
: Variable(var), Expression(expr), offset(o), IsIndirect(i),
|
||||||
leader(this), next(nullptr), locInts(alloc) {}
|
dl(std::move(L)), leader(this), next(nullptr), locInts(alloc) {}
|
||||||
|
|
||||||
/// getLeader - Get the leader of this value's equivalence class.
|
/// getLeader - Get the leader of this value's equivalence class.
|
||||||
UserValue *getLeader() {
|
UserValue *getLeader() {
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
#include "llvm/Target/TargetMachine.h"
|
#include "llvm/Target/TargetMachine.h"
|
||||||
#include "llvm/Target/TargetRegisterInfo.h"
|
#include "llvm/Target/TargetRegisterInfo.h"
|
||||||
#include "llvm/Target/TargetSubtargetInfo.h"
|
#include "llvm/Target/TargetSubtargetInfo.h"
|
||||||
|
#include <utility>
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
@ -24,7 +25,7 @@ namespace {
|
|||||||
public:
|
public:
|
||||||
static char ID; // Pass identification
|
static char ID; // Pass identification
|
||||||
UnpackMachineBundles(std::function<bool(const Function &)> Ftor = nullptr)
|
UnpackMachineBundles(std::function<bool(const Function &)> Ftor = nullptr)
|
||||||
: MachineFunctionPass(ID), PredicateFtor(Ftor) {
|
: MachineFunctionPass(ID), PredicateFtor(std::move(Ftor)) {
|
||||||
initializeUnpackMachineBundlesPass(*PassRegistry::getPassRegistry());
|
initializeUnpackMachineBundlesPass(*PassRegistry::getPassRegistry());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
#include "llvm/IR/DebugLoc.h"
|
#include "llvm/IR/DebugLoc.h"
|
||||||
#include "llvm/Support/DataTypes.h"
|
#include "llvm/Support/DataTypes.h"
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
@ -55,7 +56,8 @@ public:
|
|||||||
// Constructor for non-constants.
|
// Constructor for non-constants.
|
||||||
SDDbgValue(MDNode *Var, MDNode *Expr, SDNode *N, unsigned R, bool indir,
|
SDDbgValue(MDNode *Var, MDNode *Expr, SDNode *N, unsigned R, bool indir,
|
||||||
uint64_t off, DebugLoc dl, unsigned O)
|
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;
|
kind = SDNODE;
|
||||||
u.s.Node = N;
|
u.s.Node = N;
|
||||||
u.s.ResNo = R;
|
u.s.ResNo = R;
|
||||||
@ -64,7 +66,8 @@ public:
|
|||||||
// Constructor for constants.
|
// Constructor for constants.
|
||||||
SDDbgValue(MDNode *Var, MDNode *Expr, const Value *C, uint64_t off,
|
SDDbgValue(MDNode *Var, MDNode *Expr, const Value *C, uint64_t off,
|
||||||
DebugLoc dl, unsigned O)
|
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;
|
kind = CONST;
|
||||||
u.Const = C;
|
u.Const = C;
|
||||||
}
|
}
|
||||||
@ -72,7 +75,8 @@ public:
|
|||||||
// Constructor for frame indices.
|
// Constructor for frame indices.
|
||||||
SDDbgValue(MDNode *Var, MDNode *Expr, unsigned FI, uint64_t off, DebugLoc dl,
|
SDDbgValue(MDNode *Var, MDNode *Expr, unsigned FI, uint64_t off, DebugLoc dl,
|
||||||
unsigned O)
|
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;
|
kind = FRAMEIX;
|
||||||
u.FrameIx = FI;
|
u.FrameIx = FI;
|
||||||
}
|
}
|
||||||
|
@ -22,10 +22,11 @@
|
|||||||
#include "llvm/CodeGen/SelectionDAG.h"
|
#include "llvm/CodeGen/SelectionDAG.h"
|
||||||
#include "llvm/CodeGen/SelectionDAGNodes.h"
|
#include "llvm/CodeGen/SelectionDAGNodes.h"
|
||||||
#include "llvm/IR/CallSite.h"
|
#include "llvm/IR/CallSite.h"
|
||||||
#include "llvm/IR/Statepoint.h"
|
|
||||||
#include "llvm/IR/Constants.h"
|
#include "llvm/IR/Constants.h"
|
||||||
|
#include "llvm/IR/Statepoint.h"
|
||||||
#include "llvm/Support/ErrorHandling.h"
|
#include "llvm/Support/ErrorHandling.h"
|
||||||
#include "llvm/Target/TargetLowering.h"
|
#include "llvm/Target/TargetLowering.h"
|
||||||
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
@ -101,8 +102,8 @@ class SelectionDAGBuilder {
|
|||||||
unsigned SDNodeOrder;
|
unsigned SDNodeOrder;
|
||||||
public:
|
public:
|
||||||
DanglingDebugInfo() : DI(nullptr), dl(DebugLoc()), SDNodeOrder(0) { }
|
DanglingDebugInfo() : DI(nullptr), dl(DebugLoc()), SDNodeOrder(0) { }
|
||||||
DanglingDebugInfo(const DbgValueInst *di, DebugLoc DL, unsigned SDNO) :
|
DanglingDebugInfo(const DbgValueInst *di, DebugLoc DL, unsigned SDNO)
|
||||||
DI(di), dl(DL), SDNodeOrder(SDNO) { }
|
: DI(di), dl(std::move(DL)), SDNodeOrder(SDNO) {}
|
||||||
const DbgValueInst* getDI() { return DI; }
|
const DbgValueInst* getDI() { return DI; }
|
||||||
DebugLoc getdl() { return dl; }
|
DebugLoc getdl() { return dl; }
|
||||||
unsigned getSDNodeOrder() { return SDNodeOrder; }
|
unsigned getSDNodeOrder() { return SDNodeOrder; }
|
||||||
@ -260,8 +261,9 @@ private:
|
|||||||
};
|
};
|
||||||
struct JumpTableHeader {
|
struct JumpTableHeader {
|
||||||
JumpTableHeader(APInt F, APInt L, const Value *SV, MachineBasicBlock *H,
|
JumpTableHeader(APInt F, APInt L, const Value *SV, MachineBasicBlock *H,
|
||||||
bool E = false):
|
bool E = false)
|
||||||
First(F), Last(L), SValue(SV), HeaderBB(H), Emitted(E) {}
|
: First(std::move(F)), Last(std::move(L)), SValue(SV), HeaderBB(H),
|
||||||
|
Emitted(E) {}
|
||||||
APInt First;
|
APInt First;
|
||||||
APInt Last;
|
APInt Last;
|
||||||
const Value *SValue;
|
const Value *SValue;
|
||||||
@ -286,9 +288,9 @@ private:
|
|||||||
BitTestBlock(APInt F, APInt R, const Value *SV, unsigned Rg, MVT RgVT,
|
BitTestBlock(APInt F, APInt R, const Value *SV, unsigned Rg, MVT RgVT,
|
||||||
bool E, bool CR, MachineBasicBlock *P, MachineBasicBlock *D,
|
bool E, bool CR, MachineBasicBlock *P, MachineBasicBlock *D,
|
||||||
BitTestInfo C, BranchProbability Pr)
|
BitTestInfo C, BranchProbability Pr)
|
||||||
: First(F), Range(R), SValue(SV), Reg(Rg), RegVT(RgVT), Emitted(E),
|
: First(std::move(F)), Range(std::move(R)), SValue(SV), Reg(Rg),
|
||||||
ContiguousRange(CR), Parent(P), Default(D), Cases(std::move(C)),
|
RegVT(RgVT), Emitted(E), ContiguousRange(CR), Parent(P), Default(D),
|
||||||
Prob(Pr) {}
|
Cases(std::move(C)), Prob(Pr) {}
|
||||||
APInt First;
|
APInt First;
|
||||||
APInt Range;
|
APInt Range;
|
||||||
const Value *SValue;
|
const Value *SValue;
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#include "llvm/Support/Format.h"
|
#include "llvm/Support/Format.h"
|
||||||
#include "llvm/Support/raw_ostream.h"
|
#include "llvm/Support/raw_ostream.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
@ -205,15 +206,14 @@ public:
|
|||||||
SmallString<8> AugmentationData, uint32_t FDEPointerEncoding,
|
SmallString<8> AugmentationData, uint32_t FDEPointerEncoding,
|
||||||
uint32_t LSDAPointerEncoding)
|
uint32_t LSDAPointerEncoding)
|
||||||
: FrameEntry(FK_CIE, Offset, Length), Version(Version),
|
: FrameEntry(FK_CIE, Offset, Length), Version(Version),
|
||||||
Augmentation(std::move(Augmentation)),
|
Augmentation(std::move(Augmentation)), AddressSize(AddressSize),
|
||||||
AddressSize(AddressSize),
|
|
||||||
SegmentDescriptorSize(SegmentDescriptorSize),
|
SegmentDescriptorSize(SegmentDescriptorSize),
|
||||||
CodeAlignmentFactor(CodeAlignmentFactor),
|
CodeAlignmentFactor(CodeAlignmentFactor),
|
||||||
DataAlignmentFactor(DataAlignmentFactor),
|
DataAlignmentFactor(DataAlignmentFactor),
|
||||||
ReturnAddressRegister(ReturnAddressRegister),
|
ReturnAddressRegister(ReturnAddressRegister),
|
||||||
AugmentationData(AugmentationData),
|
AugmentationData(std::move(AugmentationData)),
|
||||||
FDEPointerEncoding(FDEPointerEncoding),
|
FDEPointerEncoding(FDEPointerEncoding),
|
||||||
LSDAPointerEncoding(LSDAPointerEncoding) { }
|
LSDAPointerEncoding(LSDAPointerEncoding) {}
|
||||||
|
|
||||||
~CIE() override {}
|
~CIE() override {}
|
||||||
|
|
||||||
|
@ -7,16 +7,17 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#include "llvm/ADT/STLExtras.h"
|
#include "llvm/ExecutionEngine/RuntimeDyldChecker.h"
|
||||||
#include "RuntimeDyldCheckerImpl.h"
|
#include "RuntimeDyldCheckerImpl.h"
|
||||||
#include "RuntimeDyldImpl.h"
|
#include "RuntimeDyldImpl.h"
|
||||||
#include "llvm/ExecutionEngine/RuntimeDyldChecker.h"
|
#include "llvm/ADT/STLExtras.h"
|
||||||
#include "llvm/MC/MCContext.h"
|
#include "llvm/MC/MCContext.h"
|
||||||
#include "llvm/MC/MCDisassembler/MCDisassembler.h"
|
#include "llvm/MC/MCDisassembler/MCDisassembler.h"
|
||||||
#include "llvm/MC/MCInst.h"
|
#include "llvm/MC/MCInst.h"
|
||||||
#include "llvm/Support/Path.h"
|
#include "llvm/Support/Path.h"
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
#define DEBUG_TYPE "rtdyld"
|
#define DEBUG_TYPE "rtdyld"
|
||||||
|
|
||||||
@ -97,7 +98,8 @@ private:
|
|||||||
public:
|
public:
|
||||||
EvalResult() : Value(0), ErrorMsg("") {}
|
EvalResult() : Value(0), ErrorMsg("") {}
|
||||||
EvalResult(uint64_t Value) : Value(Value), ErrorMsg("") {}
|
EvalResult(uint64_t Value) : Value(Value), ErrorMsg("") {}
|
||||||
EvalResult(std::string ErrorMsg) : Value(0), ErrorMsg(ErrorMsg) {}
|
EvalResult(std::string ErrorMsg)
|
||||||
|
: Value(0), ErrorMsg(std::move(ErrorMsg)) {}
|
||||||
uint64_t getValue() const { return Value; }
|
uint64_t getValue() const { return Value; }
|
||||||
bool hasError() const { return ErrorMsg != ""; }
|
bool hasError() const { return ErrorMsg != ""; }
|
||||||
const std::string &getErrorMsg() const { return ErrorMsg; }
|
const std::string &getErrorMsg() const { return ErrorMsg; }
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#include "llvm/IR/TypeFinder.h"
|
#include "llvm/IR/TypeFinder.h"
|
||||||
#include "llvm/Support/Error.h"
|
#include "llvm/Support/Error.h"
|
||||||
#include "llvm/Transforms/Utils/Cloning.h"
|
#include "llvm/Transforms/Utils/Cloning.h"
|
||||||
|
#include <utility>
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
@ -481,8 +482,9 @@ public:
|
|||||||
IRMover::IdentifiedStructTypeSet &Set, std::unique_ptr<Module> SrcM,
|
IRMover::IdentifiedStructTypeSet &Set, std::unique_ptr<Module> SrcM,
|
||||||
ArrayRef<GlobalValue *> ValuesToLink,
|
ArrayRef<GlobalValue *> ValuesToLink,
|
||||||
std::function<void(GlobalValue &, IRMover::ValueAdder)> AddLazyFor)
|
std::function<void(GlobalValue &, IRMover::ValueAdder)> AddLazyFor)
|
||||||
: DstM(DstM), SrcM(std::move(SrcM)), AddLazyFor(AddLazyFor), TypeMap(Set),
|
: DstM(DstM), SrcM(std::move(SrcM)), AddLazyFor(std::move(AddLazyFor)),
|
||||||
GValMaterializer(*this), LValMaterializer(*this), SharedMDs(SharedMDs),
|
TypeMap(Set), GValMaterializer(*this), LValMaterializer(*this),
|
||||||
|
SharedMDs(SharedMDs),
|
||||||
Mapper(ValueMap, RF_MoveDistinctMDs | RF_IgnoreMissingLocals, &TypeMap,
|
Mapper(ValueMap, RF_MoveDistinctMDs | RF_IgnoreMissingLocals, &TypeMap,
|
||||||
&GValMaterializer),
|
&GValMaterializer),
|
||||||
AliasMCID(Mapper.registerAlternateMappingContext(AliasValueMap,
|
AliasMCID(Mapper.registerAlternateMappingContext(AliasValueMap,
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include "llvm/MC/MCSubtargetInfo.h"
|
#include "llvm/MC/MCSubtargetInfo.h"
|
||||||
#include "llvm/Support/raw_ostream.h"
|
#include "llvm/Support/raw_ostream.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
class Target;
|
class Target;
|
||||||
@ -86,15 +87,12 @@ public:
|
|||||||
LLVMOpInfoCallback getOpInfo,
|
LLVMOpInfoCallback getOpInfo,
|
||||||
LLVMSymbolLookupCallback symbolLookUp,
|
LLVMSymbolLookupCallback symbolLookUp,
|
||||||
const Target *theTarget, const MCAsmInfo *mAI,
|
const Target *theTarget, const MCAsmInfo *mAI,
|
||||||
const MCRegisterInfo *mRI,
|
const MCRegisterInfo *mRI, const MCSubtargetInfo *mSI,
|
||||||
const MCSubtargetInfo *mSI,
|
const MCInstrInfo *mII, llvm::MCContext *ctx,
|
||||||
const MCInstrInfo *mII,
|
const MCDisassembler *disAsm, MCInstPrinter *iP)
|
||||||
llvm::MCContext *ctx, const MCDisassembler *disAsm,
|
: TripleName(std::move(tripleName)), DisInfo(disInfo), TagType(tagType),
|
||||||
MCInstPrinter *iP) : TripleName(tripleName),
|
GetOpInfo(getOpInfo), SymbolLookUp(symbolLookUp), TheTarget(theTarget),
|
||||||
DisInfo(disInfo), TagType(tagType), GetOpInfo(getOpInfo),
|
Options(0), CommentStream(CommentsToEmit) {
|
||||||
SymbolLookUp(symbolLookUp), TheTarget(theTarget),
|
|
||||||
Options(0),
|
|
||||||
CommentStream(CommentsToEmit) {
|
|
||||||
MAI.reset(mAI);
|
MAI.reset(mAI);
|
||||||
MRI.reset(mRI);
|
MRI.reset(mRI);
|
||||||
MSI.reset(mSI);
|
MSI.reset(mSI);
|
||||||
|
@ -18,11 +18,12 @@
|
|||||||
#include "llvm/CodeGen/MachineFunctionPass.h"
|
#include "llvm/CodeGen/MachineFunctionPass.h"
|
||||||
#include "llvm/CodeGen/MachineInstr.h"
|
#include "llvm/CodeGen/MachineInstr.h"
|
||||||
#include "llvm/CodeGen/MachineInstrBuilder.h"
|
#include "llvm/CodeGen/MachineInstrBuilder.h"
|
||||||
#include "llvm/IR/Function.h" // To access Function attributes
|
#include "llvm/IR/Function.h" // To access Function attributes
|
||||||
#include "llvm/Support/CommandLine.h"
|
#include "llvm/Support/CommandLine.h"
|
||||||
#include "llvm/Support/Debug.h"
|
#include "llvm/Support/Debug.h"
|
||||||
#include "llvm/Support/raw_ostream.h"
|
#include "llvm/Support/raw_ostream.h"
|
||||||
#include "llvm/Target/TargetMachine.h"
|
#include "llvm/Target/TargetMachine.h"
|
||||||
|
#include <utility>
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
#define DEBUG_TYPE "t2-reduce-size"
|
#define DEBUG_TYPE "t2-reduce-size"
|
||||||
@ -213,7 +214,7 @@ namespace {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Thumb2SizeReduce::Thumb2SizeReduce(std::function<bool(const Function &)> Ftor)
|
Thumb2SizeReduce::Thumb2SizeReduce(std::function<bool(const Function &)> Ftor)
|
||||||
: MachineFunctionPass(ID), PredicateFtor(Ftor) {
|
: MachineFunctionPass(ID), PredicateFtor(std::move(Ftor)) {
|
||||||
OptimizeSize = MinimizeSize = false;
|
OptimizeSize = MinimizeSize = false;
|
||||||
for (unsigned i = 0, e = array_lengthof(ReduceTable); i != e; ++i) {
|
for (unsigned i = 0, e = array_lengthof(ReduceTable); i != e; ++i) {
|
||||||
unsigned FromOpc = ReduceTable[i].WideOpc;
|
unsigned FromOpc = ReduceTable[i].WideOpc;
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
#include "llvm/ADT/APFloat.h"
|
#include "llvm/ADT/APFloat.h"
|
||||||
#include "llvm/MC/MCExpr.h"
|
#include "llvm/MC/MCExpr.h"
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
namespace llvm {
|
namespace llvm {
|
||||||
|
|
||||||
@ -30,7 +31,7 @@ private:
|
|||||||
const APFloat Flt;
|
const APFloat Flt;
|
||||||
|
|
||||||
explicit NVPTXFloatMCExpr(VariantKind Kind, APFloat Flt)
|
explicit NVPTXFloatMCExpr(VariantKind Kind, APFloat Flt)
|
||||||
: Kind(Kind), Flt(Flt) {}
|
: Kind(Kind), Flt(std::move(Flt)) {}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// @name Construction
|
/// @name Construction
|
||||||
|
@ -150,7 +150,7 @@ public:
|
|||||||
|
|
||||||
// Provide the profile filename as the parameter.
|
// Provide the profile filename as the parameter.
|
||||||
PGOInstrumentationUseLegacyPass(std::string Filename = "")
|
PGOInstrumentationUseLegacyPass(std::string Filename = "")
|
||||||
: ModulePass(ID), ProfileFileName(Filename) {
|
: ModulePass(ID), ProfileFileName(std::move(Filename)) {
|
||||||
if (!PGOTestProfileFile.empty())
|
if (!PGOTestProfileFile.empty())
|
||||||
ProfileFileName = PGOTestProfileFile;
|
ProfileFileName = PGOTestProfileFile;
|
||||||
initializePGOInstrumentationUseLegacyPassPass(
|
initializePGOInstrumentationUseLegacyPassPass(
|
||||||
@ -919,7 +919,7 @@ static bool annotateAllFunctions(
|
|||||||
}
|
}
|
||||||
|
|
||||||
PGOInstrumentationUse::PGOInstrumentationUse(std::string Filename)
|
PGOInstrumentationUse::PGOInstrumentationUse(std::string Filename)
|
||||||
: ProfileFileName(Filename) {
|
: ProfileFileName(std::move(Filename)) {
|
||||||
if (!PGOTestProfileFile.empty())
|
if (!PGOTestProfileFile.empty())
|
||||||
ProfileFileName = PGOTestProfileFile;
|
ProfileFileName = PGOTestProfileFile;
|
||||||
}
|
}
|
||||||
|
@ -63,6 +63,7 @@
|
|||||||
#include "llvm/Transforms/Utils/LoopUtils.h"
|
#include "llvm/Transforms/Utils/LoopUtils.h"
|
||||||
#include "llvm/Transforms/Utils/SSAUpdater.h"
|
#include "llvm/Transforms/Utils/SSAUpdater.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <utility>
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
#define DEBUG_TYPE "licm"
|
#define DEBUG_TYPE "licm"
|
||||||
@ -811,7 +812,7 @@ public:
|
|||||||
const AAMDNodes &AATags)
|
const AAMDNodes &AATags)
|
||||||
: LoadAndStorePromoter(Insts, S), SomePtr(SP), PointerMustAliases(PMA),
|
: LoadAndStorePromoter(Insts, S), SomePtr(SP), PointerMustAliases(PMA),
|
||||||
LoopExitBlocks(LEB), LoopInsertPts(LIP), PredCache(PIC), AST(ast),
|
LoopExitBlocks(LEB), LoopInsertPts(LIP), PredCache(PIC), AST(ast),
|
||||||
LI(li), DL(dl), Alignment(alignment), AATags(AATags) {}
|
LI(li), DL(std::move(dl)), Alignment(alignment), AATags(AATags) {}
|
||||||
|
|
||||||
bool isInstInList(Instruction *I,
|
bool isInstInList(Instruction *I,
|
||||||
const SmallVectorImpl<Instruction *> &) const override {
|
const SmallVectorImpl<Instruction *> &) const override {
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
#include "llvm/Transforms/Utils/LoopUtils.h"
|
#include "llvm/Transforms/Utils/LoopUtils.h"
|
||||||
#include "llvm/Transforms/Utils/UnrollLoop.h"
|
#include "llvm/Transforms/Utils/UnrollLoop.h"
|
||||||
#include <climits>
|
#include <climits>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
@ -939,8 +940,9 @@ public:
|
|||||||
LoopUnroll(Optional<unsigned> Threshold = None,
|
LoopUnroll(Optional<unsigned> Threshold = None,
|
||||||
Optional<unsigned> Count = None,
|
Optional<unsigned> Count = None,
|
||||||
Optional<bool> AllowPartial = None, Optional<bool> Runtime = None)
|
Optional<bool> AllowPartial = None, Optional<bool> Runtime = None)
|
||||||
: LoopPass(ID), ProvidedCount(Count), ProvidedThreshold(Threshold),
|
: LoopPass(ID), ProvidedCount(std::move(Count)),
|
||||||
ProvidedAllowPartial(AllowPartial), ProvidedRuntime(Runtime) {
|
ProvidedThreshold(Threshold), ProvidedAllowPartial(AllowPartial),
|
||||||
|
ProvidedRuntime(Runtime) {
|
||||||
initializeLoopUnrollPass(*PassRegistry::getPassRegistry());
|
initializeLoopUnrollPass(*PassRegistry::getPassRegistry());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,14 +21,13 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#include "llvm/Transforms/Scalar/SimplifyCFG.h"
|
|
||||||
#include "llvm/ADT/SmallPtrSet.h"
|
#include "llvm/ADT/SmallPtrSet.h"
|
||||||
#include "llvm/ADT/SmallVector.h"
|
#include "llvm/ADT/SmallVector.h"
|
||||||
#include "llvm/ADT/Statistic.h"
|
#include "llvm/ADT/Statistic.h"
|
||||||
#include "llvm/Analysis/GlobalsModRef.h"
|
|
||||||
#include "llvm/Analysis/AssumptionCache.h"
|
#include "llvm/Analysis/AssumptionCache.h"
|
||||||
#include "llvm/Analysis/TargetTransformInfo.h"
|
|
||||||
#include "llvm/Analysis/CFG.h"
|
#include "llvm/Analysis/CFG.h"
|
||||||
|
#include "llvm/Analysis/GlobalsModRef.h"
|
||||||
|
#include "llvm/Analysis/TargetTransformInfo.h"
|
||||||
#include "llvm/IR/Attributes.h"
|
#include "llvm/IR/Attributes.h"
|
||||||
#include "llvm/IR/CFG.h"
|
#include "llvm/IR/CFG.h"
|
||||||
#include "llvm/IR/Constants.h"
|
#include "llvm/IR/Constants.h"
|
||||||
@ -38,8 +37,10 @@
|
|||||||
#include "llvm/IR/Module.h"
|
#include "llvm/IR/Module.h"
|
||||||
#include "llvm/Pass.h"
|
#include "llvm/Pass.h"
|
||||||
#include "llvm/Support/CommandLine.h"
|
#include "llvm/Support/CommandLine.h"
|
||||||
#include "llvm/Transforms/Utils/Local.h"
|
|
||||||
#include "llvm/Transforms/Scalar.h"
|
#include "llvm/Transforms/Scalar.h"
|
||||||
|
#include "llvm/Transforms/Scalar/SimplifyCFG.h"
|
||||||
|
#include "llvm/Transforms/Utils/Local.h"
|
||||||
|
#include <utility>
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
#define DEBUG_TYPE "simplifycfg"
|
#define DEBUG_TYPE "simplifycfg"
|
||||||
@ -204,7 +205,7 @@ struct CFGSimplifyPass : public FunctionPass {
|
|||||||
|
|
||||||
CFGSimplifyPass(int T = -1,
|
CFGSimplifyPass(int T = -1,
|
||||||
std::function<bool(const Function &)> Ftor = nullptr)
|
std::function<bool(const Function &)> Ftor = nullptr)
|
||||||
: FunctionPass(ID), PredicateFtor(Ftor) {
|
: FunctionPass(ID), PredicateFtor(std::move(Ftor)) {
|
||||||
BonusInstThreshold = (T == -1) ? UserBonusInstThreshold : unsigned(T);
|
BonusInstThreshold = (T == -1) ? UserBonusInstThreshold : unsigned(T);
|
||||||
initializeCFGSimplifyPassPass(*PassRegistry::getPassRegistry());
|
initializeCFGSimplifyPassPass(*PassRegistry::getPassRegistry());
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include "llvm/Support/raw_ostream.h"
|
#include "llvm/Support/raw_ostream.h"
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include <utility>
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
#define DEBUG_TYPE "toolrunner"
|
#define DEBUG_TYPE "toolrunner"
|
||||||
@ -272,9 +273,9 @@ namespace {
|
|||||||
std::string CompilerCommand;
|
std::string CompilerCommand;
|
||||||
std::vector<std::string> CompilerArgs;
|
std::vector<std::string> CompilerArgs;
|
||||||
public:
|
public:
|
||||||
CustomCompiler(
|
CustomCompiler(const std::string &CompilerCmd,
|
||||||
const std::string &CompilerCmd, std::vector<std::string> CompArgs) :
|
std::vector<std::string> CompArgs)
|
||||||
CompilerCommand(CompilerCmd), CompilerArgs(CompArgs) {}
|
: CompilerCommand(CompilerCmd), CompilerArgs(std::move(CompArgs)) {}
|
||||||
|
|
||||||
void compileProgram(const std::string &Bitcode,
|
void compileProgram(const std::string &Bitcode,
|
||||||
std::string *Error,
|
std::string *Error,
|
||||||
@ -333,9 +334,9 @@ namespace {
|
|||||||
std::string ExecutionCommand;
|
std::string ExecutionCommand;
|
||||||
std::vector<std::string> ExecutorArgs;
|
std::vector<std::string> ExecutorArgs;
|
||||||
public:
|
public:
|
||||||
CustomExecutor(
|
CustomExecutor(const std::string &ExecutionCmd,
|
||||||
const std::string &ExecutionCmd, std::vector<std::string> ExecArgs) :
|
std::vector<std::string> ExecArgs)
|
||||||
ExecutionCommand(ExecutionCmd), ExecutorArgs(ExecArgs) {}
|
: ExecutionCommand(ExecutionCmd), ExecutorArgs(std::move(ExecArgs)) {}
|
||||||
|
|
||||||
int ExecuteProgram(const std::string &Bitcode,
|
int ExecuteProgram(const std::string &Bitcode,
|
||||||
const std::vector<std::string> &Args,
|
const std::vector<std::string> &Args,
|
||||||
|
@ -51,6 +51,7 @@
|
|||||||
#include <list>
|
#include <list>
|
||||||
#include <plugin-api.h>
|
#include <plugin-api.h>
|
||||||
#include <system_error>
|
#include <system_error>
|
||||||
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
// FIXME: remove this declaration when we stop maintaining Ubuntu Quantal and
|
// FIXME: remove this declaration when we stop maintaining Ubuntu Quantal and
|
||||||
@ -130,7 +131,8 @@ class ThinLTOTaskInfo {
|
|||||||
public:
|
public:
|
||||||
ThinLTOTaskInfo(std::unique_ptr<raw_fd_ostream> OS, std::string Filename,
|
ThinLTOTaskInfo(std::unique_ptr<raw_fd_ostream> OS, std::string Filename,
|
||||||
bool TempOutFile)
|
bool TempOutFile)
|
||||||
: OS(std::move(OS)), Filename(Filename), TempOutFile(TempOutFile) {}
|
: OS(std::move(OS)), Filename(std::move(Filename)),
|
||||||
|
TempOutFile(TempOutFile) {}
|
||||||
|
|
||||||
/// Performs task related cleanup activities that must be done
|
/// Performs task related cleanup activities that must be done
|
||||||
/// single-threaded (i.e. call backs to gold).
|
/// single-threaded (i.e. call backs to gold).
|
||||||
@ -904,7 +906,7 @@ public:
|
|||||||
const ModuleSummaryIndex *CombinedIndex, std::string Filename,
|
const ModuleSummaryIndex *CombinedIndex, std::string Filename,
|
||||||
StringMap<MemoryBufferRef> *ModuleMap)
|
StringMap<MemoryBufferRef> *ModuleMap)
|
||||||
: M(std::move(M)), OS(OS), TaskID(TaskID), CombinedIndex(CombinedIndex),
|
: M(std::move(M)), OS(OS), TaskID(TaskID), CombinedIndex(CombinedIndex),
|
||||||
SaveTempsFilename(Filename), ModuleMap(ModuleMap) {
|
SaveTempsFilename(std::move(Filename)), ModuleMap(ModuleMap) {
|
||||||
assert(options::thinlto == !!CombinedIndex &&
|
assert(options::thinlto == !!CombinedIndex &&
|
||||||
"Expected module summary index iff performing ThinLTO");
|
"Expected module summary index iff performing ThinLTO");
|
||||||
initTargetMachine();
|
initTargetMachine();
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include "llvm/Transforms/Utils/FunctionImportUtils.h"
|
#include "llvm/Transforms/Utils/FunctionImportUtils.h"
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <utility>
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
static cl::list<std::string>
|
static cl::list<std::string>
|
||||||
@ -146,7 +147,7 @@ public:
|
|||||||
ModuleLazyLoaderCache(std::function<std::unique_ptr<Module>(
|
ModuleLazyLoaderCache(std::function<std::unique_ptr<Module>(
|
||||||
const char *argv0, const std::string &FileName)>
|
const char *argv0, const std::string &FileName)>
|
||||||
createLazyModule)
|
createLazyModule)
|
||||||
: createLazyModule(createLazyModule) {}
|
: createLazyModule(std::move(createLazyModule)) {}
|
||||||
|
|
||||||
/// Retrieve a Module from the cache or lazily load it on demand.
|
/// Retrieve a Module from the cache or lazily load it on demand.
|
||||||
Module &operator()(const char *argv0, const std::string &FileName);
|
Module &operator()(const char *argv0, const std::string &FileName);
|
||||||
|
@ -59,6 +59,7 @@
|
|||||||
#include <cctype>
|
#include <cctype>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <system_error>
|
#include <system_error>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
using namespace object;
|
using namespace object;
|
||||||
@ -197,7 +198,7 @@ public:
|
|||||||
SectionFilterIterator(FilterPredicate P,
|
SectionFilterIterator(FilterPredicate P,
|
||||||
llvm::object::section_iterator const &I,
|
llvm::object::section_iterator const &I,
|
||||||
llvm::object::section_iterator const &E)
|
llvm::object::section_iterator const &E)
|
||||||
: Predicate(P), Iterator(I), End(E) {
|
: Predicate(std::move(P)), Iterator(I), End(E) {
|
||||||
ScanPredicate();
|
ScanPredicate();
|
||||||
}
|
}
|
||||||
const llvm::object::SectionRef &operator*() const { return *Iterator; }
|
const llvm::object::SectionRef &operator*() const { return *Iterator; }
|
||||||
@ -224,7 +225,7 @@ private:
|
|||||||
class SectionFilter {
|
class SectionFilter {
|
||||||
public:
|
public:
|
||||||
SectionFilter(FilterPredicate P, llvm::object::ObjectFile const &O)
|
SectionFilter(FilterPredicate P, llvm::object::ObjectFile const &O)
|
||||||
: Predicate(P), Object(O) {}
|
: Predicate(std::move(P)), Object(O) {}
|
||||||
SectionFilterIterator begin() {
|
SectionFilterIterator begin() {
|
||||||
return SectionFilterIterator(Predicate, Object.section_begin(),
|
return SectionFilterIterator(Predicate, Object.section_begin(),
|
||||||
Object.section_end());
|
Object.section_end());
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
@ -605,7 +606,8 @@ class IAPrinter {
|
|||||||
std::string Result;
|
std::string Result;
|
||||||
std::string AsmString;
|
std::string AsmString;
|
||||||
public:
|
public:
|
||||||
IAPrinter(std::string R, std::string AS) : Result(R), AsmString(AS) {}
|
IAPrinter(std::string R, std::string AS)
|
||||||
|
: Result(std::move(R)), AsmString(std::move(AS)) {}
|
||||||
|
|
||||||
void addCond(const std::string &C) { Conds.push_back(C); }
|
void addCond(const std::string &C) { Conds.push_back(C); }
|
||||||
|
|
||||||
|
@ -316,7 +316,8 @@ template <typename T> class ArrayRef;
|
|||||||
K_Reg
|
K_Reg
|
||||||
} Kind;
|
} Kind;
|
||||||
|
|
||||||
ResultOperand(std::string N, Record *r) : Name(N), R(r), Kind(K_Record) {}
|
ResultOperand(std::string N, Record *r)
|
||||||
|
: Name(std::move(N)), R(r), Kind(K_Record) {}
|
||||||
ResultOperand(int64_t I) : Imm(I), Kind(K_Imm) {}
|
ResultOperand(int64_t I) : Imm(I), Kind(K_Imm) {}
|
||||||
ResultOperand(Record *r) : R(r), Kind(K_Reg) {}
|
ResultOperand(Record *r) : R(r), Kind(K_Reg) {}
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include "llvm/TableGen/Error.h"
|
#include "llvm/TableGen/Error.h"
|
||||||
#include "llvm/TableGen/Record.h"
|
#include "llvm/TableGen/Record.h"
|
||||||
#include "llvm/TableGen/TableGenBackend.h"
|
#include "llvm/TableGen/TableGenBackend.h"
|
||||||
|
#include <utility>
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
|
|
||||||
@ -416,9 +417,7 @@ static std::string getLegalCName(std::string OpName) {
|
|||||||
return OpName;
|
return OpName;
|
||||||
}
|
}
|
||||||
|
|
||||||
FastISelMap::FastISelMap(std::string instns)
|
FastISelMap::FastISelMap(std::string instns) : InstNS(std::move(instns)) {}
|
||||||
: InstNS(instns) {
|
|
||||||
}
|
|
||||||
|
|
||||||
static std::string PhyRegForNode(TreePatternNode *Op,
|
static std::string PhyRegForNode(TreePatternNode *Op,
|
||||||
const CodeGenTarget &Target) {
|
const CodeGenTarget &Target) {
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include "llvm/TableGen/Record.h"
|
#include "llvm/TableGen/Record.h"
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
@ -47,7 +48,7 @@ struct OperandInfo {
|
|||||||
bool HasCompleteDecoder;
|
bool HasCompleteDecoder;
|
||||||
|
|
||||||
OperandInfo(std::string D, bool HCD)
|
OperandInfo(std::string D, bool HCD)
|
||||||
: Decoder(D), HasCompleteDecoder(HCD) { }
|
: Decoder(std::move(D)), HasCompleteDecoder(HCD) {}
|
||||||
|
|
||||||
void addField(unsigned Base, unsigned Width, unsigned Offset) {
|
void addField(unsigned Base, unsigned Width, unsigned Offset) {
|
||||||
Fields.push_back(EncodingField(Base, Width, Offset));
|
Fields.push_back(EncodingField(Base, Width, Offset));
|
||||||
@ -83,17 +84,16 @@ public:
|
|||||||
|
|
||||||
// Defaults preserved here for documentation, even though they aren't
|
// Defaults preserved here for documentation, even though they aren't
|
||||||
// strictly necessary given the way that this is currently being called.
|
// strictly necessary given the way that this is currently being called.
|
||||||
FixedLenDecoderEmitter(RecordKeeper &R,
|
FixedLenDecoderEmitter(RecordKeeper &R, std::string PredicateNamespace,
|
||||||
std::string PredicateNamespace,
|
std::string GPrefix = "if (",
|
||||||
std::string GPrefix = "if (",
|
|
||||||
std::string GPostfix = " == MCDisassembler::Fail)",
|
std::string GPostfix = " == MCDisassembler::Fail)",
|
||||||
std::string ROK = "MCDisassembler::Success",
|
std::string ROK = "MCDisassembler::Success",
|
||||||
std::string RFail = "MCDisassembler::Fail",
|
std::string RFail = "MCDisassembler::Fail",
|
||||||
std::string L = "") :
|
std::string L = "")
|
||||||
Target(R),
|
: Target(R), PredicateNamespace(std::move(PredicateNamespace)),
|
||||||
PredicateNamespace(PredicateNamespace),
|
GuardPrefix(std::move(GPrefix)), GuardPostfix(std::move(GPostfix)),
|
||||||
GuardPrefix(GPrefix), GuardPostfix(GPostfix),
|
ReturnOK(std::move(ROK)), ReturnFail(std::move(RFail)),
|
||||||
ReturnOK(ROK), ReturnFail(RFail), Locals(L) {}
|
Locals(std::move(L)) {}
|
||||||
|
|
||||||
// Emit the decoder state machine table.
|
// Emit the decoder state machine table.
|
||||||
void emitTable(formatted_raw_ostream &o, DecoderTable &Table,
|
void emitTable(formatted_raw_ostream &o, DecoderTable &Table,
|
||||||
|
Loading…
Reference in New Issue
Block a user