Remove unused private fields found by clang's new -Wunused-private-field.
authorBenjamin Kramer <benny.kra@googlemail.com>
Wed, 6 Jun 2012 18:25:08 +0000 (18:25 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Wed, 6 Jun 2012 18:25:08 +0000 (18:25 +0000)
There are some that I didn't remove this round because they looked like
obvious stubs. There are dead variables in gtest too, they should be
fixed upstream.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158090 91177308-0d34-0410-b5e6-96231b3b80d8

24 files changed:
include/llvm/CodeGen/ScheduleDAGInstrs.h
lib/CodeGen/PostRASchedulerList.cpp
lib/CodeGen/RegAllocBasic.cpp
lib/CodeGen/RegAllocPBQP.cpp
lib/CodeGen/RegisterCoalescer.cpp
lib/CodeGen/RegisterCoalescer.h
lib/CodeGen/ScheduleDAGInstrs.cpp
lib/Target/ARM/Thumb2ITBlockPass.cpp
lib/Target/MBlaze/MBlazeAsmPrinter.cpp
lib/Target/MBlaze/MBlazeMCInstLower.h
lib/Target/MSP430/MSP430AsmPrinter.cpp
lib/Target/MSP430/MSP430ISelLowering.cpp
lib/Target/MSP430/MSP430ISelLowering.h
lib/Target/MSP430/MSP430InstrInfo.cpp
lib/Target/MSP430/MSP430InstrInfo.h
lib/Target/MSP430/MSP430MCInstLower.h
lib/Target/X86/X86InstrInfo.cpp
lib/Transforms/Utils/SimplifyIndVar.cpp
tools/llvm-diff/DiffConsumer.h
tools/llvm-diff/DifferenceEngine.h
tools/llvm-diff/llvm-diff.cpp
tools/lto/LTOCodeGenerator.h
utils/TableGen/FastISelEmitter.cpp
utils/TableGen/FastISelEmitter.h

index 874f9f1b80e925b9ebaa7d6e44d7b97410f7868d..1bde94215a57af7c1d785a9fe77ffead18fbbff4 100644 (file)
@@ -36,7 +36,6 @@ namespace llvm {
   /// scheduled as soon as possible after the variable's last use.
   ///
   class LoopDependencies {
-    const MachineLoopInfo &MLI;
     const MachineDominatorTree &MDT;
 
   public:
@@ -44,9 +43,7 @@ namespace llvm {
       LoopDeps;
     LoopDeps Deps;
 
-    LoopDependencies(const MachineLoopInfo &mli,
-                     const MachineDominatorTree &mdt) :
-      MLI(mli), MDT(mdt) {}
+    LoopDependencies(const MachineDominatorTree &mdt) : MDT(mdt) {}
 
     /// VisitLoop - Clear out any previous state and analyze the given loop.
     ///
index cedb41273cdd375a717706b426456fa8702b99b0..38eeb6ab3afacbeae7e45feadd2f832a282cc19f 100644 (file)
@@ -78,7 +78,6 @@ AntiDepBreaker::~AntiDepBreaker() { }
 
 namespace {
   class PostRAScheduler : public MachineFunctionPass {
-    AliasAnalysis *AA;
     const TargetInstrInfo *TII;
     RegisterClassInfo RegClassInfo;
 
index 83dbbf2c1dbef70fef7f6a8e3ce9182e9b515ff6..8b74cc8b80065651deba540433ef29f3f28028b2 100644 (file)
@@ -65,7 +65,6 @@ class RABasic : public MachineFunctionPass, public RegAllocBase
   MachineFunction *MF;
 
   // analyses
-  LiveStacks *LS;
   RenderMachineFunction *RMF;
 
   // state
index 4084ebb27a3476c31fb43420c42cecc0000145a6..4f6ad5e0ce9701b5c2952a1d0bca840b5724b437 100644 (file)
@@ -375,7 +375,7 @@ std::auto_ptr<PBQPRAProblem> PBQPBuilderWithCoalescing::build(
   PBQP::Graph &g = p->getGraph();
 
   const TargetMachine &tm = mf->getTarget();
-  CoalescerPair cp(*tm.getInstrInfo(), *tm.getRegisterInfo());
+  CoalescerPair cp(*tm.getRegisterInfo());
 
   // Scan the machine function and add a coalescing cost whenever CoalescerPair
   // gives the Ok.
index 24a22a5db73c80c6c3bd1f1fe48fb9e56fe7f82b..0a514fde872c3739faa38b54a03e2dd35b143515 100644 (file)
@@ -939,7 +939,7 @@ bool RegisterCoalescer::joinCopy(MachineInstr *CopyMI, bool &Again) {
   Again = false;
   DEBUG(dbgs() << LIS->getInstructionIndex(CopyMI) << '\t' << *CopyMI);
 
-  CoalescerPair CP(*TII, *TRI);
+  CoalescerPair CP(*TRI);
   if (!CP.setRegisters(CopyMI)) {
     DEBUG(dbgs() << "\tNot coalescable.\n");
     return false;
index 0120e1dba0e81646ed52844c97ffbf77a7776cef..8a6df988f1bb854e807fc96fc702961337c0b871 100644 (file)
@@ -26,7 +26,6 @@ namespace llvm {
   /// two registers can be coalesced, CoalescerPair can determine if a copy
   /// instruction would become an identity copy after coalescing.
   class CoalescerPair {
-    const TargetInstrInfo &TII;
     const TargetRegisterInfo &TRI;
 
     /// DstReg - The register that will be left after coalescing. It can be a
@@ -60,8 +59,8 @@ namespace llvm {
     const TargetRegisterClass *NewRC;
 
   public:
-    CoalescerPair(const TargetInstrInfo &tii, const TargetRegisterInfo &tri)
-      : TII(tii), TRI(tri), DstReg(0), SrcReg(0), DstIdx(0), SrcIdx(0),
+    CoalescerPair(const TargetRegisterInfo &tri)
+      : TRI(tri), DstReg(0), SrcReg(0), DstIdx(0), SrcIdx(0),
         Partial(false), CrossClass(false), Flipped(false), NewRC(0) {}
 
     /// setRegisters - set registers to match the copy instruction MI. Return
index 875e012ed12384a249b89ad37cd257310a0dcbbc..e78f5c92b4391ecf1b4ccb00117048e55a86fa55 100644 (file)
@@ -47,7 +47,7 @@ ScheduleDAGInstrs::ScheduleDAGInstrs(MachineFunction &mf,
   : ScheduleDAG(mf), MLI(mli), MDT(mdt), MFI(mf.getFrameInfo()),
     InstrItins(mf.getTarget().getInstrItineraryData()), LIS(lis),
     IsPostRA(IsPostRAFlag), UnitLatencies(false), CanHandleTerminators(false),
-    LoopRegs(MLI, MDT), FirstDbgValue(0) {
+    LoopRegs(MDT), FirstDbgValue(0) {
   assert((IsPostRA || LIS) && "PreRA scheduling requires LiveIntervals");
   DbgValues.clear();
   assert(!(IsPostRA && MRI.getNumVirtRegs()) &&
index 3fce12136cd3d0a401f3aec3825666f12fb7df2d..d54aa935325cdf8540293ad1016b97fb9751bb6f 100644 (file)
@@ -24,8 +24,6 @@ STATISTIC(NumMovedInsts, "Number of predicated instructions moved");
 
 namespace {
   class Thumb2ITBlockPass : public MachineFunctionPass {
-    bool PreRegAlloc;
-
   public:
     static char ID;
     Thumb2ITBlockPass() : MachineFunctionPass(ID) {}
index 72c336557df39c3438fbe16809218d7ad931e7ed..7269697ac2278097c5cc96835e4692754acffd8e 100644 (file)
@@ -187,7 +187,7 @@ void MBlazeAsmPrinter::EmitFunctionBodyEnd() {
 
 //===----------------------------------------------------------------------===//
 void MBlazeAsmPrinter::EmitInstruction(const MachineInstr *MI) {
-  MBlazeMCInstLower MCInstLowering(OutContext, *Mang, *this);
+  MBlazeMCInstLower MCInstLowering(OutContext, *this);
 
   MCInst TmpInst;
   MCInstLowering.Lower(MI, TmpInst);
index 7b97744ea93368eadd803f25173b42801b3cdb05..8ab2c9a3a6332d65bfa43c294668fa458d1a79b4 100644 (file)
@@ -21,18 +21,16 @@ namespace llvm {
   class MachineInstr;
   class MachineModuleInfoMachO;
   class MachineOperand;
-  class Mangler;
 
   /// MBlazeMCInstLower - This class is used to lower an MachineInstr
   /// into an MCInst.
 class LLVM_LIBRARY_VISIBILITY MBlazeMCInstLower {
   MCContext &Ctx;
-  Mangler &Mang;
 
   AsmPrinter &Printer;
 public:
-  MBlazeMCInstLower(MCContext &ctx, Mangler &mang, AsmPrinter &printer)
-    : Ctx(ctx), Mang(mang), Printer(printer) {}
+  MBlazeMCInstLower(MCContext &ctx, AsmPrinter &printer)
+    : Ctx(ctx), Printer(printer) {}
   void Lower(const MachineInstr *MI, MCInst &OutMI) const;
 
   MCOperand LowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym) const;
index 1d1094bc339d34f28a0c688bd4f024d0767af226..86bc183c1bdf05a86a8e8712835c359433392e0d 100644 (file)
@@ -154,7 +154,7 @@ bool MSP430AsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI,
 
 //===----------------------------------------------------------------------===//
 void MSP430AsmPrinter::EmitInstruction(const MachineInstr *MI) {
-  MSP430MCInstLower MCInstLowering(OutContext, *Mang, *this);
+  MSP430MCInstLower MCInstLowering(OutContext, *this);
 
   MCInst TmpInst;
   MCInstLowering.Lower(MI, TmpInst);
index 4510755057bde1acf74f5617ef83eefc1237b375..30bc2cc3dbda85a59af5e7b4baa8be90bcc0a5ed 100644 (file)
@@ -59,7 +59,7 @@ HWMultMode("msp430-hwmult-mode",
 
 MSP430TargetLowering::MSP430TargetLowering(MSP430TargetMachine &tm) :
   TargetLowering(tm, new TargetLoweringObjectFileELF()),
-  Subtarget(*tm.getSubtargetImpl()), TM(tm) {
+  Subtarget(*tm.getSubtargetImpl()) {
 
   TD = getTargetData();
 
index d19d25f48191b89ec2b0724861a8eb9ecc828af0..d8ad02fca40394c6e30f054a103ac05bde97866e 100644 (file)
@@ -169,7 +169,6 @@ namespace llvm {
                                             SelectionDAG &DAG) const;
 
     const MSP430Subtarget &Subtarget;
-    const MSP430TargetMachine &TM;
     const TargetData *TD;
   };
 } // namespace llvm
index c03ba470af27632f9e6531d2b2a9894368f60a2e..be332f05b30bee33a1bbdb71528e23a655f85ac8 100644 (file)
@@ -29,7 +29,7 @@ using namespace llvm;
 
 MSP430InstrInfo::MSP430InstrInfo(MSP430TargetMachine &tm)
   : MSP430GenInstrInfo(MSP430::ADJCALLSTACKDOWN, MSP430::ADJCALLSTACKUP),
-    RI(tm, *this), TM(tm) {}
+    RI(tm, *this) {}
 
 void MSP430InstrInfo::storeRegToStackSlot(MachineBasicBlock &MBB,
                                           MachineBasicBlock::iterator MI,
index 04f339bdd6081d5976c36d7b74b79d6528b106c3..d79f99245e715a0de1d1f44573dc4bca29a3d35e 100644 (file)
@@ -42,7 +42,6 @@ namespace MSP430II {
 
 class MSP430InstrInfo : public MSP430GenInstrInfo {
   const MSP430RegisterInfo RI;
-  MSP430TargetMachine &TM;
 public:
   explicit MSP430InstrInfo(MSP430TargetMachine &TM);
 
index 24151e2b8ea1bc9186345b419653c3a8df609d0a..794aa56bf04cb234476acaa7ef530cb8ad3f077e 100644 (file)
@@ -21,18 +21,16 @@ namespace llvm {
   class MachineInstr;
   class MachineModuleInfoMachO;
   class MachineOperand;
-  class Mangler;
 
   /// MSP430MCInstLower - This class is used to lower an MachineInstr
   /// into an MCInst.
 class LLVM_LIBRARY_VISIBILITY MSP430MCInstLower {
   MCContext &Ctx;
-  Mangler &Mang;
 
   AsmPrinter &Printer;
 public:
-  MSP430MCInstLower(MCContext &ctx, Mangler &mang, AsmPrinter &printer)
-    : Ctx(ctx), Mang(mang), Printer(printer) {}
+  MSP430MCInstLower(MCContext &ctx, AsmPrinter &printer)
+    : Ctx(ctx), Printer(printer) {}
   void Lower(const MachineInstr *MI, MCInst &OutMI) const;
 
   MCOperand LowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym) const;
index b8c29ac8957ec92b39031439131f5604c0602add..197b9c683dd1787941898f627889084cb8a47ae5 100644 (file)
@@ -4057,9 +4057,6 @@ namespace {
       AU.setPreservesCFG();
       MachineFunctionPass::getAnalysisUsage(AU);
     }
-
-   private:
-    unsigned BaseReg;
   };
 }
 
index 4030befaffa183c1684d257413fa2871eebda7be..5d673f18241122de60b73c6eb3b6819bf0f928fc 100644 (file)
@@ -16,7 +16,6 @@
 #define DEBUG_TYPE "indvars"
 
 #include "llvm/Instructions.h"
-#include "llvm/Analysis/Dominators.h"
 #include "llvm/Analysis/IVUsers.h"
 #include "llvm/Analysis/LoopInfo.h"
 #include "llvm/Analysis/LoopPass.h"
@@ -44,7 +43,6 @@ namespace {
   class SimplifyIndvar {
     Loop             *L;
     LoopInfo         *LI;
-    DominatorTree    *DT;
     ScalarEvolution  *SE;
     const TargetData *TD; // May be NULL
 
index 2060fe1c944f6b03c3c3436d5bac9b91fe4b7d5b..98e369ba976879c8581eac708d805134dfd66f3d 100644 (file)
@@ -67,8 +67,6 @@ namespace llvm {
     };
 
     raw_ostream &out;
-    Module *LModule;
-    Module *RModule;
     SmallVector<DiffContext, 5> contexts;
     bool Differences;
     unsigned Indent;
@@ -78,8 +76,8 @@ namespace llvm {
     void indent();
 
   public:
-    DiffConsumer(Module *L, Module *R)
-      : out(errs()), LModule(L), RModule(R), Differences(false), Indent(0) {}
+    DiffConsumer()
+      : out(errs()), Differences(false), Indent(0) {}
 
     bool hadDifferences() const;
     void enterContext(Value *L, Value *R);
index 7ea79e430ff55dc240338616a3845a6e2bfdcead..0246d8ff5d6be0989f941580aae33b85534d99cf 100644 (file)
@@ -59,8 +59,8 @@ namespace llvm {
       virtual ~Oracle() {}
     };
 
-    DifferenceEngine(LLVMContext &context, Consumer &consumer)
-      : context(context), consumer(consumer), globalValueOracle(0) {}
+    DifferenceEngine(Consumer &consumer)
+      : consumer(consumer), globalValueOracle(0) {}
 
     void diff(Module *L, Module *R);
     void diff(Function *L, Function *R);
@@ -84,7 +84,6 @@ namespace llvm {
     bool equivalentAsOperands(GlobalValue *L, GlobalValue *R);
 
   private:
-    LLVMContext &context;
     Consumer &consumer;
     Oracle *globalValueOracle;
   };
index 774169bcde170b2f511672f30eb3307cca5567be..45957b3f8c920cdb1c77108aba9140b7378be715 100644 (file)
@@ -78,8 +78,8 @@ int main(int argc, char **argv) {
   Module *RModule = ReadModule(Context, RightFilename);
   if (!LModule || !RModule) return 1;
 
-  DiffConsumer Consumer(LModule, RModule);
-  DifferenceEngine Engine(Context, Consumer);
+  DiffConsumer Consumer;
+  DifferenceEngine Engine(Consumer);
 
   // If any global names were given, just diff those.
   if (!GlobalsToCompare.empty()) {
index 032dc379172946c575ab1575c6d0e40ad3731d08..3081b7dad1d18c7e819a9984c7e0be17962cf384 100644 (file)
@@ -70,7 +70,6 @@ private:
   llvm::TargetMachine*        _target;
   bool                        _emitDwarfDebugInfo;
   bool                        _scopeRestrictionsDone;
-  bool                        _runInternalizePass;
   lto_codegen_model           _codeModel;
   StringSet                   _mustPreserveSymbols;
   StringSet                   _asmUndefinedRefs;
index 2bb351b7085d7f24ba1e636eadb92b0aef9198f0..0253484b6f0f43e4afafa784c7e3522e3c479d46 100644 (file)
@@ -867,6 +867,6 @@ void FastISelEmitter::run(raw_ostream &OS) {
 }
 
 FastISelEmitter::FastISelEmitter(RecordKeeper &R)
-  : Records(R), CGP(R) {
+  : CGP(R) {
 }
 
index 4f75ac1fd9d28e2a63fe5ff8af7589488dbbe36d..9e042db16f9524aaa642babf706f903f12a384d4 100644 (file)
@@ -25,7 +25,6 @@ class CodeGenTarget;
 /// and emission of the instruction selector.
 ///
 class FastISelEmitter : public TableGenBackend {
-  RecordKeeper &Records;
   CodeGenDAGPatterns CGP;
 public:
   explicit FastISelEmitter(RecordKeeper &R);