[PATCH] Rename getNoopForMachoTarget to getNoop

Brad Smith brad at comstyle.com
Sat Sep 13 10:22:58 PDT 2014


Here is a patch to rename getNoopForMachoTarget to getNoop.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-------------- next part --------------
Index: include/llvm/Target/TargetInstrInfo.h
===================================================================
--- include/llvm/Target/TargetInstrInfo.h	(revision 217728)
+++ include/llvm/Target/TargetInstrInfo.h	(working copy)
@@ -847,8 +847,8 @@
                           MachineBasicBlock::iterator MI) const;
 
 
-  /// getNoopForMachoTarget - Return the noop instruction to use for a noop.
-  virtual void getNoopForMachoTarget(MCInst &NopInst) const {
+  /// getNoop - Return the noop instruction to use for a noop.
+  virtual void getNoop(MCInst &NopInst) const {
     // Default to just using 'nop' string.
   }
 
Index: lib/CodeGen/AsmPrinter/AsmPrinter.cpp
===================================================================
--- lib/CodeGen/AsmPrinter/AsmPrinter.cpp	(revision 217728)
+++ lib/CodeGen/AsmPrinter/AsmPrinter.cpp	(working copy)
@@ -809,7 +809,7 @@
   // labels from collapsing together.  Just emit a noop.
   if ((MAI->hasSubsectionsViaSymbols() && !HasAnyRealCode) || RequiresNoop) {
     MCInst Noop;
-    TM.getSubtargetImpl()->getInstrInfo()->getNoopForMachoTarget(Noop);
+    TM.getSubtargetImpl()->getInstrInfo()->getNoop(Noop);
     if (Noop.getOpcode()) {
       OutStreamer.AddComment("avoids zero-length function");
       OutStreamer.EmitInstruction(Noop, getSubtargetInfo());
Index: lib/Target/AArch64/AArch64InstrInfo.cpp
===================================================================
--- lib/Target/AArch64/AArch64InstrInfo.cpp	(revision 217728)
+++ lib/Target/AArch64/AArch64InstrInfo.cpp	(working copy)
@@ -2333,7 +2333,7 @@
   return false;
 }
 
-void AArch64InstrInfo::getNoopForMachoTarget(MCInst &NopInst) const {
+void AArch64InstrInfo::getNoop(MCInst &NopInst) const {
   NopInst.setOpcode(AArch64::HINT);
   NopInst.addOperand(MCOperand::CreateImm(0));
 }
Index: lib/Target/AArch64/AArch64InstrInfo.h
===================================================================
--- lib/Target/AArch64/AArch64InstrInfo.h	(revision 217728)
+++ lib/Target/AArch64/AArch64InstrInfo.h	(working copy)
@@ -152,7 +152,7 @@
                     DebugLoc DL, unsigned DstReg,
                     const SmallVectorImpl<MachineOperand> &Cond,
                     unsigned TrueReg, unsigned FalseReg) const override;
-  void getNoopForMachoTarget(MCInst &NopInst) const override;
+  void getNoop(MCInst &NopInst) const override;
 
   /// analyzeCompare - For a comparison instruction, return the source registers
   /// in SrcReg and SrcReg2, and the value it compares against in CmpValue.
Index: lib/Target/ARM/ARMInstrInfo.cpp
===================================================================
--- lib/Target/ARM/ARMInstrInfo.cpp	(revision 217728)
+++ lib/Target/ARM/ARMInstrInfo.cpp	(working copy)
@@ -33,8 +33,8 @@
   : ARMBaseInstrInfo(STI), RI(STI) {
 }
 
-/// getNoopForMachoTarget - Return the noop instruction to use for a noop.
-void ARMInstrInfo::getNoopForMachoTarget(MCInst &NopInst) const {
+/// getNoop - Return the noop instruction to use for a noop.
+void ARMInstrInfo::getNoop(MCInst &NopInst) const {
   if (hasNOP()) {
     NopInst.setOpcode(ARM::HINT);
     NopInst.addOperand(MCOperand::CreateImm(0));
Index: lib/Target/ARM/ARMInstrInfo.h
===================================================================
--- lib/Target/ARM/ARMInstrInfo.h	(revision 217728)
+++ lib/Target/ARM/ARMInstrInfo.h	(working copy)
@@ -25,8 +25,8 @@
 public:
   explicit ARMInstrInfo(const ARMSubtarget &STI);
 
-  /// getNoopForMachoTarget - Return the noop instruction to use for a noop.
-  void getNoopForMachoTarget(MCInst &NopInst) const override;
+  /// getNoop - Return the noop instruction to use for a noop.
+  void getNoop(MCInst &NopInst) const override;
 
   // Return the non-pre/post incrementing version of 'Opc'. Return 0
   // if there is not such an opcode.
Index: lib/Target/ARM/Thumb1InstrInfo.cpp
===================================================================
--- lib/Target/ARM/Thumb1InstrInfo.cpp	(revision 217728)
+++ lib/Target/ARM/Thumb1InstrInfo.cpp	(working copy)
@@ -25,8 +25,8 @@
   : ARMBaseInstrInfo(STI), RI(STI) {
 }
 
-/// getNoopForMachoTarget - Return the noop instruction to use for a noop.
-void Thumb1InstrInfo::getNoopForMachoTarget(MCInst &NopInst) const {
+/// getNoop - Return the noop instruction to use for a noop.
+void Thumb1InstrInfo::getNoop(MCInst &NopInst) const {
   NopInst.setOpcode(ARM::tMOVr);
   NopInst.addOperand(MCOperand::CreateReg(ARM::R8));
   NopInst.addOperand(MCOperand::CreateReg(ARM::R8));
Index: lib/Target/ARM/Thumb1InstrInfo.h
===================================================================
--- lib/Target/ARM/Thumb1InstrInfo.h	(revision 217728)
+++ lib/Target/ARM/Thumb1InstrInfo.h	(working copy)
@@ -25,8 +25,8 @@
 public:
   explicit Thumb1InstrInfo(const ARMSubtarget &STI);
 
-  /// getNoopForMachoTarget - Return the noop instruction to use for a noop.
-  void getNoopForMachoTarget(MCInst &NopInst) const override;
+  /// getNoop - Return the noop instruction to use for a noop.
+  void getNoop(MCInst &NopInst) const override;
 
   // Return the non-pre/post incrementing version of 'Opc'. Return 0
   // if there is not such an opcode.
Index: lib/Target/ARM/Thumb2InstrInfo.cpp
===================================================================
--- lib/Target/ARM/Thumb2InstrInfo.cpp	(revision 217728)
+++ lib/Target/ARM/Thumb2InstrInfo.cpp	(working copy)
@@ -33,8 +33,8 @@
   : ARMBaseInstrInfo(STI), RI(STI) {
 }
 
-/// getNoopForMachoTarget - Return the noop instruction to use for a noop.
-void Thumb2InstrInfo::getNoopForMachoTarget(MCInst &NopInst) const {
+/// getNoop - Return the noop instruction to use for a noop.
+void Thumb2InstrInfo::getNoop(MCInst &NopInst) const {
   NopInst.setOpcode(ARM::tHINT);
   NopInst.addOperand(MCOperand::CreateImm(0));
   NopInst.addOperand(MCOperand::CreateImm(ARMCC::AL));
Index: lib/Target/ARM/Thumb2InstrInfo.h
===================================================================
--- lib/Target/ARM/Thumb2InstrInfo.h	(revision 217728)
+++ lib/Target/ARM/Thumb2InstrInfo.h	(working copy)
@@ -26,8 +26,8 @@
 public:
   explicit Thumb2InstrInfo(const ARMSubtarget &STI);
 
-  /// getNoopForMachoTarget - Return the noop instruction to use for a noop.
-  void getNoopForMachoTarget(MCInst &NopInst) const override;
+  /// getNoop - Return the noop instruction to use for a noop.
+  void getNoop(MCInst &NopInst) const override;
 
   // Return the non-pre/post incrementing version of 'Opc'. Return 0
   // if there is not such an opcode.
Index: lib/Target/PowerPC/PPCInstrInfo.cpp
===================================================================
--- lib/Target/PowerPC/PPCInstrInfo.cpp	(revision 217728)
+++ lib/Target/PowerPC/PPCInstrInfo.cpp	(working copy)
@@ -331,8 +331,8 @@
   BuildMI(MBB, MI, DL, get(Opcode));
 }
 
-/// getNoopForMachoTarget - Return the noop instruction to use for a noop.
-void PPCInstrInfo::getNoopForMachoTarget(MCInst &NopInst) const {
+/// getNoop - Return the noop instruction to use for a noop.
+void PPCInstrInfo::getNoop(MCInst &NopInst) const {
   NopInst.setOpcode(PPC::NOP);
 }
 
Index: lib/Target/PowerPC/PPCInstrInfo.h
===================================================================
--- lib/Target/PowerPC/PPCInstrInfo.h	(revision 217728)
+++ lib/Target/PowerPC/PPCInstrInfo.h	(working copy)
@@ -229,7 +229,7 @@
   ///
   unsigned GetInstSizeInBytes(const MachineInstr *MI) const;
 
-  void getNoopForMachoTarget(MCInst &NopInst) const override;
+  void getNoop(MCInst &NopInst) const override;
 };
 
 }
Index: lib/Target/Sparc/SparcInstrInfo.cpp
===================================================================
--- lib/Target/Sparc/SparcInstrInfo.cpp	(revision 217728)
+++ lib/Target/Sparc/SparcInstrInfo.cpp	(working copy)
@@ -37,8 +37,8 @@
     RI(ST), Subtarget(ST) {
 }
 
-/// getNoopForMachoTarget - Return the noop instruction to use for a noop.
-void SparcInstrInfo::getNoopForMachoTarget(MCInst &NopInst) const {
+/// getNoop - Return the noop instruction to use for a noop.
+void SparcInstrInfo::getNoop(MCInst &NopInst) const {
   NopInst.setOpcode(SP::NOP);
 }
 
Index: lib/Target/Sparc/SparcInstrInfo.h
===================================================================
--- lib/Target/Sparc/SparcInstrInfo.h	(revision 217728)
+++ lib/Target/Sparc/SparcInstrInfo.h	(working copy)
@@ -94,7 +94,7 @@
 
   unsigned getGlobalBaseReg(MachineFunction *MF) const;
 
-  void getNoopForMachoTarget(MCInst &NopInst) const override;
+  void getNoop(MCInst &NopInst) const override;
 };
 
 }
Index: lib/Target/X86/X86InstrInfo.cpp
===================================================================
--- lib/Target/X86/X86InstrInfo.cpp	(revision 217728)
+++ lib/Target/X86/X86InstrInfo.cpp	(working copy)
@@ -5340,8 +5340,8 @@
   MI->setDesc(get(table[Domain-1]));
 }
 
-/// getNoopForMachoTarget - Return the noop instruction to use for a noop.
-void X86InstrInfo::getNoopForMachoTarget(MCInst &NopInst) const {
+/// getNoop - Return the noop instruction to use for a noop.
+void X86InstrInfo::getNoop(MCInst &NopInst) const {
   NopInst.setOpcode(X86::NOOP);
 }
 
Index: lib/Target/X86/X86InstrInfo.h
===================================================================
--- lib/Target/X86/X86InstrInfo.h	(revision 217728)
+++ lib/Target/X86/X86InstrInfo.h	(working copy)
@@ -360,7 +360,7 @@
   bool shouldScheduleAdjacent(MachineInstr* First,
                               MachineInstr *Second) const override;
 
-  void getNoopForMachoTarget(MCInst &NopInst) const override;
+  void getNoop(MCInst &NopInst) const override;
 
   bool
   ReverseBranchCondition(SmallVectorImpl<MachineOperand> &Cond) const override;


More information about the llvm-commits mailing list