mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-07-21 02:29:22 +00:00
Remove warnings about unused parameters and shadowed variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51266 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9d60ba9d28
commit
13d57320bd
@ -300,8 +300,8 @@ public:
|
|||||||
|
|
||||||
bool operator==(const SmallVectorImpl &RHS) const {
|
bool operator==(const SmallVectorImpl &RHS) const {
|
||||||
if (size() != RHS.size()) return false;
|
if (size() != RHS.size()) return false;
|
||||||
for (T *This = Begin, *That = RHS.Begin, *End = Begin+size();
|
for (T *This = Begin, *That = RHS.Begin, *E = Begin+size();
|
||||||
This != End; ++This, ++That)
|
This != E; ++This, ++That)
|
||||||
if (*This != *That)
|
if (*This != *That)
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
|
@ -59,26 +59,23 @@ namespace llvm {
|
|||||||
/// other instruction is available, issue it first.
|
/// other instruction is available, issue it first.
|
||||||
/// * NoopHazard: issuing this instruction would break the program. If
|
/// * NoopHazard: issuing this instruction would break the program. If
|
||||||
/// some other instruction can be issued, do so, otherwise issue a noop.
|
/// some other instruction can be issued, do so, otherwise issue a noop.
|
||||||
virtual HazardType getHazardType(SDNode *Node) {
|
virtual HazardType getHazardType(SDNode *) {
|
||||||
return NoHazard;
|
return NoHazard;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// EmitInstruction - This callback is invoked when an instruction is
|
/// EmitInstruction - This callback is invoked when an instruction is
|
||||||
/// emitted, to advance the hazard state.
|
/// emitted, to advance the hazard state.
|
||||||
virtual void EmitInstruction(SDNode *Node) {
|
virtual void EmitInstruction(SDNode *) {}
|
||||||
}
|
|
||||||
|
|
||||||
/// AdvanceCycle - This callback is invoked when no instructions can be
|
/// AdvanceCycle - This callback is invoked when no instructions can be
|
||||||
/// issued on this cycle without a hazard. This should increment the
|
/// issued on this cycle without a hazard. This should increment the
|
||||||
/// internal state of the hazard recognizer so that previously "Hazard"
|
/// internal state of the hazard recognizer so that previously "Hazard"
|
||||||
/// instructions will now not be hazards.
|
/// instructions will now not be hazards.
|
||||||
virtual void AdvanceCycle() {
|
virtual void AdvanceCycle() {}
|
||||||
}
|
|
||||||
|
|
||||||
/// EmitNoop - This callback is invoked when a noop was added to the
|
/// EmitNoop - This callback is invoked when a noop was added to the
|
||||||
/// instruction stream.
|
/// instruction stream.
|
||||||
virtual void EmitNoop() {
|
virtual void EmitNoop() {}
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/// SDep - Scheduling dependency. It keeps track of dependent nodes,
|
/// SDep - Scheduling dependency. It keeps track of dependent nodes,
|
||||||
@ -236,9 +233,9 @@ namespace llvm {
|
|||||||
/// ScheduledNode - As each node is scheduled, this method is invoked. This
|
/// ScheduledNode - As each node is scheduled, this method is invoked. This
|
||||||
/// allows the priority function to adjust the priority of node that have
|
/// allows the priority function to adjust the priority of node that have
|
||||||
/// already been emitted.
|
/// already been emitted.
|
||||||
virtual void ScheduledNode(SUnit *Node) {}
|
virtual void ScheduledNode(SUnit *) {}
|
||||||
|
|
||||||
virtual void UnscheduledNode(SUnit *Node) {}
|
virtual void UnscheduledNode(SUnit *) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
class ScheduleDAG {
|
class ScheduleDAG {
|
||||||
|
@ -162,8 +162,8 @@ public:
|
|||||||
MVT::ValueType VT3) {
|
MVT::ValueType VT3) {
|
||||||
return getVTList(VT1, VT2, VT3).VTs;
|
return getVTList(VT1, VT2, VT3).VTs;
|
||||||
}
|
}
|
||||||
const MVT::ValueType *getNodeValueTypes(std::vector<MVT::ValueType> &VTList) {
|
const MVT::ValueType *getNodeValueTypes(std::vector<MVT::ValueType> &vtList) {
|
||||||
return getVTList(&VTList[0], (unsigned)VTList.size()).VTs;
|
return getVTList(&vtList[0], (unsigned)vtList.size()).VTs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1964,15 +1964,15 @@ protected:
|
|||||||
*/
|
*/
|
||||||
SDUse Ops[4];
|
SDUse Ops[4];
|
||||||
public:
|
public:
|
||||||
LSBaseSDNode(ISD::NodeType NodeTy, SDOperand *Operands, unsigned NumOperands,
|
LSBaseSDNode(ISD::NodeType NodeTy, SDOperand *Operands, unsigned numOperands,
|
||||||
SDVTList VTs, ISD::MemIndexedMode AM, MVT::ValueType VT,
|
SDVTList VTs, ISD::MemIndexedMode AM, MVT::ValueType VT,
|
||||||
const Value *SV, int SVO, unsigned Align, bool Vol)
|
const Value *SV, int SVO, unsigned Align, bool Vol)
|
||||||
: SDNode(NodeTy, VTs),
|
: SDNode(NodeTy, VTs),
|
||||||
AddrMode(AM), MemoryVT(VT),
|
AddrMode(AM), MemoryVT(VT),
|
||||||
SrcValue(SV), SVOffset(SVO), Alignment(Align), IsVolatile(Vol) {
|
SrcValue(SV), SVOffset(SVO), Alignment(Align), IsVolatile(Vol) {
|
||||||
for (unsigned i = 0; i != NumOperands; ++i)
|
for (unsigned i = 0; i != numOperands; ++i)
|
||||||
Ops[i] = Operands[i];
|
Ops[i] = Operands[i];
|
||||||
InitOperands(Ops, NumOperands);
|
InitOperands(Ops, numOperands);
|
||||||
assert(Align != 0 && "Loads and stores should have non-zero aligment");
|
assert(Align != 0 && "Loads and stores should have non-zero aligment");
|
||||||
assert((getOffset().getOpcode() == ISD::UNDEF || isIndexed()) &&
|
assert((getOffset().getOpcode() == ISD::UNDEF || isIndexed()) &&
|
||||||
"Only indexed loads and stores have a non-undef offset operand");
|
"Only indexed loads and stores have a non-undef offset operand");
|
||||||
@ -2004,7 +2004,7 @@ public:
|
|||||||
/// reference performed by this load or store.
|
/// reference performed by this load or store.
|
||||||
MachineMemOperand getMemOperand() const;
|
MachineMemOperand getMemOperand() const;
|
||||||
|
|
||||||
static bool classof(const LSBaseSDNode *N) { return true; }
|
static bool classof(const LSBaseSDNode *) { return true; }
|
||||||
static bool classof(const SDNode *N) {
|
static bool classof(const SDNode *N) {
|
||||||
return N->getOpcode() == ISD::LOAD ||
|
return N->getOpcode() == ISD::LOAD ||
|
||||||
N->getOpcode() == ISD::STORE;
|
N->getOpcode() == ISD::STORE;
|
||||||
@ -2134,11 +2134,11 @@ struct ilist_traits<SDNode> {
|
|||||||
//static SDNode *createNode(const SDNode &V) { return new SDNode(V); }
|
//static SDNode *createNode(const SDNode &V) { return new SDNode(V); }
|
||||||
|
|
||||||
|
|
||||||
void addNodeToList(SDNode *NTy) {}
|
void addNodeToList(SDNode *) {}
|
||||||
void removeNodeFromList(SDNode *NTy) {}
|
void removeNodeFromList(SDNode *) {}
|
||||||
void transferNodesFromList(iplist<SDNode, ilist_traits> &L2,
|
void transferNodesFromList(iplist<SDNode, ilist_traits> &,
|
||||||
const ilist_iterator<SDNode> &X,
|
const ilist_iterator<SDNode> &,
|
||||||
const ilist_iterator<SDNode> &Y) {}
|
const ilist_iterator<SDNode> &) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace ISD {
|
namespace ISD {
|
||||||
|
@ -39,8 +39,8 @@ class Constant : public User {
|
|||||||
void operator=(const Constant &); // Do not implement
|
void operator=(const Constant &); // Do not implement
|
||||||
Constant(const Constant &); // Do not implement
|
Constant(const Constant &); // Do not implement
|
||||||
protected:
|
protected:
|
||||||
Constant(const Type *Ty, ValueTy vty, Use *Ops, unsigned NumOps)
|
Constant(const Type *ty, ValueTy vty, Use *Ops, unsigned NumOps)
|
||||||
: User(Ty, vty, Ops, NumOps) {}
|
: User(ty, vty, Ops, NumOps) {}
|
||||||
|
|
||||||
void destroyConstantImpl();
|
void destroyConstantImpl();
|
||||||
public:
|
public:
|
||||||
|
@ -283,8 +283,8 @@ class ConstantAggregateZero : public Constant {
|
|||||||
void *operator new(size_t, unsigned); // DO NOT IMPLEMENT
|
void *operator new(size_t, unsigned); // DO NOT IMPLEMENT
|
||||||
ConstantAggregateZero(const ConstantAggregateZero &); // DO NOT IMPLEMENT
|
ConstantAggregateZero(const ConstantAggregateZero &); // DO NOT IMPLEMENT
|
||||||
protected:
|
protected:
|
||||||
explicit ConstantAggregateZero(const Type *Ty)
|
explicit ConstantAggregateZero(const Type *ty)
|
||||||
: Constant(Ty, ConstantAggregateZeroVal, 0, 0) {}
|
: Constant(ty, ConstantAggregateZeroVal, 0, 0) {}
|
||||||
protected:
|
protected:
|
||||||
// allocate space for exactly zero operands
|
// allocate space for exactly zero operands
|
||||||
void *operator new(size_t s) {
|
void *operator new(size_t s) {
|
||||||
@ -553,8 +553,8 @@ class ConstantExpr : public Constant {
|
|||||||
friend struct ConvertConstantType<ConstantExpr, Type>;
|
friend struct ConvertConstantType<ConstantExpr, Type>;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
ConstantExpr(const Type *Ty, unsigned Opcode, Use *Ops, unsigned NumOps)
|
ConstantExpr(const Type *ty, unsigned Opcode, Use *Ops, unsigned NumOps)
|
||||||
: Constant(Ty, ConstantExprVal, Ops, NumOps) {
|
: Constant(ty, ConstantExprVal, Ops, NumOps) {
|
||||||
// Operation type (an Instruction opcode) is stored as the SubclassData.
|
// Operation type (an Instruction opcode) is stored as the SubclassData.
|
||||||
SubclassData = Opcode;
|
SubclassData = Opcode;
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,7 @@ public:
|
|||||||
void dump() const { Type::dump(); }
|
void dump() const { Type::dump(); }
|
||||||
|
|
||||||
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||||
static inline bool classof(const DerivedType *T) { return true; }
|
static inline bool classof(const DerivedType *) { return true; }
|
||||||
static inline bool classof(const Type *T) {
|
static inline bool classof(const Type *T) {
|
||||||
return T->isDerivedType();
|
return T->isDerivedType();
|
||||||
}
|
}
|
||||||
@ -127,7 +127,7 @@ public:
|
|||||||
bool isPowerOf2ByteWidth() const;
|
bool isPowerOf2ByteWidth() const;
|
||||||
|
|
||||||
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||||
static inline bool classof(const IntegerType *T) { return true; }
|
static inline bool classof(const IntegerType *) { return true; }
|
||||||
static inline bool classof(const Type *T) {
|
static inline bool classof(const Type *T) {
|
||||||
return T->getTypeID() == IntegerTyID;
|
return T->getTypeID() == IntegerTyID;
|
||||||
}
|
}
|
||||||
@ -179,7 +179,7 @@ public:
|
|||||||
virtual void typeBecameConcrete(const DerivedType *AbsTy);
|
virtual void typeBecameConcrete(const DerivedType *AbsTy);
|
||||||
|
|
||||||
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||||
static inline bool classof(const FunctionType *T) { return true; }
|
static inline bool classof(const FunctionType *) { return true; }
|
||||||
static inline bool classof(const Type *T) {
|
static inline bool classof(const Type *T) {
|
||||||
return T->getTypeID() == FunctionTyID;
|
return T->getTypeID() == FunctionTyID;
|
||||||
}
|
}
|
||||||
@ -200,7 +200,7 @@ public:
|
|||||||
virtual bool indexValid(const Value *V) const = 0;
|
virtual bool indexValid(const Value *V) const = 0;
|
||||||
|
|
||||||
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||||
static inline bool classof(const CompositeType *T) { return true; }
|
static inline bool classof(const CompositeType *) { return true; }
|
||||||
static inline bool classof(const Type *T) {
|
static inline bool classof(const Type *T) {
|
||||||
return T->getTypeID() == ArrayTyID ||
|
return T->getTypeID() == ArrayTyID ||
|
||||||
T->getTypeID() == StructTyID ||
|
T->getTypeID() == StructTyID ||
|
||||||
@ -253,7 +253,7 @@ public:
|
|||||||
virtual void typeBecameConcrete(const DerivedType *AbsTy);
|
virtual void typeBecameConcrete(const DerivedType *AbsTy);
|
||||||
|
|
||||||
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||||
static inline bool classof(const StructType *T) { return true; }
|
static inline bool classof(const StructType *) { return true; }
|
||||||
static inline bool classof(const Type *T) {
|
static inline bool classof(const Type *T) {
|
||||||
return T->getTypeID() == StructTyID;
|
return T->getTypeID() == StructTyID;
|
||||||
}
|
}
|
||||||
@ -292,12 +292,12 @@ public:
|
|||||||
/// getTypeAtIndex - Given an index value into the type, return the type of
|
/// getTypeAtIndex - Given an index value into the type, return the type of
|
||||||
/// the element. For sequential types, there is only one subtype...
|
/// the element. For sequential types, there is only one subtype...
|
||||||
///
|
///
|
||||||
virtual const Type *getTypeAtIndex(const Value *V) const {
|
virtual const Type *getTypeAtIndex(const Value *) const {
|
||||||
return ContainedTys[0];
|
return ContainedTys[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||||
static inline bool classof(const SequentialType *T) { return true; }
|
static inline bool classof(const SequentialType *) { return true; }
|
||||||
static inline bool classof(const Type *T) {
|
static inline bool classof(const Type *T) {
|
||||||
return T->getTypeID() == ArrayTyID ||
|
return T->getTypeID() == ArrayTyID ||
|
||||||
T->getTypeID() == PointerTyID ||
|
T->getTypeID() == PointerTyID ||
|
||||||
@ -328,7 +328,7 @@ public:
|
|||||||
virtual void typeBecameConcrete(const DerivedType *AbsTy);
|
virtual void typeBecameConcrete(const DerivedType *AbsTy);
|
||||||
|
|
||||||
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||||
static inline bool classof(const ArrayType *T) { return true; }
|
static inline bool classof(const ArrayType *) { return true; }
|
||||||
static inline bool classof(const Type *T) {
|
static inline bool classof(const Type *T) {
|
||||||
return T->getTypeID() == ArrayTyID;
|
return T->getTypeID() == ArrayTyID;
|
||||||
}
|
}
|
||||||
@ -372,7 +372,7 @@ public:
|
|||||||
virtual void typeBecameConcrete(const DerivedType *AbsTy);
|
virtual void typeBecameConcrete(const DerivedType *AbsTy);
|
||||||
|
|
||||||
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||||
static inline bool classof(const VectorType *T) { return true; }
|
static inline bool classof(const VectorType *) { return true; }
|
||||||
static inline bool classof(const Type *T) {
|
static inline bool classof(const Type *T) {
|
||||||
return T->getTypeID() == VectorTyID;
|
return T->getTypeID() == VectorTyID;
|
||||||
}
|
}
|
||||||
@ -407,7 +407,7 @@ public:
|
|||||||
virtual void typeBecameConcrete(const DerivedType *AbsTy);
|
virtual void typeBecameConcrete(const DerivedType *AbsTy);
|
||||||
|
|
||||||
// Implement support type inquiry through isa, cast, and dyn_cast:
|
// Implement support type inquiry through isa, cast, and dyn_cast:
|
||||||
static inline bool classof(const PointerType *T) { return true; }
|
static inline bool classof(const PointerType *) { return true; }
|
||||||
static inline bool classof(const Type *T) {
|
static inline bool classof(const Type *T) {
|
||||||
return T->getTypeID() == PointerTyID;
|
return T->getTypeID() == PointerTyID;
|
||||||
}
|
}
|
||||||
@ -428,7 +428,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Implement support for type inquiry through isa, cast, and dyn_cast:
|
// Implement support for type inquiry through isa, cast, and dyn_cast:
|
||||||
static inline bool classof(const OpaqueType *T) { return true; }
|
static inline bool classof(const OpaqueType *) { return true; }
|
||||||
static inline bool classof(const Type *T) {
|
static inline bool classof(const Type *T) {
|
||||||
return T->getTypeID() == OpaqueTyID;
|
return T->getTypeID() == OpaqueTyID;
|
||||||
}
|
}
|
||||||
|
@ -50,12 +50,12 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
std::map<const GlobalValue*, void *> &
|
std::map<const GlobalValue*, void *> &
|
||||||
getGlobalAddressMap(const MutexGuard &locked) {
|
getGlobalAddressMap(const MutexGuard &) {
|
||||||
return GlobalAddressMap;
|
return GlobalAddressMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::map<void*, const GlobalValue*> &
|
std::map<void*, const GlobalValue*> &
|
||||||
getGlobalAddressReverseMap(const MutexGuard& locked) {
|
getGlobalAddressReverseMap(const MutexGuard &) {
|
||||||
return GlobalAddressReverseMap;
|
return GlobalAddressReverseMap;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -50,9 +50,9 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
GlobalValue(const Type *Ty, ValueTy vty, Use *Ops, unsigned NumOps,
|
GlobalValue(const Type *ty, ValueTy vty, Use *Ops, unsigned NumOps,
|
||||||
LinkageTypes linkage, const std::string &name = "")
|
LinkageTypes linkage, const std::string &name = "")
|
||||||
: Constant(Ty, vty, Ops, NumOps), Parent(0),
|
: Constant(ty, vty, Ops, NumOps), Parent(0),
|
||||||
Linkage(linkage), Visibility(DefaultVisibility), Alignment(0) {
|
Linkage(linkage), Visibility(DefaultVisibility), Alignment(0) {
|
||||||
if (!name.empty()) setName(name);
|
if (!name.empty()) setName(name);
|
||||||
}
|
}
|
||||||
|
@ -112,11 +112,11 @@ public:
|
|||||||
/// leads to undefined behavior.
|
/// leads to undefined behavior.
|
||||||
///
|
///
|
||||||
bool isConstant() const { return isConstantGlobal; }
|
bool isConstant() const { return isConstantGlobal; }
|
||||||
void setConstant(bool Value) { isConstantGlobal = Value; }
|
void setConstant(bool Val) { isConstantGlobal = Val; }
|
||||||
|
|
||||||
/// If the value is "Thread Local", its value isn't shared by the threads.
|
/// If the value is "Thread Local", its value isn't shared by the threads.
|
||||||
bool isThreadLocal() const { return isThreadLocalSymbol; }
|
bool isThreadLocal() const { return isThreadLocalSymbol; }
|
||||||
void setThreadLocal(bool Value) { isThreadLocalSymbol = Value; }
|
void setThreadLocal(bool Val) { isThreadLocalSymbol = Val; }
|
||||||
|
|
||||||
/// removeFromParent - This method unlinks 'this' from the containing module,
|
/// removeFromParent - This method unlinks 'this' from the containing module,
|
||||||
/// but does not delete it.
|
/// but does not delete it.
|
||||||
|
@ -48,7 +48,7 @@ public:
|
|||||||
/// it up to be materialized lazily. If the provider doesn't support this
|
/// it up to be materialized lazily. If the provider doesn't support this
|
||||||
/// capability, this method is a noop.
|
/// capability, this method is a noop.
|
||||||
///
|
///
|
||||||
virtual void dematerializeFunction(Function *F) {}
|
virtual void dematerializeFunction(Function *) {}
|
||||||
|
|
||||||
/// materializeModule - make sure the entire Module has been completely read.
|
/// materializeModule - make sure the entire Module has been completely read.
|
||||||
/// On error, return null and fill in the error string if specified.
|
/// On error, return null and fill in the error string if specified.
|
||||||
@ -77,10 +77,10 @@ struct ExistingModuleProvider : public ModuleProvider {
|
|||||||
explicit ExistingModuleProvider(Module *M) {
|
explicit ExistingModuleProvider(Module *M) {
|
||||||
TheModule = M;
|
TheModule = M;
|
||||||
}
|
}
|
||||||
bool materializeFunction(Function *F, std::string *ErrInfo = 0) {
|
bool materializeFunction(Function *, std::string * = 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Module* materializeModule(std::string *ErrInfo = 0) { return TheModule; }
|
Module* materializeModule(std::string * = 0) { return TheModule; }
|
||||||
};
|
};
|
||||||
|
|
||||||
} // End llvm namespace
|
} // End llvm namespace
|
||||||
|
@ -109,10 +109,10 @@ public:
|
|||||||
|
|
||||||
/// Each pass is responsible for assigning a pass manager to itself.
|
/// Each pass is responsible for assigning a pass manager to itself.
|
||||||
/// PMS is the stack of available pass manager.
|
/// PMS is the stack of available pass manager.
|
||||||
virtual void assignPassManager(PMStack &PMS,
|
virtual void assignPassManager(PMStack &,
|
||||||
PassManagerType T = PMT_Unknown) {}
|
PassManagerType = PMT_Unknown) {}
|
||||||
/// Check if available pass managers are suitable for this pass or not.
|
/// Check if available pass managers are suitable for this pass or not.
|
||||||
virtual void preparePassManager(PMStack &PMS) {}
|
virtual void preparePassManager(PMStack &) {}
|
||||||
|
|
||||||
/// Return what kind of Pass Manager can manage this pass.
|
/// Return what kind of Pass Manager can manage this pass.
|
||||||
virtual PassManagerType getPotentialPassManagerType() const {
|
virtual PassManagerType getPotentialPassManagerType() const {
|
||||||
@ -134,7 +134,7 @@ public:
|
|||||||
/// particular analysis result to this function, it can then use the
|
/// particular analysis result to this function, it can then use the
|
||||||
/// getAnalysis<AnalysisType>() function, below.
|
/// getAnalysis<AnalysisType>() function, below.
|
||||||
///
|
///
|
||||||
virtual void getAnalysisUsage(AnalysisUsage &Info) const {
|
virtual void getAnalysisUsage(AnalysisUsage &) const {
|
||||||
// By default, no analysis results are used, all are invalidated.
|
// By default, no analysis results are used, all are invalidated.
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -250,7 +250,7 @@ public:
|
|||||||
|
|
||||||
/// ImmutablePasses are never run.
|
/// ImmutablePasses are never run.
|
||||||
///
|
///
|
||||||
bool runOnModule(Module &M) { return false; }
|
bool runOnModule(Module &) { return false; }
|
||||||
|
|
||||||
explicit ImmutablePass(intptr_t pid) : ModulePass(pid) {}
|
explicit ImmutablePass(intptr_t pid) : ModulePass(pid) {}
|
||||||
explicit ImmutablePass(const void *pid)
|
explicit ImmutablePass(const void *pid)
|
||||||
@ -277,7 +277,7 @@ public:
|
|||||||
/// doInitialization - Virtual method overridden by subclasses to do
|
/// doInitialization - Virtual method overridden by subclasses to do
|
||||||
/// any necessary per-module initialization.
|
/// any necessary per-module initialization.
|
||||||
///
|
///
|
||||||
virtual bool doInitialization(Module &M) { return false; }
|
virtual bool doInitialization(Module &) { return false; }
|
||||||
|
|
||||||
/// runOnFunction - Virtual method overriden by subclasses to do the
|
/// runOnFunction - Virtual method overriden by subclasses to do the
|
||||||
/// per-function processing of the pass.
|
/// per-function processing of the pass.
|
||||||
@ -287,7 +287,7 @@ public:
|
|||||||
/// doFinalization - Virtual method overriden by subclasses to do any post
|
/// doFinalization - Virtual method overriden by subclasses to do any post
|
||||||
/// processing needed after all passes have run.
|
/// processing needed after all passes have run.
|
||||||
///
|
///
|
||||||
virtual bool doFinalization(Module &M) { return false; }
|
virtual bool doFinalization(Module &) { return false; }
|
||||||
|
|
||||||
/// runOnModule - On a module, we run this pass by initializing,
|
/// runOnModule - On a module, we run this pass by initializing,
|
||||||
/// ronOnFunction'ing once for every function in the module, then by
|
/// ronOnFunction'ing once for every function in the module, then by
|
||||||
@ -329,12 +329,12 @@ public:
|
|||||||
/// doInitialization - Virtual method overridden by subclasses to do
|
/// doInitialization - Virtual method overridden by subclasses to do
|
||||||
/// any necessary per-module initialization.
|
/// any necessary per-module initialization.
|
||||||
///
|
///
|
||||||
virtual bool doInitialization(Module &M) { return false; }
|
virtual bool doInitialization(Module &) { return false; }
|
||||||
|
|
||||||
/// doInitialization - Virtual method overridden by BasicBlockPass subclasses
|
/// doInitialization - Virtual method overridden by BasicBlockPass subclasses
|
||||||
/// to do any necessary per-function initialization.
|
/// to do any necessary per-function initialization.
|
||||||
///
|
///
|
||||||
virtual bool doInitialization(Function &F) { return false; }
|
virtual bool doInitialization(Function &) { return false; }
|
||||||
|
|
||||||
/// runOnBasicBlock - Virtual method overriden by subclasses to do the
|
/// runOnBasicBlock - Virtual method overriden by subclasses to do the
|
||||||
/// per-basicblock processing of the pass.
|
/// per-basicblock processing of the pass.
|
||||||
@ -344,12 +344,12 @@ public:
|
|||||||
/// doFinalization - Virtual method overriden by BasicBlockPass subclasses to
|
/// doFinalization - Virtual method overriden by BasicBlockPass subclasses to
|
||||||
/// do any post processing needed after all passes have run.
|
/// do any post processing needed after all passes have run.
|
||||||
///
|
///
|
||||||
virtual bool doFinalization(Function &F) { return false; }
|
virtual bool doFinalization(Function &) { return false; }
|
||||||
|
|
||||||
/// doFinalization - Virtual method overriden by subclasses to do any post
|
/// doFinalization - Virtual method overriden by subclasses to do any post
|
||||||
/// processing needed after all passes have run.
|
/// processing needed after all passes have run.
|
||||||
///
|
///
|
||||||
virtual bool doFinalization(Module &M) { return false; }
|
virtual bool doFinalization(Module &) { return false; }
|
||||||
|
|
||||||
|
|
||||||
// To run this pass on a function, we simply call runOnBasicBlock once for
|
// To run this pass on a function, we simply call runOnBasicBlock once for
|
||||||
|
@ -53,10 +53,10 @@ public:
|
|||||||
/// through RegisterPass.
|
/// through RegisterPass.
|
||||||
PassInfo(const char *name, const char *arg, intptr_t pi,
|
PassInfo(const char *name, const char *arg, intptr_t pi,
|
||||||
NormalCtor_t normal = 0,
|
NormalCtor_t normal = 0,
|
||||||
bool isCFGOnly = false, bool isAnalysis = false)
|
bool isCFGOnly = false, bool is_analysis = false)
|
||||||
: PassName(name), PassArgument(arg), PassID(pi),
|
: PassName(name), PassArgument(arg), PassID(pi),
|
||||||
IsCFGOnlyPass(isCFGOnly),
|
IsCFGOnlyPass(isCFGOnly),
|
||||||
IsAnalysis(isAnalysis), IsAnalysisGroup(false), NormalCtor(normal) {
|
IsAnalysis(is_analysis), IsAnalysisGroup(false), NormalCtor(normal) {
|
||||||
registerPass();
|
registerPass();
|
||||||
}
|
}
|
||||||
/// PassInfo ctor - Do not call this directly, this should only be invoked
|
/// PassInfo ctor - Do not call this directly, this should only be invoked
|
||||||
@ -169,10 +169,10 @@ struct RegisterPass : public PassInfo {
|
|||||||
|
|
||||||
// Register Pass using default constructor...
|
// Register Pass using default constructor...
|
||||||
RegisterPass(const char *PassArg, const char *Name, bool CFGOnly = false,
|
RegisterPass(const char *PassArg, const char *Name, bool CFGOnly = false,
|
||||||
bool IsAnalysis = false)
|
bool is_analysis = false)
|
||||||
: PassInfo(Name, PassArg, intptr_t(&passName::ID),
|
: PassInfo(Name, PassArg, intptr_t(&passName::ID),
|
||||||
PassInfo::NormalCtor_t(callDefaultCtor<passName>),
|
PassInfo::NormalCtor_t(callDefaultCtor<passName>),
|
||||||
CFGOnly, IsAnalysis) {
|
CFGOnly, is_analysis) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -244,7 +244,7 @@ struct PassRegistrationListener {
|
|||||||
/// Callback functions - These functions are invoked whenever a pass is loaded
|
/// Callback functions - These functions are invoked whenever a pass is loaded
|
||||||
/// or removed from the current executable.
|
/// or removed from the current executable.
|
||||||
///
|
///
|
||||||
virtual void passRegistered(const PassInfo *P) {}
|
virtual void passRegistered(const PassInfo *) {}
|
||||||
|
|
||||||
/// enumeratePasses - Iterate over the registered passes, calling the
|
/// enumeratePasses - Iterate over the registered passes, calling the
|
||||||
/// passEnumerate callback on each PassInfo object.
|
/// passEnumerate callback on each PassInfo object.
|
||||||
@ -254,7 +254,7 @@ struct PassRegistrationListener {
|
|||||||
/// passEnumerate - Callback function invoked when someone calls
|
/// passEnumerate - Callback function invoked when someone calls
|
||||||
/// enumeratePasses on this PassRegistrationListener object.
|
/// enumeratePasses on this PassRegistrationListener object.
|
||||||
///
|
///
|
||||||
virtual void passEnumerate(const PassInfo *P) {}
|
virtual void passEnumerate(const PassInfo *) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -226,7 +226,7 @@ public:
|
|||||||
//
|
//
|
||||||
virtual void printOptionInfo(size_t GlobalWidth) const = 0;
|
virtual void printOptionInfo(size_t GlobalWidth) const = 0;
|
||||||
|
|
||||||
virtual void getExtraOptionNames(std::vector<const char*> &OptionNames) {}
|
virtual void getExtraOptionNames(std::vector<const char*> &) {}
|
||||||
|
|
||||||
// addOccurrence - Wrapper around handleOccurrence that enforces Flags
|
// addOccurrence - Wrapper around handleOccurrence that enforces Flags
|
||||||
//
|
//
|
||||||
@ -324,10 +324,10 @@ public:
|
|||||||
Values.push_back(std::make_pair(EnumName, std::make_pair(Val, Desc)));
|
Values.push_back(std::make_pair(EnumName, std::make_pair(Val, Desc)));
|
||||||
|
|
||||||
// Process the varargs portion of the values...
|
// Process the varargs portion of the values...
|
||||||
while (const char *EnumName = va_arg(ValueArgs, const char *)) {
|
while (const char *enumName = va_arg(ValueArgs, const char *)) {
|
||||||
DataType EnumVal = static_cast<DataType>(va_arg(ValueArgs, int));
|
DataType EnumVal = static_cast<DataType>(va_arg(ValueArgs, int));
|
||||||
const char *EnumDesc = va_arg(ValueArgs, const char *);
|
const char *EnumDesc = va_arg(ValueArgs, const char *);
|
||||||
Values.push_back(std::make_pair(EnumName, // Add value to value map
|
Values.push_back(std::make_pair(enumName, // Add value to value map
|
||||||
std::make_pair(EnumVal, EnumDesc)));
|
std::make_pair(EnumVal, EnumDesc)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -499,9 +499,9 @@ struct basic_parser_impl { // non-template implementation of basic_parser<t>
|
|||||||
return ValueRequired;
|
return ValueRequired;
|
||||||
}
|
}
|
||||||
|
|
||||||
void getExtraOptionNames(std::vector<const char*> &OptionNames) {}
|
void getExtraOptionNames(std::vector<const char*> &) {}
|
||||||
|
|
||||||
void initialize(Option &O) {}
|
void initialize(Option &) {}
|
||||||
|
|
||||||
// Return the width of the option tag for printing...
|
// Return the width of the option tag for printing...
|
||||||
size_t getOptionWidth(const Option &O) const;
|
size_t getOptionWidth(const Option &O) const;
|
||||||
@ -651,7 +651,7 @@ template<>
|
|||||||
class parser<std::string> : public basic_parser<std::string> {
|
class parser<std::string> : public basic_parser<std::string> {
|
||||||
public:
|
public:
|
||||||
// parse - Return true on error.
|
// parse - Return true on error.
|
||||||
bool parse(Option &O, const char *AN, const std::string &Arg,
|
bool parse(Option &, const char *, const std::string &Arg,
|
||||||
std::string &Value) {
|
std::string &Value) {
|
||||||
Value = Arg;
|
Value = Arg;
|
||||||
return false;
|
return false;
|
||||||
@ -1257,7 +1257,7 @@ public:
|
|||||||
|
|
||||||
class alias : public Option {
|
class alias : public Option {
|
||||||
Option *AliasFor;
|
Option *AliasFor;
|
||||||
virtual bool handleOccurrence(unsigned pos, const char *ArgName,
|
virtual bool handleOccurrence(unsigned pos, const char */*ArgName*/,
|
||||||
const std::string &Arg) {
|
const std::string &Arg) {
|
||||||
return AliasFor->handleOccurrence(pos, AliasFor->ArgStr, Arg);
|
return AliasFor->handleOccurrence(pos, AliasFor->ArgStr, Arg);
|
||||||
}
|
}
|
||||||
|
@ -99,7 +99,7 @@ public:
|
|||||||
/// used by the LLC tool to determine which target to use when an explicit
|
/// used by the LLC tool to determine which target to use when an explicit
|
||||||
/// -march option is not specified. If a target returns zero, it will never
|
/// -march option is not specified. If a target returns zero, it will never
|
||||||
/// be chosen without an explicit -march option.
|
/// be chosen without an explicit -march option.
|
||||||
static unsigned getModuleMatchQuality(const Module &M) { return 0; }
|
static unsigned getModuleMatchQuality(const Module &) { return 0; }
|
||||||
|
|
||||||
/// getJITMatchQuality - This static method should be implemented by targets
|
/// getJITMatchQuality - This static method should be implemented by targets
|
||||||
/// that provide JIT capabilities to indicate how suitable they are for
|
/// that provide JIT capabilities to indicate how suitable they are for
|
||||||
@ -195,10 +195,10 @@ public:
|
|||||||
/// This method should return FileModel::Error if emission of this file type
|
/// This method should return FileModel::Error if emission of this file type
|
||||||
/// is not supported.
|
/// is not supported.
|
||||||
///
|
///
|
||||||
virtual FileModel::Model addPassesToEmitFile(PassManagerBase &PM,
|
virtual FileModel::Model addPassesToEmitFile(PassManagerBase &,
|
||||||
std::ostream &Out,
|
std::ostream &,
|
||||||
CodeGenFileType FileType,
|
CodeGenFileType,
|
||||||
bool Fast) {
|
bool /*Fast*/) {
|
||||||
return FileModel::None;
|
return FileModel::None;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -206,8 +206,8 @@ public:
|
|||||||
/// to be split up (e.g., to add an object writer pass), this method can be
|
/// to be split up (e.g., to add an object writer pass), this method can be
|
||||||
/// used to finish up adding passes to emit the file, if necessary.
|
/// used to finish up adding passes to emit the file, if necessary.
|
||||||
///
|
///
|
||||||
virtual bool addPassesToEmitFileFinish(PassManagerBase &PM,
|
virtual bool addPassesToEmitFileFinish(PassManagerBase &,
|
||||||
MachineCodeEmitter *MCE, bool Fast) {
|
MachineCodeEmitter *, bool /*Fast*/) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -217,8 +217,9 @@ public:
|
|||||||
/// of functions. This method returns true if machine code emission is
|
/// of functions. This method returns true if machine code emission is
|
||||||
/// not supported.
|
/// not supported.
|
||||||
///
|
///
|
||||||
virtual bool addPassesToEmitMachineCode(PassManagerBase &PM,
|
virtual bool addPassesToEmitMachineCode(PassManagerBase &,
|
||||||
MachineCodeEmitter &MCE, bool Fast) {
|
MachineCodeEmitter &,
|
||||||
|
bool /*Fast*/) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -226,8 +227,8 @@ public:
|
|||||||
/// require having the entire module at once. This is not recommended, do not
|
/// require having the entire module at once. This is not recommended, do not
|
||||||
/// use this.
|
/// use this.
|
||||||
virtual bool WantsWholeFile() const { return false; }
|
virtual bool WantsWholeFile() const { return false; }
|
||||||
virtual bool addPassesToEmitWholeFile(PassManager &PM, std::ostream &Out,
|
virtual bool addPassesToEmitWholeFile(PassManager &, std::ostream &,
|
||||||
CodeGenFileType FileType, bool Fast) {
|
CodeGenFileType, bool /*Fast*/) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -277,14 +278,14 @@ public:
|
|||||||
/// addInstSelector - This method should add any "last minute" LLVM->LLVM
|
/// addInstSelector - This method should add any "last minute" LLVM->LLVM
|
||||||
/// passes, then install an instruction selector pass, which converts from
|
/// passes, then install an instruction selector pass, which converts from
|
||||||
/// LLVM code to machine instructions.
|
/// LLVM code to machine instructions.
|
||||||
virtual bool addInstSelector(PassManagerBase &PM, bool Fast) {
|
virtual bool addInstSelector(PassManagerBase &, bool /*Fast*/) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// addPreRegAllocPasses - This method may be implemented by targets that want
|
/// addPreRegAllocPasses - This method may be implemented by targets that want
|
||||||
/// to run passes immediately before register allocation. This should return
|
/// to run passes immediately before register allocation. This should return
|
||||||
/// true if -print-machineinstrs should print after these passes.
|
/// true if -print-machineinstrs should print after these passes.
|
||||||
virtual bool addPreRegAlloc(PassManagerBase &PM, bool Fast) {
|
virtual bool addPreRegAlloc(PassManagerBase &, bool /*Fast*/) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -292,14 +293,14 @@ public:
|
|||||||
/// want to run passes after register allocation but before prolog-epilog
|
/// want to run passes after register allocation but before prolog-epilog
|
||||||
/// insertion. This should return true if -print-machineinstrs should print
|
/// insertion. This should return true if -print-machineinstrs should print
|
||||||
/// after these passes.
|
/// after these passes.
|
||||||
virtual bool addPostRegAlloc(PassManagerBase &PM, bool Fast) {
|
virtual bool addPostRegAlloc(PassManagerBase &, bool /*Fast*/) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// addPreEmitPass - This pass may be implemented by targets that want to run
|
/// addPreEmitPass - This pass may be implemented by targets that want to run
|
||||||
/// passes immediately before machine code is emitted. This should return
|
/// passes immediately before machine code is emitted. This should return
|
||||||
/// true if -print-machineinstrs should print out the code after the passes.
|
/// true if -print-machineinstrs should print out the code after the passes.
|
||||||
virtual bool addPreEmitPass(PassManagerBase &PM, bool Fast) {
|
virtual bool addPreEmitPass(PassManagerBase &, bool /*Fast*/) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -307,16 +308,16 @@ public:
|
|||||||
/// addAssemblyEmitter - This pass should be overridden by the target to add
|
/// addAssemblyEmitter - This pass should be overridden by the target to add
|
||||||
/// the asmprinter, if asm emission is supported. If this is not supported,
|
/// the asmprinter, if asm emission is supported. If this is not supported,
|
||||||
/// 'true' should be returned.
|
/// 'true' should be returned.
|
||||||
virtual bool addAssemblyEmitter(PassManagerBase &PM, bool Fast,
|
virtual bool addAssemblyEmitter(PassManagerBase &, bool /*Fast*/,
|
||||||
std::ostream &Out) {
|
std::ostream &) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// addCodeEmitter - This pass should be overridden by the target to add a
|
/// addCodeEmitter - This pass should be overridden by the target to add a
|
||||||
/// code emitter, if supported. If this is not supported, 'true' should be
|
/// code emitter, if supported. If this is not supported, 'true' should be
|
||||||
/// returned. If DumpAsm is true, the generated assembly is printed to cerr.
|
/// returned. If DumpAsm is true, the generated assembly is printed to cerr.
|
||||||
virtual bool addCodeEmitter(PassManagerBase &PM, bool Fast, bool DumpAsm,
|
virtual bool addCodeEmitter(PassManagerBase &, bool /*Fast*/,
|
||||||
MachineCodeEmitter &MCE) {
|
bool /*DumpAsm*/, MachineCodeEmitter &) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -324,8 +325,8 @@ public:
|
|||||||
/// a code emitter (without setting flags), if supported. If this is not
|
/// a code emitter (without setting flags), if supported. If this is not
|
||||||
/// supported, 'true' should be returned. If DumpAsm is true, the generated
|
/// supported, 'true' should be returned. If DumpAsm is true, the generated
|
||||||
/// assembly is printed to cerr.
|
/// assembly is printed to cerr.
|
||||||
virtual bool addSimpleCodeEmitter(PassManagerBase &PM, bool Fast,
|
virtual bool addSimpleCodeEmitter(PassManagerBase &, bool /*Fast*/,
|
||||||
bool DumpAsm, MachineCodeEmitter &MCE) {
|
bool /*DumpAsm*/, MachineCodeEmitter &) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -293,7 +293,7 @@ public:
|
|||||||
static const IntegerType *Int1Ty, *Int8Ty, *Int16Ty, *Int32Ty, *Int64Ty;
|
static const IntegerType *Int1Ty, *Int8Ty, *Int16Ty, *Int32Ty, *Int64Ty;
|
||||||
|
|
||||||
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||||
static inline bool classof(const Type *T) { return true; }
|
static inline bool classof(const Type *) { return true; }
|
||||||
|
|
||||||
void addRef() const {
|
void addRef() const {
|
||||||
assert(isAbstract() && "Cannot add a reference to a non-abstract type!");
|
assert(isAbstract() && "Cannot add a reference to a non-abstract type!");
|
||||||
|
@ -228,8 +228,8 @@ protected:
|
|||||||
unsigned NumOperands;
|
unsigned NumOperands;
|
||||||
|
|
||||||
void *operator new(size_t s, unsigned Us);
|
void *operator new(size_t s, unsigned Us);
|
||||||
User(const Type *Ty, unsigned vty, Use *OpList, unsigned NumOps)
|
User(const Type *ty, unsigned vty, Use *OpList, unsigned NumOps)
|
||||||
: Value(Ty, vty), OperandList(OpList), NumOperands(NumOps) {}
|
: Value(ty, vty), OperandList(OpList), NumOperands(NumOps) {}
|
||||||
Use *allocHungoffUses(unsigned) const;
|
Use *allocHungoffUses(unsigned) const;
|
||||||
void dropHungoffUses(Use *U) {
|
void dropHungoffUses(Use *U) {
|
||||||
if (OperandList == U) {
|
if (OperandList == U) {
|
||||||
|
@ -232,7 +232,7 @@ inline std::ostream &operator<<(std::ostream &OS, const Value &V) {
|
|||||||
return OS;
|
return OS;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Use::init(Value *V, User *user) {
|
void Use::init(Value *V, User *) {
|
||||||
Val = V;
|
Val = V;
|
||||||
if (V) V->addUse(*this);
|
if (V) V->addUse(*this);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user