llvm.org GIT mirror llvm / ea18f0c
[PowerPC] Remove unused parameter The isDarwin parameter to the llvm::LowerPPCMachineInstrToMCInst routine is now no longer needed; remove it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184441 91177308-0d34-0410-b5e6-96231b3b80d8 Ulrich Weigand 7 years ago
3 changed file(s) with 14 addition(s) and 14 deletion(s). Raw diff Collapse all Expand all
3939 FunctionPass *createPPCJITCodeEmitterPass(PPCTargetMachine &TM,
4040 JITCodeEmitter &MCE);
4141 void LowerPPCMachineInstrToMCInst(const MachineInstr *MI, MCInst &OutMI,
42 AsmPrinter &AP, bool isDarwin);
42 AsmPrinter &AP);
4343
4444 /// \brief Creates an PPC-specific Target Transformation Info pass.
4545 ImmutablePass *createPPCTargetTransformInfoPass(const PPCTargetMachine *TM);
351351 case PPC::LDtocCPT:
352352 case PPC::LDtoc: {
353353 // Transform %X3 = LDtoc , %X2
354 LowerPPCMachineInstrToMCInst(MI, TmpInst, *this, Subtarget.isDarwin());
354 LowerPPCMachineInstrToMCInst(MI, TmpInst, *this);
355355
356356 // Change the opcode to LD, and the global address operand to be a
357357 // reference to the TOC entry we will synthesize later.
380380
381381 case PPC::ADDIStocHA: {
382382 // Transform %Xd = ADDIStocHA %X2,
383 LowerPPCMachineInstrToMCInst(MI, TmpInst, *this, Subtarget.isDarwin());
383 LowerPPCMachineInstrToMCInst(MI, TmpInst, *this);
384384
385385 // Change the opcode to ADDIS8. If the global address is external,
386386 // has common linkage, is a function address, or is a jump table
424424 }
425425 case PPC::LDtocL: {
426426 // Transform %Xd = LDtocL , %Xs
427 LowerPPCMachineInstrToMCInst(MI, TmpInst, *this, Subtarget.isDarwin());
427 LowerPPCMachineInstrToMCInst(MI, TmpInst, *this);
428428
429429 // Change the opcode to LD. If the global address is external, has
430430 // common linkage, or is a jump table address, then reference the
461461 }
462462 case PPC::ADDItocL: {
463463 // Transform %Xd = ADDItocL %Xs,
464 LowerPPCMachineInstrToMCInst(MI, TmpInst, *this, Subtarget.isDarwin());
464 LowerPPCMachineInstrToMCInst(MI, TmpInst, *this);
465465
466466 // Change the opcode to ADDI8. If the global address is external, then
467467 // generate a TOC entry and reference that. Otherwise reference the
513513 }
514514 case PPC::LDgotTprelL: {
515515 // Transform %Xd = LDgotTprelL , %Xs
516 LowerPPCMachineInstrToMCInst(MI, TmpInst, *this, Subtarget.isDarwin());
516 LowerPPCMachineInstrToMCInst(MI, TmpInst, *this);
517517
518518 // Change the opcode to LD.
519519 TmpInst.setOpcode(PPC::LD);
680680 }
681681 }
682682
683 LowerPPCMachineInstrToMCInst(MI, TmpInst, *this, Subtarget.isDarwin());
683 LowerPPCMachineInstrToMCInst(MI, TmpInst, *this);
684684 OutStreamer.EmitInstruction(TmpInst);
685685 }
686686
104104 }
105105
106106 static MCOperand GetSymbolRef(const MachineOperand &MO, const MCSymbol *Symbol,
107 AsmPrinter &Printer, bool isDarwin) {
107 AsmPrinter &Printer) {
108108 MCContext &Ctx = Printer.OutContext;
109109 MCSymbolRefExpr::VariantKind RefKind = MCSymbolRefExpr::VK_None;
110110
157157 }
158158
159159 void llvm::LowerPPCMachineInstrToMCInst(const MachineInstr *MI, MCInst &OutMI,
160 AsmPrinter &AP, bool isDarwin) {
160 AsmPrinter &AP) {
161161 OutMI.setOpcode(MI->getOpcode());
162162
163163 for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
181181 break;
182182 case MachineOperand::MO_GlobalAddress:
183183 case MachineOperand::MO_ExternalSymbol:
184 MCOp = GetSymbolRef(MO, GetSymbolFromOperand(MO, AP), AP, isDarwin);
184 MCOp = GetSymbolRef(MO, GetSymbolFromOperand(MO, AP), AP);
185185 break;
186186 case MachineOperand::MO_JumpTableIndex:
187 MCOp = GetSymbolRef(MO, AP.GetJTISymbol(MO.getIndex()), AP, isDarwin);
187 MCOp = GetSymbolRef(MO, AP.GetJTISymbol(MO.getIndex()), AP);
188188 break;
189189 case MachineOperand::MO_ConstantPoolIndex:
190 MCOp = GetSymbolRef(MO, AP.GetCPISymbol(MO.getIndex()), AP, isDarwin);
190 MCOp = GetSymbolRef(MO, AP.GetCPISymbol(MO.getIndex()), AP);
191191 break;
192192 case MachineOperand::MO_BlockAddress:
193 MCOp = GetSymbolRef(MO,AP.GetBlockAddressSymbol(MO.getBlockAddress()),AP,
194 isDarwin);
193 MCOp = GetSymbolRef(MO, AP.GetBlockAddressSymbol(MO.getBlockAddress()),
194 AP);
195195 break;
196196 case MachineOperand::MO_RegisterMask:
197197 continue;