llvm.org GIT mirror llvm / 06d5a16
Do a sweep over move ctors and remove those that are identical to the default. All of these existed because MSVC 2013 was unable to synthesize default move ctors. We recently dropped support for it so all that error-prone boilerplate can go. No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284721 91177308-0d34-0410-b5e6-96231b3b80d8 Benjamin Kramer 2 years ago
47 changed file(s) with 29 addition(s) and 651 deletion(s). Raw diff Collapse all Expand all
853853 public:
854854 typedef AAResults Result;
855855
856 // This type has value semantics. We have to spell these out because MSVC
857 // won't synthesize them.
858 AAManager() {}
859 AAManager(AAManager &&Arg) : ResultGetters(std::move(Arg.ResultGetters)) {}
860 AAManager(const AAManager &Arg) : ResultGetters(Arg.ResultGetters) {}
861 AAManager &operator=(AAManager &&RHS) {
862 ResultGetters = std::move(RHS.ResultGetters);
863 return *this;
864 }
865 AAManager &operator=(const AAManager &RHS) {
866 ResultGetters = RHS.ResultGetters;
867 return *this;
868 }
869
870856 /// Register a specific AA result.
871857 template void registerFunctionAnalysis() {
872858 ResultGetters.push_back(&getFunctionAAResultImpl);
9999 public:
100100 typedef AssumptionCache Result;
101101
102 AssumptionAnalysis() {}
103 AssumptionAnalysis(const AssumptionAnalysis &Arg) {}
104 AssumptionAnalysis(AssumptionAnalysis &&Arg) {}
105 AssumptionAnalysis &operator=(const AssumptionAnalysis &RHS) { return *this; }
106 AssumptionAnalysis &operator=(AssumptionAnalysis &&RHS) { return *this; }
107
108102 AssumptionCache run(Function &F, FunctionAnalysisManager &) {
109103 return AssumptionCache(F);
110104 }
6969 /// itelf.
7070 class Dependence {
7171 protected:
72 Dependence(const Dependence &) = default;
73
74 // FIXME: When we move to MSVC 2015 as the base compiler for Visual Studio
75 // support, uncomment this line to allow a defaulted move constructor for
76 // Dependence. Currently, FullDependence relies on the copy constructor, but
77 // that is acceptable given the triviality of the class.
78 // Dependence(Dependence &&) = default;
72 Dependence(Dependence &&) = default;
73 Dependence &operator=(Dependence &&) = default;
7974
8075 public:
8176 Dependence(Instruction *Source,
220215 public:
221216 FullDependence(Instruction *Src, Instruction *Dst, bool LoopIndependent,
222217 unsigned Levels);
223
224 FullDependence(FullDependence &&RHS)
225 : Dependence(std::move(RHS)), Levels(RHS.Levels),
226 LoopIndependent(RHS.LoopIndependent), Consistent(RHS.Consistent),
227 DV(std::move(RHS.DV)) {}
228218
229219 /// isLoopIndependent - Returns true if this is a loop-independent
230220 /// dependence.
517517 LoopAccessInfo(Loop *L, ScalarEvolution *SE, const TargetLibraryInfo *TLI,
518518 AliasAnalysis *AA, DominatorTree *DT, LoopInfo *LI);
519519
520 // FIXME:
521 // Hack for MSVC 2013 which sems like it can't synthesize this even
522 // with default keyword:
523 // LoopAccessInfo(LoopAccessInfo &&LAI) = default;
524 LoopAccessInfo(LoopAccessInfo &&LAI)
525 : PSE(std::move(LAI.PSE)), PtrRtChecking(std::move(LAI.PtrRtChecking)),
526 DepChecker(std::move(LAI.DepChecker)), TheLoop(LAI.TheLoop),
527 NumLoads(LAI.NumLoads), NumStores(LAI.NumStores),
528 MaxSafeDepDistBytes(LAI.MaxSafeDepDistBytes), CanVecMem(LAI.CanVecMem),
529 StoreToLoopInvariantAddress(LAI.StoreToLoopInvariantAddress),
530 Report(std::move(LAI.Report)),
531 SymbolicStrides(std::move(LAI.SymbolicStrides)),
532 StrideSet(std::move(LAI.StrideSet)) {}
533 // LoopAccessInfo &operator=(LoopAccessInfo &&LAI) = default;
534 LoopAccessInfo &operator=(LoopAccessInfo &&LAI) {
535 assert(this != &LAI);
536
537 PSE = std::move(LAI.PSE);
538 PtrRtChecking = std::move(LAI.PtrRtChecking);
539 DepChecker = std::move(LAI.DepChecker);
540 TheLoop = LAI.TheLoop;
541 NumLoads = LAI.NumLoads;
542 NumStores = LAI.NumStores;
543 MaxSafeDepDistBytes = LAI.MaxSafeDepDistBytes;
544 CanVecMem = LAI.CanVecMem;
545 StoreToLoopInvariantAddress = LAI.StoreToLoopInvariantAddress;
546 Report = std::move(LAI.Report);
547 SymbolicStrides = std::move(LAI.SymbolicStrides);
548 StrideSet = std::move(LAI.StrideSet);
549 return *this;
550 }
551
552520 /// Return true we can analyze the memory accesses in the loop and there are
553521 /// no memory dependence cycles.
554522 bool canVectorizeMemory() const { return CanVecMem; }
6363 public:
6464 explicit FunctionToLoopPassAdaptor(LoopPassT Pass)
6565 : Pass(std::move(Pass)) {}
66 // We have to explicitly define all the special member functions because MSVC
67 // refuses to generate them.
68 FunctionToLoopPassAdaptor(const FunctionToLoopPassAdaptor &Arg)
69 : Pass(Arg.Pass) {}
70 FunctionToLoopPassAdaptor(FunctionToLoopPassAdaptor &&Arg)
71 : Pass(std::move(Arg.Pass)) {}
72 friend void swap(FunctionToLoopPassAdaptor &LHS,
73 FunctionToLoopPassAdaptor &RHS) {
74 using std::swap;
75 swap(LHS.Pass, RHS.Pass);
76 }
77 FunctionToLoopPassAdaptor &operator=(FunctionToLoopPassAdaptor RHS) {
78 swap(*this, RHS);
79 return *this;
80 }
8166
8267 /// \brief Runs the loop passes across every loop in the function.
8368 PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM) {
2525 typedef DominatorTreeBase Base;
2626
2727 PostDominatorTree() : DominatorTreeBase(true) {}
28
29 PostDominatorTree(PostDominatorTree &&Arg)
30 : Base(std::move(static_cast(Arg))) {}
31
32 PostDominatorTree &operator=(PostDominatorTree &&RHS) {
33 Base::operator=(std::move(static_cast(RHS)));
34 return *this;
35 }
3628 };
3729
3830 /// \brief Analysis pass which computes a \c PostDominatorTree.
8585 public:
8686 typedef ProfileSummaryInfo Result;
8787
88 ProfileSummaryAnalysis() {}
89 ProfileSummaryAnalysis(const ProfileSummaryAnalysis &Arg) {}
90 ProfileSummaryAnalysis(ProfileSummaryAnalysis &&Arg) {}
91 ProfileSummaryAnalysis &operator=(const ProfileSummaryAnalysis &RHS) {
92 return *this;
93 }
94 ProfileSummaryAnalysis &operator=(ProfileSummaryAnalysis &&RHS) {
95 return *this;
96 }
97
9888 Result run(Module &M, ModuleAnalysisManager &);
9989
10090 private:
608608 std::unique_ptr Predicate)
609609 : ExitingBlock(ExitingBlock), ExactNotTaken(ExactNotTaken),
610610 Predicate(std::move(Predicate)) {}
611
612 // Clang builds fine without this, but MSVC does not.
613 ExitNotTakenInfo(const ExitNotTakenInfo &) = delete;
614
615 ExitNotTakenInfo(ExitNotTakenInfo &&Other) {
616 ExitingBlock = std::move(Other.ExitingBlock);
617 ExactNotTaken = std::move(Other.ExactNotTaken);
618 Predicate = std::move(Other.Predicate);
619 }
620
621 ExitNotTakenInfo &operator=(ExitNotTakenInfo &&Other) {
622 ExitingBlock = std::move(Other.ExitingBlock);
623 ExactNotTaken = std::move(Other.ExactNotTaken);
624 Predicate = std::move(Other.Predicate);
625 return *this;
626 }
627611 };
628612
629613 /// Information about the backedge-taken count of a loop. This currently
652636 public:
653637 BackedgeTakenInfo() : MaxAndComplete(nullptr, 0) {}
654638
655 BackedgeTakenInfo(const BackedgeTakenInfo &) = delete;
656
657 BackedgeTakenInfo(BackedgeTakenInfo &&Other) {
658 ExitNotTaken = std::move(Other.ExitNotTaken);
659 MaxAndComplete = std::move(Other.MaxAndComplete);
660 }
661
662 BackedgeTakenInfo &operator=(BackedgeTakenInfo &&Other) {
663 ExitNotTaken = std::move(Other.ExitNotTaken);
664 MaxAndComplete = std::move(Other.MaxAndComplete);
665 return *this;
666 }
639 BackedgeTakenInfo(BackedgeTakenInfo &&) = default;
640 BackedgeTakenInfo &operator=(BackedgeTakenInfo &&) = default;
667641
668642 typedef std::pair EdgeExitInfo;
669643
2626 friend AAResultBase;
2727
2828 public:
29 explicit ScopedNoAliasAAResult() : AAResultBase() {}
30 ScopedNoAliasAAResult(ScopedNoAliasAAResult &&Arg)
31 : AAResultBase(std::move(Arg)) {}
32
3329 /// Handle invalidation events from the new pass manager.
3430 ///
3531 /// By definition, this result is stateless and so remains valid.
296296 TargetLibraryAnalysis(TargetLibraryInfoImpl PresetInfoImpl)
297297 : PresetInfoImpl(std::move(PresetInfoImpl)) {}
298298
299 // Move semantics. We spell out the constructors for MSVC.
300 TargetLibraryAnalysis(TargetLibraryAnalysis &&Arg)
301 : PresetInfoImpl(std::move(Arg.PresetInfoImpl)), Impls(std::move(Arg.Impls)) {}
302 TargetLibraryAnalysis &operator=(TargetLibraryAnalysis &&RHS) {
303 PresetInfoImpl = std::move(RHS.PresetInfoImpl);
304 Impls = std::move(RHS.Impls);
305 return *this;
306 }
307
308299 TargetLibraryInfo run(Module &M, ModuleAnalysisManager &);
309300 TargetLibraryInfo run(Function &F, FunctionAnalysisManager &);
310301
434434 explicit TargetTransformInfoImplCRTPBase(const DataLayout &DL) : BaseT(DL) {}
435435
436436 public:
437 // Provide value semantics. MSVC requires that we spell all of these out.
438 TargetTransformInfoImplCRTPBase(const TargetTransformInfoImplCRTPBase &Arg)
439 : BaseT(static_cast(Arg)) {}
440 TargetTransformInfoImplCRTPBase(TargetTransformInfoImplCRTPBase &&Arg)
441 : BaseT(std::move(static_cast(Arg))) {}
442
443437 using BaseT::getCallCost;
444438
445439 unsigned getCallCost(const Function *F, int NumArgs) {
2626 friend AAResultBase;
2727
2828 public:
29 explicit TypeBasedAAResult() {}
30 TypeBasedAAResult(TypeBasedAAResult &&Arg) : AAResultBase(std::move(Arg)) {}
31
3229 /// Handle invalidation events from the new pass manager.
3330 ///
3431 /// By definition, this result is stateless and so remains valid.
5757 /// information in the BlockInfo block. Only llvm-bcanalyzer uses this.
5858 bool IgnoreBlockInfoNames;
5959
60 BitstreamReader(const BitstreamReader&) = delete;
61 void operator=(const BitstreamReader&) = delete;
62
6360 public:
6461 BitstreamReader() : IgnoreBlockInfoNames(true) {
6562 }
7168
7269 BitstreamReader(std::unique_ptr BitcodeBytes)
7370 : BitcodeBytes(std::move(BitcodeBytes)), IgnoreBlockInfoNames(true) {}
74
75 BitstreamReader(BitstreamReader &&Other) {
76 *this = std::move(Other);
77 }
78
79 BitstreamReader &operator=(BitstreamReader &&Other) {
80 BitcodeBytes = std::move(Other.BitcodeBytes);
81 // Explicitly swap block info, so that nothing gets destroyed twice.
82 std::swap(BlockInfoRecords, Other.BlockInfoRecords);
83 IgnoreBlockInfoNames = Other.IgnoreBlockInfoNames;
84 return *this;
85 }
8671
8772 void init(const unsigned char *Start, const unsigned char *End) {
8873 assert(((End-Start) & 3) == 0 &&"Bitcode stream not a multiple of 4 bytes");
9696 using TargetTransformInfoImplBase::DL;
9797
9898 public:
99 // Provide value semantics. MSVC requires that we spell all of these out.
100 BasicTTIImplBase(const BasicTTIImplBase &Arg)
101 : BaseT(static_cast(Arg)) {}
102 BasicTTIImplBase(BasicTTIImplBase &&Arg)
103 : BaseT(std::move(static_cast(Arg))) {}
104
10599 /// \name Scalar TTI Implementations
106100 /// @{
107101 bool allowsMisalignedMemoryAccesses(LLVMContext &Context,
960954
961955 public:
962956 explicit BasicTTIImpl(const TargetMachine *ST, const Function &F);
963
964 // Provide value semantics. MSVC requires that we spell all of these out.
965 BasicTTIImpl(const BasicTTIImpl &Arg)
966 : BaseT(static_cast(Arg)), ST(Arg.ST), TLI(Arg.TLI) {}
967 BasicTTIImpl(BasicTTIImpl &&Arg)
968 : BaseT(std::move(static_cast(Arg))), ST(std::move(Arg.ST)),
969 TLI(std::move(Arg.TLI)) {}
970957 };
971958
972959 }
8888
8989 class StaticGlobalRenamer {
9090 public:
91 StaticGlobalRenamer() {}
92
93 StaticGlobalRenamer(StaticGlobalRenamer &&Other)
94 : NextId(Other.NextId) {}
95
96 StaticGlobalRenamer& operator=(StaticGlobalRenamer &&Other) {
97 NextId = Other.NextId;
98 return *this;
99 }
91 StaticGlobalRenamer() = default;
92 StaticGlobalRenamer(StaticGlobalRenamer &&) = default;
93 StaticGlobalRenamer &operator=(StaticGlobalRenamer &&) = default;
10094
10195 void rename(Module &M) {
10296 for (auto &F : M)
123117 struct SourceModuleEntry {
124118 std::unique_ptr> SourceMod;
125119 std::set StubsToClone;
126
127 SourceModuleEntry() = default;
128 SourceModuleEntry(SourceModuleEntry &&Other)
129 : SourceMod(std::move(Other.SourceMod)),
130 StubsToClone(std::move(Other.StubsToClone)) {}
131 SourceModuleEntry& operator=(SourceModuleEntry &&Other) {
132 SourceMod = std::move(Other.SourceMod);
133 StubsToClone = std::move(Other.StubsToClone);
134 return *this;
135 }
136120 };
137121
138122 typedef std::vector SourceModulesList;
139123 typedef typename SourceModulesList::size_type SourceModuleHandle;
140
141 LogicalDylib() = default;
142
143 // Explicit move constructor to make MSVC happy.
144 LogicalDylib(LogicalDylib &&Other)
145 : ExternalSymbolResolver(std::move(Other.ExternalSymbolResolver)),
146 MemMgr(std::move(Other.MemMgr)),
147 StubsMgr(std::move(Other.StubsMgr)),
148 StaticRenamer(std::move(Other.StaticRenamer)),
149 ModuleAdder(std::move(Other.ModuleAdder)),
150 SourceModules(std::move(Other.SourceModules)),
151 BaseLayerHandles(std::move(Other.BaseLayerHandles)) {}
152
153 // Explicit move assignment operator to make MSVC happy.
154 LogicalDylib& operator=(LogicalDylib &&Other) {
155 ExternalSymbolResolver = std::move(Other.ExternalSymbolResolver);
156 MemMgr = std::move(Other.MemMgr);
157 StubsMgr = std::move(Other.StubsMgr);
158 StaticRenamer = std::move(Other.StaticRenamer);
159 ModuleAdder = std::move(Other.ModuleAdder);
160 SourceModules = std::move(Other.SourceModules);
161 BaseLayerHandles = std::move(Other.BaseLayerHandles);
162 return *this;
163 }
164124
165125 SourceModuleHandle
166126 addSourceModule(std::unique_ptr> M) {
408408 RPC() = default;
409409
410410 /// RPC instances cannot be copied.
411 RPC(const RPC &) = delete;
412
413 /// RPC instances cannot be copied.
414 RPC &operator=(const RPC &) = delete;
415
416 /// RPC move constructor.
417 // FIXME: Remove once MSVC can synthesize move ops.
418 RPC(RPC &&Other)
419 : SequenceNumberMgr(std::move(Other.SequenceNumberMgr)),
420 OutstandingResults(std::move(Other.OutstandingResults)) {}
421
422 /// RPC move assignment.
423 // FIXME: Remove once MSVC can synthesize move ops.
424 RPC &operator=(RPC &&Other) {
425 SequenceNumberMgr = std::move(Other.SequenceNumberMgr);
426 OutstandingResults = std::move(Other.OutstandingResults);
427 return *this;
428 }
411 RPC(RPC &&) = default;
412 RPC &operator=(RPC &&) = default;
429413
430414 /// Utility class for defining/referring to RPC procedures.
431415 ///
3434 TrackingMDNodeRef Loc;
3535
3636 public:
37 DebugLoc() {}
38 DebugLoc(DebugLoc &&X) : Loc(std::move(X.Loc)) {}
39 DebugLoc(const DebugLoc &X) : Loc(X.Loc) {}
40 DebugLoc &operator=(DebugLoc &&X) {
41 Loc = std::move(X.Loc);
42 return *this;
43 }
44 DebugLoc &operator=(const DebugLoc &X) {
45 Loc = X.Loc;
46 return *this;
47 }
37 DebugLoc() = default;
4838
4939 /// \brief Construct from an \a DILocation.
5040 DebugLoc(const DILocation *L);
101101 recalculate(F);
102102 }
103103
104 DominatorTree(DominatorTree &&Arg)
105 : Base(std::move(static_cast(Arg))) {}
106 DominatorTree &operator=(DominatorTree &&RHS) {
107 Base::operator=(std::move(static_cast(RHS)));
108 return *this;
109 }
110
111104 /// \brief Returns *false* if the other dominator tree matches this dominator
112105 /// tree.
113106 inline bool compare(const DominatorTree &Other) const {
357357 ModulePathStringTableTy ModulePathStringTable;
358358
359359 public:
360 ModuleSummaryIndex() = default;
361 ModuleSummaryIndex(ModuleSummaryIndex &&Arg)
362 : GlobalValueMap(std::move(Arg.GlobalValueMap)),
363 ModulePathStringTable(std::move(Arg.ModulePathStringTable)) {}
364 ModuleSummaryIndex &operator=(ModuleSummaryIndex &&RHS) {
365 GlobalValueMap = std::move(RHS.GlobalValueMap);
366 ModulePathStringTable = std::move(RHS.ModulePathStringTable);
367 return *this;
368 }
369
370360 gvsummary_iterator begin() { return GlobalValueMap.begin(); }
371361 const_gvsummary_iterator begin() const { return GlobalValueMap.begin(); }
372362 gvsummary_iterator end() { return GlobalValueMap.end(); }
6464 /// the IR is not mutated at all.
6565 class PreservedAnalyses {
6666 public:
67 // We have to explicitly define all the special member functions because MSVC
68 // refuses to generate them.
69 PreservedAnalyses() {}
70 PreservedAnalyses(const PreservedAnalyses &Arg)
71 : PreservedPassIDs(Arg.PreservedPassIDs) {}
72 PreservedAnalyses(PreservedAnalyses &&Arg)
73 : PreservedPassIDs(std::move(Arg.PreservedPassIDs)) {}
74 friend void swap(PreservedAnalyses &LHS, PreservedAnalyses &RHS) {
75 using std::swap;
76 swap(LHS.PreservedPassIDs, RHS.PreservedPassIDs);
77 }
78 PreservedAnalyses &operator=(PreservedAnalyses RHS) {
79 swap(*this, RHS);
80 return *this;
81 }
82
8367 /// \brief Convenience factory function for the empty preserved set.
8468 static PreservedAnalyses none() { return PreservedAnalyses(); }
8569
256240 ///
257241 /// It can be passed a flag to get debug logging as the passes are run.
258242 PassManager(bool DebugLogging = false) : DebugLogging(DebugLogging) {}
259 // We have to explicitly define all the special member functions because MSVC
260 // refuses to generate them.
261 PassManager(PassManager &&Arg)
262 : Passes(std::move(Arg.Passes)),
263 DebugLogging(std::move(Arg.DebugLogging)) {}
264 PassManager &operator=(PassManager &&RHS) {
265 Passes = std::move(RHS.Passes);
266 DebugLogging = std::move(RHS.DebugLogging);
267 return *this;
268 }
243 PassManager(PassManager &&) = default;
244 PassManager &operator=(PassManager &&) = default;
269245
270246 /// \brief Run all of the passes in this manager over the IR.
271247 PreservedAnalyses run(IRUnitT &IR, AnalysisManagerT &AM,
322298 typedef detail::PassConcept
323299 PassConceptT;
324300
325 PassManager(const PassManager &) = delete;
326 PassManager &operator=(const PassManager &) = delete;
327
328301 std::vector> Passes;
329302
330303 /// \brief Flag indicating whether we should do debug logging.
357330 /// A flag can be passed to indicate that the manager should perform debug
358331 /// logging.
359332 AnalysisManager(bool DebugLogging = false) : DebugLogging(DebugLogging) {}
360
361 // We have to explicitly define all the special member functions because MSVC
362 // refuses to generate them.
363 AnalysisManager(AnalysisManager &&Arg)
364 : AnalysisPasses(std::move(Arg.AnalysisPasses)),
365 AnalysisResults(std::move(Arg.AnalysisResults)),
366 DebugLogging(std::move(Arg.DebugLogging)) {}
367 AnalysisManager &operator=(AnalysisManager &&RHS) {
368 AnalysisPasses = std::move(RHS.AnalysisPasses);
369 AnalysisResults = std::move(RHS.AnalysisResults);
370 DebugLogging = std::move(RHS.DebugLogging);
371 return *this;
372 }
333 AnalysisManager(AnalysisManager &&) = default;
334 AnalysisManager &operator=(AnalysisManager &&) = default;
373335
374336 /// \brief Returns true if the analysis manager has an empty results cache.
375337 bool empty() const {
542504 }
543505
544506 private:
545 AnalysisManager(const AnalysisManager &) = delete;
546 AnalysisManager &operator=(const AnalysisManager &) = delete;
547
548507 /// \brief Lookup a registered analysis pass.
549508 PassConceptT &lookupPass(void *PassID) {
550509 typename AnalysisPassMapT::iterator PI = AnalysisPasses.find(PassID);
730689 };
731690
732691 explicit InnerAnalysisManagerProxy(AnalysisManagerT &AM) : AM(&AM) {}
733 // We have to explicitly define all the special member functions because MSVC
734 // refuses to generate them.
735 InnerAnalysisManagerProxy(const InnerAnalysisManagerProxy &Arg)
736 : AM(Arg.AM) {}
737 InnerAnalysisManagerProxy(InnerAnalysisManagerProxy &&Arg)
738 : AM(std::move(Arg.AM)) {}
739 InnerAnalysisManagerProxy &operator=(InnerAnalysisManagerProxy RHS) {
740 std::swap(AM, RHS.AM);
741 return *this;
742 }
743692
744693 /// \brief Run the analysis pass and create our proxy result object.
745694 ///
794743 class Result {
795744 public:
796745 explicit Result(const AnalysisManagerT &AM) : AM(&AM) {}
797 // We have to explicitly define all the special member functions because
798 // MSVC refuses to generate them.
799 Result(const Result &Arg) : AM(Arg.AM) {}
800 Result(Result &&Arg) : AM(std::move(Arg.AM)) {}
801 Result &operator=(Result RHS) {
802 std::swap(AM, RHS.AM);
803 return *this;
804 }
805746
806747 const AnalysisManagerT &getManager() const { return *AM; }
807748
813754 };
814755
815756 OuterAnalysisManagerProxy(const AnalysisManagerT &AM) : AM(&AM) {}
816 // We have to explicitly define all the special member functions because MSVC
817 // refuses to generate them.
818 OuterAnalysisManagerProxy(const OuterAnalysisManagerProxy &Arg)
819 : AM(Arg.AM) {}
820 OuterAnalysisManagerProxy(OuterAnalysisManagerProxy &&Arg)
821 : AM(std::move(Arg.AM)) {}
822 OuterAnalysisManagerProxy &operator=(OuterAnalysisManagerProxy RHS) {
823 std::swap(AM, RHS.AM);
824 return *this;
825 }
826757
827758 /// \brief Run the analysis pass and create our proxy result object.
828759 /// Nothing to see here, it just forwards the \c AM reference into the
878809 public:
879810 explicit ModuleToFunctionPassAdaptor(FunctionPassT Pass)
880811 : Pass(std::move(Pass)) {}
881 // We have to explicitly define all the special member functions because MSVC
882 // refuses to generate them.
883 ModuleToFunctionPassAdaptor(const ModuleToFunctionPassAdaptor &Arg)
884 : Pass(Arg.Pass) {}
885 ModuleToFunctionPassAdaptor(ModuleToFunctionPassAdaptor &&Arg)
886 : Pass(std::move(Arg.Pass)) {}
887 friend void swap(ModuleToFunctionPassAdaptor &LHS,
888 ModuleToFunctionPassAdaptor &RHS) {
889 using std::swap;
890 swap(LHS.Pass, RHS.Pass);
891 }
892 ModuleToFunctionPassAdaptor &operator=(ModuleToFunctionPassAdaptor RHS) {
893 swap(*this, RHS);
894 return *this;
895 }
896812
897813 /// \brief Runs the function pass across every function in the module.
898814 PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM) {
1013929 class RepeatedPass : public PassInfoMixin> {
1014930 public:
1015931 RepeatedPass(int Count, PassT P) : Count(Count), P(std::move(P)) {}
1016 // We have to explicitly define all the special member functions because MSVC
1017 // refuses to generate them.
1018 RepeatedPass(const RepeatedPass &Arg) : Count(Arg.Count), P(Arg.P) {}
1019 RepeatedPass(RepeatedPass &&Arg) : Count(Arg.Count), P(std::move(Arg.P)) {}
1020 friend void swap(RepeatedPass &LHS, RepeatedPass &RHS) {
1021 using std::swap;
1022 swap(LHS.Count, RHS.Count);
1023 swap(LHS.P, RHS.P);
1024 }
1025 RepeatedPass &operator=(RepeatedPass RHS) {
1026 swap(*this, RHS);
1027 return *this;
1028 }
1029932
1030933 template
1031934 PreservedAnalyses run(IRUnitT &Arg, AnalysisManagerT &AM, Ts &&... Args) {
3333 : V(V), F(F), Shuffle(ShuffleSize) {}
3434
3535 UseListOrder() : V(nullptr), F(nullptr) {}
36 UseListOrder(UseListOrder &&X)
37 : V(X.V), F(X.F), Shuffle(std::move(X.Shuffle)) {}
38 UseListOrder &operator=(UseListOrder &&X) {
39 V = X.V;
40 F = X.F;
41 Shuffle = std::move(X.Shuffle);
42 return *this;
43 }
44
45 private:
46 UseListOrder(const UseListOrder &X) = delete;
47 UseListOrder &operator=(const UseListOrder &X) = delete;
36 UseListOrder(UseListOrder &&) = default;
37 UseListOrder &operator=(UseListOrder &&) = default;
4838 };
4939
5040 typedef std::vector UseListOrderStack;
133133 CombinedIndexHookFn;
134134 CombinedIndexHookFn CombinedIndexHook;
135135
136 Config() {}
137 // FIXME: Remove once MSVC can synthesize move ops.
138 Config(Config &&X)
139 : CPU(std::move(X.CPU)), Features(std::move(X.Features)),
140 Options(std::move(X.Options)), MAttrs(std::move(X.MAttrs)),
141 RelocModel(std::move(X.RelocModel)), CodeModel(std::move(X.CodeModel)),
142 CGOptLevel(std::move(X.CGOptLevel)), OptLevel(std::move(X.OptLevel)),
143 DisableVerify(std::move(X.DisableVerify)),
144 OptPipeline(std::move(X.OptPipeline)),
145 AAPipeline(std::move(X.AAPipeline)),
146 OverrideTriple(std::move(X.OverrideTriple)),
147 DefaultTriple(std::move(X.DefaultTriple)),
148 ShouldDiscardValueNames(std::move(X.ShouldDiscardValueNames)),
149 DiagHandler(std::move(X.DiagHandler)),
150 ResolutionFile(std::move(X.ResolutionFile)),
151 PreOptModuleHook(std::move(X.PreOptModuleHook)),
152 PostPromoteModuleHook(std::move(X.PostPromoteModuleHook)),
153 PostInternalizeModuleHook(std::move(X.PostInternalizeModuleHook)),
154 PostImportModuleHook(std::move(X.PostImportModuleHook)),
155 PostOptModuleHook(std::move(X.PostOptModuleHook)),
156 PreCodeGenModuleHook(std::move(X.PreCodeGenModuleHook)),
157 CombinedIndexHook(std::move(X.CombinedIndexHook)) {}
158 // FIXME: Remove once MSVC can synthesize move ops.
159 Config &operator=(Config &&X) {
160 CPU = std::move(X.CPU);
161 Features = std::move(X.Features);
162 Options = std::move(X.Options);
163 MAttrs = std::move(X.MAttrs);
164 RelocModel = std::move(X.RelocModel);
165 CodeModel = std::move(X.CodeModel);
166 CGOptLevel = std::move(X.CGOptLevel);
167 OptLevel = std::move(X.OptLevel);
168 DisableVerify = std::move(X.DisableVerify);
169 OptPipeline = std::move(X.OptPipeline);
170 AAPipeline = std::move(X.AAPipeline);
171 OverrideTriple = std::move(X.OverrideTriple);
172 DefaultTriple = std::move(X.DefaultTriple);
173 ShouldDiscardValueNames = std::move(X.ShouldDiscardValueNames);
174 DiagHandler = std::move(X.DiagHandler);
175 ResolutionFile = std::move(X.ResolutionFile);
176 PreOptModuleHook = std::move(X.PreOptModuleHook);
177 PostPromoteModuleHook = std::move(X.PostPromoteModuleHook);
178 PostInternalizeModuleHook = std::move(X.PostInternalizeModuleHook);
179 PostImportModuleHook = std::move(X.PostImportModuleHook);
180 PostOptModuleHook = std::move(X.PostOptModuleHook);
181 PreCodeGenModuleHook = std::move(X.PreCodeGenModuleHook);
182 CombinedIndexHook = std::move(X.CombinedIndexHook);
183 return *this;
184 }
185
186136 /// This is a convenience function that configures this Config object to write
187137 /// temporary files named after the given OutputFileName for each of the LTO
188138 /// phases to disk. A client can use this function to implement -save-temps.
2525 unsigned UID = 0, GID = 0, Perms = 0644;
2626
2727 NewArchiveMember() = default;
28 NewArchiveMember(NewArchiveMember &&Other)
29 : Buf(std::move(Other.Buf)), ModTime(Other.ModTime), UID(Other.UID),
30 GID(Other.GID), Perms(Other.Perms) {}
31 NewArchiveMember &operator=(NewArchiveMember &&Other) {
32 Buf = std::move(Other.Buf);
33 ModTime = Other.ModTime;
34 UID = Other.UID;
35 GID = Other.GID;
36 Perms = Other.Perms;
37 return *this;
38 }
3928 NewArchiveMember(MemoryBufferRef BufRef);
4029
4130 static Expected
290290 FunctionRecord(StringRef Name, ArrayRef Filenames)
291291 : Name(Name), Filenames(Filenames.begin(), Filenames.end()) {}
292292
293 FunctionRecord(FunctionRecord &&FR)
294 : Name(FR.Name), Filenames(std::move(FR.Filenames)),
295 CountedRegions(std::move(FR.CountedRegions)),
296 ExecutionCount(FR.ExecutionCount) {}
297
298 FunctionRecord(const FunctionRecord &) = delete;
299 const FunctionRecord &operator=(const FunctionRecord &) = delete;
293 FunctionRecord(FunctionRecord &&FR) = default;
294 FunctionRecord &operator=(FunctionRecord &&) = default;
300295
301296 void pushRegion(CounterMappingRegion Region, uint64_t Count) {
302297 if (CountedRegions.empty())
404399
405400 CoverageData(StringRef Filename) : Filename(Filename) {}
406401
407 CoverageData(CoverageData &&RHS)
408 : Filename(std::move(RHS.Filename)), Segments(std::move(RHS.Segments)),
409 Expansions(std::move(RHS.Expansions)) {}
410
411402 /// \brief Get the name of the file this data covers.
412403 StringRef getFilename() const { return Filename; }
413404
5050
5151 /// This is the location of the parent include, or null if at the top level.
5252 SMLoc IncludeLoc;
53
54 SrcBuffer() {}
55
56 SrcBuffer(SrcBuffer &&O)
57 : Buffer(std::move(O.Buffer)), IncludeLoc(O.IncludeLoc) {}
5853 };
5954
6055 /// This is all of the buffers that we are reading from.
3030 public:
3131 static StringRef name() { return "InstCombinePass"; }
3232
33 // Explicitly define constructors for MSVC.
34 InstCombinePass(bool ExpensiveCombines = true)
33 explicit InstCombinePass(bool ExpensiveCombines = true)
3534 : ExpensiveCombines(ExpensiveCombines) {}
36 InstCombinePass(InstCombinePass &&Arg)
37 : Worklist(std::move(Arg.Worklist)),
38 ExpensiveCombines(Arg.ExpensiveCombines) {}
39 InstCombinePass &operator=(InstCombinePass &&RHS) {
40 Worklist = std::move(RHS.Worklist);
41 ExpensiveCombines = RHS.ExpensiveCombines;
42 return *this;
43 }
4435
4536 PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
4637 };
2727 SmallVector Worklist;
2828 DenseMap WorklistMap;
2929
30 void operator=(const InstCombineWorklist&RHS) = delete;
31 InstCombineWorklist(const InstCombineWorklist&) = delete;
3230 public:
33 InstCombineWorklist() {}
31 InstCombineWorklist() = default;
3432
35 InstCombineWorklist(InstCombineWorklist &&Arg)
36 : Worklist(std::move(Arg.Worklist)),
37 WorklistMap(std::move(Arg.WorklistMap)) {}
38 InstCombineWorklist &operator=(InstCombineWorklist &&RHS) {
39 Worklist = std::move(RHS.Worklist);
40 WorklistMap = std::move(RHS.WorklistMap);
41 return *this;
42 }
33 InstCombineWorklist(InstCombineWorklist &&) = default;
34 InstCombineWorklist &operator=(InstCombineWorklist &&) = default;
4335
4436 bool isEmpty() const { return Worklist.empty(); }
4537
8484
8585 public:
8686 JumpThreadingPass(int T = -1);
87 // Hack for MSVC 2013 which seems like it can't synthesize this.
88 JumpThreadingPass(JumpThreadingPass &&Other)
89 : TLI(Other.TLI), LVI(Other.LVI), BFI(std::move(Other.BFI)),
90 BPI(std::move(Other.BPI)), HasProfileData(Other.HasProfileData),
91 LoopHeaders(std::move(Other.LoopHeaders)),
92 RecursionSet(std::move(Other.RecursionSet)),
93 BBDupThreshold(Other.BBDupThreshold) {}
9487
9588 // Glue for old PM.
9689 bool runImpl(Function &F, TargetLibraryInfo *TLI_, LazyValueInfo *LVI_,
4747 struct InlineGraphNode {
4848 // Default-constructible and movable.
4949 InlineGraphNode() = default;
50 // FIXME: make them default ctors when we won't support ancient compilers
51 // like MSVS-2013.
52 InlineGraphNode(InlineGraphNode &&Other)
53 : InlinedCallees(std::move(Other.InlinedCallees)),
54 NumberOfInlines(Other.NumberOfInlines),
55 NumberOfRealInlines(Other.NumberOfRealInlines),
56 Imported(Other.Imported),
57 Visited(Other.Visited) {}
58
59 InlineGraphNode &operator=(InlineGraphNode &&Other) {
60 InlinedCallees = std::move(Other.InlinedCallees);
61 NumberOfInlines = Other.NumberOfInlines;
62 NumberOfRealInlines = Other.NumberOfRealInlines;
63 Imported = Other.Imported;
64 Visited = Other.Visited;
65 return *this;
66 }
67
68 InlineGraphNode(const InlineGraphNode &) = delete;
69 InlineGraphNode &operator=(const InlineGraphNode &) = delete;
50 InlineGraphNode(InlineGraphNode &&) = default;
51 InlineGraphNode &operator=(InlineGraphNode &&) = default;
7052
7153 llvm::SmallVector InlinedCallees;
7254 /// Incremented every direct inline.
661661 // unique_ptr to avoid build breakage on MSVC.
662662 struct Result {
663663 Result(std::unique_ptr &&MSSA) : MSSA(std::move(MSSA)) {}
664 Result(Result &&R) : MSSA(std::move(R.MSSA)) {}
665664 MemorySSA &getMSSA() { return *MSSA.get(); }
666
667 Result(const Result &) = delete;
668 void operator=(const Result &) = delete;
669665
670666 std::unique_ptr MSSA;
671667 };
119119 Descriptors.splice(Descriptors.begin(), DL);
120120 }
121121
122 RewriteSymbolPass(RewriteSymbolPass &&Other)
123 : Descriptors(std::move(Other.Descriptors)) {}
124
125122 PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
126123
127124 // Glue for old PM
8484 template class StratifiedSets {
8585 public:
8686 StratifiedSets() = default;
87
88 // TODO: Figure out how to make MSVC not call the copy ctor here, and delete
89 // it.
90
91 // Can't default these due to compile errors in MSVC2013
92 StratifiedSets(StratifiedSets &&Other) { *this = std::move(Other); }
93 StratifiedSets &operator=(StratifiedSets &&Other) {
94 Values = std::move(Other.Values);
95 Links = std::move(Other.Links);
96 return *this;
97 }
87 StratifiedSets(StratifiedSets &&) = default;
88 StratifiedSets &operator=(StratifiedSets &&) = default;
9889
9990 StratifiedSets(DenseMap Map,
10091 std::vector Links)
6767 RegisteredObjectInfo(std::size_t Size, jit_code_entry *Entry,
6868 OwningBinary Obj)
6969 : Size(Size), Entry(Entry), Obj(std::move(Obj)) {}
70
71 RegisteredObjectInfo(RegisteredObjectInfo &&Other)
72 : Size(Other.Size), Entry(Other.Entry), Obj(std::move(Other.Obj)) {}
73
74 RegisteredObjectInfo& operator=(RegisteredObjectInfo &&Other) {
75 Size = Other.Size;
76 Entry = Other.Entry;
77 Obj = std::move(Other.Obj);
78 return *this;
79 }
8070
8171 std::size_t Size;
8272 jit_code_entry *Entry;
4040 public:
4141 AllocaHolder() {}
4242
43 // Make this type move-only. Define explicit move special members for MSVC.
44 AllocaHolder(AllocaHolder &&RHS) : Allocations(std::move(RHS.Allocations)) {}
45 AllocaHolder &operator=(AllocaHolder &&RHS) {
46 Allocations = std::move(RHS.Allocations);
47 return *this;
48 }
43 // Make this type move-only.
44 AllocaHolder(AllocaHolder &&) = default;
45 AllocaHolder &operator=(AllocaHolder &&RHS) = default;
4946
5047 ~AllocaHolder() {
5148 for (void *Allocation : Allocations)
7168 AllocaHolder Allocas; // Track memory allocated by alloca
7269
7370 ExecutionContext() : CurFunction(nullptr), CurBB(nullptr), CurInst(nullptr) {}
74
75 ExecutionContext(ExecutionContext &&O)
76 : CurFunction(O.CurFunction), CurBB(O.CurBB), CurInst(O.CurInst),
77 Caller(O.Caller), Values(std::move(O.Values)),
78 VarArgs(std::move(O.VarArgs)), Allocas(std::move(O.Allocas)) {}
79
80 ExecutionContext &operator=(ExecutionContext &&O) {
81 CurFunction = O.CurFunction;
82 CurBB = O.CurBB;
83 CurInst = O.CurInst;
84 Caller = O.Caller;
85 Values = std::move(O.Values);
86 VarArgs = std::move(O.VarArgs);
87 Allocas = std::move(O.Allocas);
88 return *this;
89 }
9071 };
9172
9273 // Interpreter - This class represents the entirety of the interpreter.
3131 /// reason for doing so is efficiency; StringSet is much faster at matching
3232 /// literal strings than Regex.
3333 struct SpecialCaseList::Entry {
34 Entry() {}
35 Entry(Entry &&Other)
36 : Strings(std::move(Other.Strings)), RegEx(std::move(Other.RegEx)) {}
37
3834 StringSet<> Strings;
3935 std::unique_ptr RegEx;
4036
5050 explicit AArch64TTIImpl(const AArch64TargetMachine *TM, const Function &F)
5151 : BaseT(TM, F.getParent()->getDataLayout()), ST(TM->getSubtargetImpl(F)),
5252 TLI(ST->getTargetLowering()) {}
53
54 // Provide value semantics. MSVC requires that we spell all of these out.
55 AArch64TTIImpl(const AArch64TTIImpl &Arg)
56 : BaseT(static_cast(Arg)), ST(Arg.ST), TLI(Arg.TLI) {}
57 AArch64TTIImpl(AArch64TTIImpl &&Arg)
58 : BaseT(std::move(static_cast(Arg))), ST(std::move(Arg.ST)),
59 TLI(std::move(Arg.TLI)) {}
6053
6154 /// \name Scalar TTI Implementations
6255 /// @{
6363 ST(TM->getSubtargetImpl(F)),
6464 TLI(ST->getTargetLowering()) {}
6565
66 // Provide value semantics. MSVC requires that we spell all of these out.
67 AMDGPUTTIImpl(const AMDGPUTTIImpl &Arg)
68 : BaseT(static_cast(Arg)), ST(Arg.ST), TLI(Arg.TLI) {}
69 AMDGPUTTIImpl(AMDGPUTTIImpl &&Arg)
70 : BaseT(std::move(static_cast(Arg))), ST(std::move(Arg.ST)),
71 TLI(std::move(Arg.TLI)) {}
72
7366 bool hasBranchDivergence() { return true; }
7467
7568 void getUnrollingPreferences(Loop *L, TTI::UnrollingPreferences &UP);
4343 explicit ARMTTIImpl(const ARMBaseTargetMachine *TM, const Function &F)
4444 : BaseT(TM, F.getParent()->getDataLayout()), ST(TM->getSubtargetImpl(F)),
4545 TLI(ST->getTargetLowering()) {}
46
47 // Provide value semantics. MSVC requires that we spell all of these out.
48 ARMTTIImpl(const ARMTTIImpl &Arg)
49 : BaseT(static_cast(Arg)), ST(Arg.ST), TLI(Arg.TLI) {}
50 ARMTTIImpl(ARMTTIImpl &&Arg)
51 : BaseT(std::move(static_cast(Arg))), ST(std::move(Arg.ST)),
52 TLI(std::move(Arg.TLI)) {}
5346
5447 bool enableInterleavedAccessVectorization() { return true; }
5548
3939 : BaseT(TM, F.getParent()->getDataLayout()), ST(TM->getSubtargetImpl(F)),
4040 TLI(ST->getTargetLowering()) {}
4141
42 // Provide value semantics. MSVC requires that we spell all of these out.
43 HexagonTTIImpl(const HexagonTTIImpl &Arg)
44 : BaseT(static_cast(Arg)), ST(Arg.ST), TLI(Arg.TLI) {}
45 HexagonTTIImpl(HexagonTTIImpl &&Arg)
46 : BaseT(std::move(static_cast(Arg))), ST(std::move(Arg.ST)),
47 TLI(std::move(Arg.TLI)) {}
48
4942 /// \name Scalar TTI Implementations
5043 /// @{
5144
4040 : BaseT(TM, F.getParent()->getDataLayout()), ST(TM->getSubtargetImpl(F)),
4141 TLI(ST->getTargetLowering()) {}
4242
43 LanaiTTIImpl(const LanaiTTIImpl &Arg)
44 : BaseT(static_cast(Arg)), ST(Arg.ST), TLI(Arg.TLI) {}
45 LanaiTTIImpl(LanaiTTIImpl &&Arg)
46 : BaseT(std::move(static_cast(Arg))), ST(Arg.ST), TLI(Arg.TLI) {}
47
4843 bool shouldBuildLookupTables() const { return false; }
4944
5045 TargetTransformInfo::PopcntSupportKind getPopcntSupport(unsigned TyWidth) {
4040 : BaseT(TM, F.getParent()->getDataLayout()), ST(TM->getSubtargetImpl()),
4141 TLI(ST->getTargetLowering()) {}
4242
43 // Provide value semantics. MSVC requires that we spell all of these out.
44 NVPTXTTIImpl(const NVPTXTTIImpl &Arg)
45 : BaseT(static_cast(Arg)), ST(Arg.ST), TLI(Arg.TLI) {}
46 NVPTXTTIImpl(NVPTXTTIImpl &&Arg)
47 : BaseT(std::move(static_cast(Arg))), ST(std::move(Arg.ST)),
48 TLI(std::move(Arg.TLI)) {}
49
5043 bool hasBranchDivergence() { return true; }
5144
5245 bool isSourceOfDivergence(const Value *V);
3939 explicit PPCTTIImpl(const PPCTargetMachine *TM, const Function &F)
4040 : BaseT(TM, F.getParent()->getDataLayout()), ST(TM->getSubtargetImpl(F)),
4141 TLI(ST->getTargetLowering()) {}
42
43 // Provide value semantics. MSVC requires that we spell all of these out.
44 PPCTTIImpl(const PPCTTIImpl &Arg)
45 : BaseT(static_cast(Arg)), ST(Arg.ST), TLI(Arg.TLI) {}
46 PPCTTIImpl(PPCTTIImpl &&Arg)
47 : BaseT(std::move(static_cast(Arg))), ST(std::move(Arg.ST)),
48 TLI(std::move(Arg.TLI)) {}
4942
5043 /// \name Scalar TTI Implementations
5144 /// @{
3131 : BaseT(TM, F.getParent()->getDataLayout()), ST(TM->getSubtargetImpl(F)),
3232 TLI(ST->getTargetLowering()) {}
3333
34 // Provide value semantics. MSVC requires that we spell all of these out.
35 SystemZTTIImpl(const SystemZTTIImpl &Arg)
36 : BaseT(static_cast(Arg)), ST(Arg.ST), TLI(Arg.TLI) {}
37 SystemZTTIImpl(SystemZTTIImpl &&Arg)
38 : BaseT(std::move(static_cast(Arg))), ST(std::move(Arg.ST)),
39 TLI(std::move(Arg.TLI)) {}
40
4134 /// \name Scalar TTI Implementations
4235 /// @{
4336
4141 : BaseT(TM, F.getParent()->getDataLayout()), ST(TM->getSubtargetImpl(F)),
4242 TLI(ST->getTargetLowering()) {}
4343
44 // Provide value semantics. MSVC requires that we spell all of these out.
45 WebAssemblyTTIImpl(const WebAssemblyTTIImpl &Arg)
46 : BaseT(static_cast(Arg)), ST(Arg.ST), TLI(Arg.TLI) {}
47 WebAssemblyTTIImpl(WebAssemblyTTIImpl &&Arg)
48 : BaseT(std::move(static_cast(Arg))), ST(std::move(Arg.ST)),
49 TLI(std::move(Arg.TLI)) {}
50
5144 /// \name Scalar TTI Implementations
5245 /// @{
5346
4141 explicit X86TTIImpl(const X86TargetMachine *TM, const Function &F)
4242 : BaseT(TM, F.getParent()->getDataLayout()), ST(TM->getSubtargetImpl(F)),
4343 TLI(ST->getTargetLowering()) {}
44
45 // Provide value semantics. MSVC requires that we spell all of these out.
46 X86TTIImpl(const X86TTIImpl &Arg)
47 : BaseT(static_cast(Arg)), ST(Arg.ST), TLI(Arg.TLI) {}
48 X86TTIImpl(X86TTIImpl &&Arg)
49 : BaseT(std::move(static_cast(Arg))), ST(std::move(Arg.ST)),
50 TLI(std::move(Arg.TLI)) {}
5144
5245 /// \name Scalar TTI Implementations
5346 /// @{
4040 : BaseT(TM, F.getParent()->getDataLayout()), ST(TM->getSubtargetImpl()),
4141 TLI(ST->getTargetLowering()) {}
4242
43 // Provide value semantics. MSVC requires that we spell all of these out.
44 XCoreTTIImpl(const XCoreTTIImpl &Arg)
45 : BaseT(static_cast(Arg)), ST(Arg.ST), TLI(Arg.TLI) {}
46 XCoreTTIImpl(XCoreTTIImpl &&Arg)
47 : BaseT(std::move(static_cast(Arg))), ST(std::move(Arg.ST)),
48 TLI(std::move(Arg.TLI)) {}
49
5043 unsigned getNumberOfRegisters(bool Vector) {
5144 if (Vector) {
5245 return 0;
3636 struct DelayedBasicBlock {
3737 BasicBlock *OldBB;
3838 std::unique_ptr TempBB;
39
40 // Explicit move for MSVC.
41 DelayedBasicBlock(DelayedBasicBlock &&X)
42 : OldBB(std::move(X.OldBB)), TempBB(std::move(X.TempBB)) {}
43 DelayedBasicBlock &operator=(DelayedBasicBlock &&X) {
44 OldBB = std::move(X.OldBB);
45 TempBB = std::move(X.TempBB);
46 return *this;
47 }
4839
4940 DelayedBasicBlock(const BlockAddress &Old)
5041 : OldBB(Old.getBasicBlock()),
183174 bool HasChanged = false;
184175 unsigned ID = ~0u;
185176 TempMDNode Placeholder;
186
187 Data() {}
188 Data(Data &&X)
189 : HasChanged(std::move(X.HasChanged)), ID(std::move(X.ID)),
190 Placeholder(std::move(X.Placeholder)) {}
191 Data &operator=(Data &&X) {
192 HasChanged = std::move(X.HasChanged);
193 ID = std::move(X.ID);
194 Placeholder = std::move(X.Placeholder);
195 return *this;
196 }
197177 };
198178
199179 /// A graph of uniqued nodes.