llvm.org GIT mirror llvm / 13c42d2
Run clang-tidy's performance-unnecessary-copy-initialization over LLVM. No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272516 91177308-0d34-0410-b5e6-96231b3b80d8 Benjamin Kramer 4 years ago
15 changed file(s) with 16 addition(s) and 16 deletion(s). Raw diff Collapse all Expand all
997997
998998 // Check if source location changes, but ignore DBG_VALUE locations.
999999 if (!MI->isDebugValue()) {
1000 DebugLoc DL = MI->getDebugLoc();
1000 const DebugLoc &DL = MI->getDebugLoc();
10011001 if (DL != PrevInstLoc) {
10021002 if (DL) {
10031003 unsigned Flags = 0;
11381138 static char const *RParen = ")";
11391139 Operands.push_back(HexagonOperand::CreateToken(LParen, Begin));
11401140 Operands.push_back(HexagonOperand::CreateReg(Register, Begin, End));
1141 AsmToken MaybeDotNew = Lexer.getTok();
1141 const AsmToken &MaybeDotNew = Lexer.getTok();
11421142 if (MaybeDotNew.is(AsmToken::TokenKind::Identifier) &&
11431143 MaybeDotNew.getString().equals_lower(".new"))
11441144 splitIdentifier(Operands);
11541154 Operands.insert(Operands.end () - 1,
11551155 HexagonOperand::CreateToken(LParen, Begin));
11561156 Operands.push_back(HexagonOperand::CreateReg(Register, Begin, End));
1157 AsmToken MaybeDotNew = Lexer.getTok();
1157 const AsmToken &MaybeDotNew = Lexer.getTok();
11581158 if (MaybeDotNew.is(AsmToken::TokenKind::Identifier) &&
11591159 MaybeDotNew.getString().equals_lower(".new"))
11601160 splitIdentifier(Operands);
13011301 continue;
13021302
13031303 // If found, replace the instruction with a COPY.
1304 DebugLoc DL = MI->getDebugLoc();
1304 const DebugLoc &DL = MI->getDebugLoc();
13051305 const TargetRegisterClass *FRC = HBS::getFinalVRegClass(RD, MRI);
13061306 unsigned NewR = MRI.createVirtualRegister(FRC);
13071307 BuildMI(B, At, DL, HII.get(TargetOpcode::COPY), NewR)
959959 // MRI.replaceVregUsesWith does not allow to update the subregister,
960960 // so instead of doing the use-iteration here, create a copy into a
961961 // "non-subregistered" register.
962 DebugLoc DL = PN->getDebugLoc();
962 const DebugLoc &DL = PN->getDebugLoc();
963963 const TargetRegisterClass *RC = MRI->getRegClass(DefR);
964964 NewR = MRI->createVirtualRegister(RC);
965965 NonPHI = BuildMI(*B, NonPHI, DL, TII->get(TargetOpcode::COPY), NewR)
615615 bool PredSense, bool ReadUndef, bool ImpUse) {
616616 MachineInstr *MI = SrcOp.getParent();
617617 MachineBasicBlock &B = *At->getParent();
618 DebugLoc DL = MI->getDebugLoc();
618 const DebugLoc &DL = MI->getDebugLoc();
619619
620620 // Don't avoid identity copies here (i.e. if the source and the destination
621621 // are the same registers). It is actually better to generate them here,
21192119 MachineBasicBlock::iterator StartIt = SI, NextIt;
21202120 MachineInstr *CopyIn = nullptr;
21212121 if (SrcRR.Reg != FoundR || SrcRR.Sub != 0) {
2122 DebugLoc DL = SI->getDebugLoc();
2122 const DebugLoc &DL = SI->getDebugLoc();
21232123 CopyIn = BuildMI(B, StartIt, DL, HII.get(TargetOpcode::COPY), FoundR)
21242124 .addOperand(SrcOp);
21252125 }
195195 // register and use it with offset 0.
196196 auto &MRI = MF.getRegInfo();
197197 unsigned TmpR = MRI.createVirtualRegister(&Hexagon::IntRegsRegClass);
198 DebugLoc DL = MI.getDebugLoc();
198 const DebugLoc &DL = MI.getDebugLoc();
199199 BuildMI(MB, II, DL, HII.get(Hexagon::A2_addi), TmpR)
200200 .addReg(BP)
201201 .addImm(RealOffset);
11901190 MachineInstr *MI, MachineBasicBlock *BB, unsigned Size, unsigned DstReg,
11911191 unsigned SrcReg) const {
11921192 const TargetInstrInfo *TII = Subtarget.getInstrInfo();
1193 DebugLoc DL = MI->getDebugLoc();
1193 const DebugLoc &DL = MI->getDebugLoc();
11941194
11951195 if (Subtarget.hasMips32r2() && Size == 1) {
11961196 BuildMI(BB, DL, TII->get(Mips::SEB), DstReg).addReg(SrcReg);
18291829 unsigned LISInstr = is64Bit ? PPC::LIS8 : PPC::LIS;
18301830 unsigned ORIInstr = is64Bit ? PPC::ORI8 : PPC::ORI;
18311831 MachineInstr *MI = I;
1832 DebugLoc dl = MI->getDebugLoc();
1832 const DebugLoc &dl = MI->getDebugLoc();
18331833
18341834 if (isInt<16>(CalleeAmt)) {
18351835 BuildMI(MBB, I, dl, TII.get(ADDIInstr), StackReg)
785785 ///
786786 void FPS::popStackAfter(MachineBasicBlock::iterator &I) {
787787 MachineInstr* MI = I;
788 DebugLoc dl = MI->getDebugLoc();
788 const DebugLoc &dl = MI->getDebugLoc();
789789 ASSERT_SORTED(PopTable);
790790 if (StackTop == 0)
791791 report_fatal_error("Cannot pop empty stack!");
25032503 llvm_unreachable("Unexpected instruction!");
25042504 }
25052505
2506 DebugLoc DL = Orig->getDebugLoc();
2506 const DebugLoc &DL = Orig->getDebugLoc();
25072507 BuildMI(MBB, I, DL, get(X86::MOV32ri)).addOperand(Orig->getOperand(0))
25082508 .addImm(Value);
25092509 } else {
13011301 /// to encode location where these instructions are inlined.
13021302 static void fixupLineNumbers(Function *Fn, Function::iterator FI,
13031303 Instruction *TheCall) {
1304 DebugLoc TheCallDL = TheCall->getDebugLoc();
1304 const DebugLoc &TheCallDL = TheCall->getDebugLoc();
13051305 if (!TheCallDL)
13061306 return;
13071307
249249
250250 bool Error = false;
251251 while (Lexer.Lex().isNot(AsmToken::Eof)) {
252 AsmToken Tok = Lexer.getTok();
252 const AsmToken &Tok = Lexer.getTok();
253253
254254 switch (Tok.getKind()) {
255255 default:
575575 O << " switch(AltIdx) {\n"
576576 << " default: llvm_unreachable(\"Invalid register alt name index!\");\n";
577577 for (const Record *R : AltNameIndices) {
578 std::string AltName(R->getName());
578 const std::string &AltName = R->getName();
579579 std::string Prefix = !Namespace.empty() ? Namespace + "::" : "";
580580 O << " case " << Prefix << AltName << ":\n"
581581 << " assert(*(AsmStrs" << AltName << "+RegAsmOffset"
708708 Record *ComboFunc = FuncData->getValueAsDef("TheComboFunc");
709709 const std::vector &FuncList =
710710 FuncData->getValueAsListOfDefs("FuncList");
711 std::string ComboFuncName = ComboFunc->getName();
711 const std::string &ComboFuncName = ComboFunc->getName();
712712 unsigned ComboBit = FUNameToBitsMap[ComboFuncName];
713713 unsigned ComboResources = ComboBit;
714714 DEBUG(dbgs() << " combo: " << ComboFuncName