[perf] Replace copy-assign by move-assign in llvm/lib/Target/AMDGPU/ (#179460)

This commit is contained in:
serge-sans-paille 2026-02-03 14:24:31 +00:00 committed by GitHub
parent a47f3802bf
commit 85919fbfa4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 13 additions and 13 deletions

View File

@ -4284,7 +4284,7 @@ static std::pair<unsigned, uint8_t> BitOp3_Op(SDValue In,
SmallVector<SDValue, 3> Backup(Src.begin(), Src.end());
if (!getOperandBits(LHS, LHSBits) ||
!getOperandBits(RHS, RHSBits)) {
Src = Backup;
Src = std::move(Backup);
return std::make_pair(0, 0);
}

View File

@ -4100,7 +4100,7 @@ static std::pair<unsigned, uint8_t> BitOp3_Op(Register R,
SmallVector<Register, 3> Backup(Src.begin(), Src.end());
if (!getOperandBits(LHS, LHSBits) ||
!getOperandBits(RHS, RHSBits)) {
Src = Backup;
Src = std::move(Backup);
return std::make_pair(0, 0);
}

View File

@ -311,14 +311,14 @@ void SetOfRulesForOpcode::addFastRuleDivergent(UniformityLLTOpPredicateID Ty,
RegBankLLTMapping RuleApplyIDs) {
int Slot = getFastPredicateSlot(Ty);
assert(Slot != -1 && "Ty unsupported in this FastRulesTypes");
Div[Slot] = RuleApplyIDs;
Div[Slot] = std::move(RuleApplyIDs);
}
void SetOfRulesForOpcode::addFastRuleUniform(UniformityLLTOpPredicateID Ty,
RegBankLLTMapping RuleApplyIDs) {
int Slot = getFastPredicateSlot(Ty);
assert(Slot != -1 && "Ty unsupported in this FastRulesTypes");
Uni[Slot] = RuleApplyIDs;
Uni[Slot] = std::move(RuleApplyIDs);
}
int SetOfRulesForOpcode::getFastPredicateSlot(

View File

@ -455,7 +455,7 @@ static void unaryOpKnownBitsMapHelper(const MCExpr *Expr, KnownBitsMap &KBM,
return;
case MCUnaryExpr::Opcode::Minus: {
KB.makeNegative();
KBM[Expr] = KB;
KBM[Expr] = std::move(KB);
return;
}
case MCUnaryExpr::Opcode::Not: {
@ -466,7 +466,7 @@ static void unaryOpKnownBitsMapHelper(const MCExpr *Expr, KnownBitsMap &KBM,
}
case MCUnaryExpr::Opcode::Plus: {
KB.makeNonNegative();
KBM[Expr] = KB;
KBM[Expr] = std::move(KB);
return;
}
}
@ -488,7 +488,7 @@ static void targetOpKnownBitsMapHelper(const MCExpr *Expr, KnownBitsMap &KBM,
knownBitsMapHelper(Arg, KBM, Depth + 1);
KB |= KBM[Arg];
}
KBM[Expr] = KB;
KBM[Expr] = std::move(KB);
return;
}
case AMDGPUMCExpr::VariantKind::AGVK_Max: {
@ -498,7 +498,7 @@ static void targetOpKnownBitsMapHelper(const MCExpr *Expr, KnownBitsMap &KBM,
knownBitsMapHelper(Arg, KBM, Depth + 1);
KB = KnownBits::umax(KB, KBM[Arg]);
}
KBM[Expr] = KB;
KBM[Expr] = std::move(KB);
return;
}
case AMDGPUMCExpr::VariantKind::AGVK_ExtraSGPRs:

View File

@ -222,8 +222,8 @@ MachineInstr *R600VectorRegMerger::RebuildVector(
// Update RSI
RSI->Instr = NewMI;
RSI->RegToChan = UpdatedRegToChan;
RSI->UndefReg = UpdatedUndef;
RSI->RegToChan = std::move(UpdatedRegToChan);
RSI->UndefReg = std::move(UpdatedUndef);
return NewMI;
}

View File

@ -1013,7 +1013,7 @@ void SIFixSGPRCopies::analyzeVGPRToSGPRCopy(MachineInstr* MI) {
AnalysisWorklist.push_back(U);
}
}
V2SCopies[Info.ID] = Info;
V2SCopies[Info.ID] = std::move(Info);
}
// The main function that computes the VGPR to SGPR copy score

View File

@ -692,7 +692,7 @@ convertArgumentInfo(const AMDGPUFunctionArgInfo &ArgInfo,
if (Arg.isMasked())
SA.Mask = Arg.getMask();
A = SA;
A = std::move(SA);
return true;
};

View File

@ -922,7 +922,7 @@ void SIScheduleBlockCreator::colorEndsAccordingToDependencies() {
// combination of children.
PendingColoring[SU->NodeNum] = NextNonReservedID++;
}
CurrentColoring = PendingColoring;
CurrentColoring = std::move(PendingColoring);
}