llvm.org GIT mirror llvm / 13d5732
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 Bill Wendling 12 years ago
18 changed file(s) with 97 addition(s) and 99 deletion(s). Raw diff Collapse all Expand all
299299
300300 bool operator==(const SmallVectorImpl &RHS) const {
301301 if (size() != RHS.size()) return false;
302 for (T *This = Begin, *That = RHS.Begin, *End = Begin+size();
303 This != End; ++This, ++That)
302 for (T *This = Begin, *That = RHS.Begin, *E = Begin+size();
303 This != E; ++This, ++That)
304304 if (*This != *That)
305305 return false;
306306 return true;
5858 /// other instruction is available, issue it first.
5959 /// * NoopHazard: issuing this instruction would break the program. If
6060 /// some other instruction can be issued, do so, otherwise issue a noop.
61 virtual HazardType getHazardType(SDNode *Node) {
61 virtual HazardType getHazardType(SDNode *) {
6262 return NoHazard;
6363 }
6464
6565 /// EmitInstruction - This callback is invoked when an instruction is
6666 /// emitted, to advance the hazard state.
67 virtual void EmitInstruction(SDNode *Node) {
68 }
67 virtual void EmitInstruction(SDNode *) {}
6968
7069 /// AdvanceCycle - This callback is invoked when no instructions can be
7170 /// issued on this cycle without a hazard. This should increment the
7271 /// internal state of the hazard recognizer so that previously "Hazard"
7372 /// instructions will now not be hazards.
74 virtual void AdvanceCycle() {
75 }
73 virtual void AdvanceCycle() {}
7674
7775 /// EmitNoop - This callback is invoked when a noop was added to the
7876 /// instruction stream.
79 virtual void EmitNoop() {
80 }
77 virtual void EmitNoop() {}
8178 };
8279
8380 /// SDep - Scheduling dependency. It keeps track of dependent nodes,
235232 /// ScheduledNode - As each node is scheduled, this method is invoked. This
236233 /// allows the priority function to adjust the priority of node that have
237234 /// already been emitted.
238 virtual void ScheduledNode(SUnit *Node) {}
239
240 virtual void UnscheduledNode(SUnit *Node) {}
235 virtual void ScheduledNode(SUnit *) {}
236
237 virtual void UnscheduledNode(SUnit *) {}
241238 };
242239
243240 class ScheduleDAG {
161161 MVT::ValueType VT3) {
162162 return getVTList(VT1, VT2, VT3).VTs;
163163 }
164 const MVT::ValueType *getNodeValueTypes(std::vector &VTList) {
165 return getVTList(&VTList[0], (unsigned)VTList.size()).VTs;
164 const MVT::ValueType *getNodeValueTypes(std::vector &vtList) {
165 return getVTList(&vtList[0], (unsigned)vtList.size()).VTs;
166166 }
167167
168168
19631963 */
19641964 SDUse Ops[4];
19651965 public:
1966 LSBaseSDNode(ISD::NodeType NodeTy, SDOperand *Operands, unsigned NumOperands,
1966 LSBaseSDNode(ISD::NodeType NodeTy, SDOperand *Operands, unsigned numOperands,
19671967 SDVTList VTs, ISD::MemIndexedMode AM, MVT::ValueType VT,
19681968 const Value *SV, int SVO, unsigned Align, bool Vol)
19691969 : SDNode(NodeTy, VTs),
19701970 AddrMode(AM), MemoryVT(VT),
19711971 SrcValue(SV), SVOffset(SVO), Alignment(Align), IsVolatile(Vol) {
1972 for (unsigned i = 0; i != NumOperands; ++i)
1972 for (unsigned i = 0; i != numOperands; ++i)
19731973 Ops[i] = Operands[i];
1974 InitOperands(Ops, NumOperands);
1974 InitOperands(Ops, numOperands);
19751975 assert(Align != 0 && "Loads and stores should have non-zero aligment");
19761976 assert((getOffset().getOpcode() == ISD::UNDEF || isIndexed()) &&
19771977 "Only indexed loads and stores have a non-undef offset operand");
20032003 /// reference performed by this load or store.
20042004 MachineMemOperand getMemOperand() const;
20052005
2006 static bool classof(const LSBaseSDNode *N) { return true; }
2006 static bool classof(const LSBaseSDNode *) { return true; }
20072007 static bool classof(const SDNode *N) {
20082008 return N->getOpcode() == ISD::LOAD ||
20092009 N->getOpcode() == ISD::STORE;
21332133 //static SDNode *createNode(const SDNode &V) { return new SDNode(V); }
21342134
21352135
2136 void addNodeToList(SDNode *NTy) {}
2137 void removeNodeFromList(SDNode *NTy) {}
2138 void transferNodesFromList(iplist &L2,
2139 const ilist_iterator &X,
2140 const ilist_iterator &Y) {}
2136 void addNodeToList(SDNode *) {}
2137 void removeNodeFromList(SDNode *) {}
2138 void transferNodesFromList(iplist &,
2139 const ilist_iterator &,
2140 const ilist_iterator &) {}
21412141 };
21422142
21432143 namespace ISD {
3838 void operator=(const Constant &); // Do not implement
3939 Constant(const Constant &); // Do not implement
4040 protected:
41 Constant(const Type *Ty, ValueTy vty, Use *Ops, unsigned NumOps)
42 : User(Ty, vty, Ops, NumOps) {}
41 Constant(const Type *ty, ValueTy vty, Use *Ops, unsigned NumOps)
42 : User(ty, vty, Ops, NumOps) {}
4343
4444 void destroyConstantImpl();
4545 public:
282282 void *operator new(size_t, unsigned); // DO NOT IMPLEMENT
283283 ConstantAggregateZero(const ConstantAggregateZero &); // DO NOT IMPLEMENT
284284 protected:
285 explicit ConstantAggregateZero(const Type *Ty)
286 : Constant(Ty, ConstantAggregateZeroVal, 0, 0) {}
285 explicit ConstantAggregateZero(const Type *ty)
286 : Constant(ty, ConstantAggregateZeroVal, 0, 0) {}
287287 protected:
288288 // allocate space for exactly zero operands
289289 void *operator new(size_t s) {
552552 friend struct ConvertConstantType;
553553
554554 protected:
555 ConstantExpr(const Type *Ty, unsigned Opcode, Use *Ops, unsigned NumOps)
556 : Constant(Ty, ConstantExprVal, Ops, NumOps) {
555 ConstantExpr(const Type *ty, unsigned Opcode, Use *Ops, unsigned NumOps)
556 : Constant(ty, ConstantExprVal, Ops, NumOps) {
557557 // Operation type (an Instruction opcode) is stored as the SubclassData.
558558 SubclassData = Opcode;
559559 }
6666 void dump() const { Type::dump(); }
6767
6868 // Methods for support type inquiry through isa, cast, and dyn_cast:
69 static inline bool classof(const DerivedType *T) { return true; }
69 static inline bool classof(const DerivedType *) { return true; }
7070 static inline bool classof(const Type *T) {
7171 return T->isDerivedType();
7272 }
126126 bool isPowerOf2ByteWidth() const;
127127
128128 // Methods for support type inquiry through isa, cast, and dyn_cast:
129 static inline bool classof(const IntegerType *T) { return true; }
129 static inline bool classof(const IntegerType *) { return true; }
130130 static inline bool classof(const Type *T) {
131131 return T->getTypeID() == IntegerTyID;
132132 }
178178 virtual void typeBecameConcrete(const DerivedType *AbsTy);
179179
180180 // Methods for support type inquiry through isa, cast, and dyn_cast:
181 static inline bool classof(const FunctionType *T) { return true; }
181 static inline bool classof(const FunctionType *) { return true; }
182182 static inline bool classof(const Type *T) {
183183 return T->getTypeID() == FunctionTyID;
184184 }
199199 virtual bool indexValid(const Value *V) const = 0;
200200
201201 // Methods for support type inquiry through isa, cast, and dyn_cast:
202 static inline bool classof(const CompositeType *T) { return true; }
202 static inline bool classof(const CompositeType *) { return true; }
203203 static inline bool classof(const Type *T) {
204204 return T->getTypeID() == ArrayTyID ||
205205 T->getTypeID() == StructTyID ||
252252 virtual void typeBecameConcrete(const DerivedType *AbsTy);
253253
254254 // Methods for support type inquiry through isa, cast, and dyn_cast:
255 static inline bool classof(const StructType *T) { return true; }
255 static inline bool classof(const StructType *) { return true; }
256256 static inline bool classof(const Type *T) {
257257 return T->getTypeID() == StructTyID;
258258 }
291291 /// getTypeAtIndex - Given an index value into the type, return the type of
292292 /// the element. For sequential types, there is only one subtype...
293293 ///
294 virtual const Type *getTypeAtIndex(const Value *V) const {
294 virtual const Type *getTypeAtIndex(const Value *) const {
295295 return ContainedTys[0];
296296 }
297297
298298 // Methods for support type inquiry through isa, cast, and dyn_cast:
299 static inline bool classof(const SequentialType *T) { return true; }
299 static inline bool classof(const SequentialType *) { return true; }
300300 static inline bool classof(const Type *T) {
301301 return T->getTypeID() == ArrayTyID ||
302302 T->getTypeID() == PointerTyID ||
327327 virtual void typeBecameConcrete(const DerivedType *AbsTy);
328328
329329 // Methods for support type inquiry through isa, cast, and dyn_cast:
330 static inline bool classof(const ArrayType *T) { return true; }
330 static inline bool classof(const ArrayType *) { return true; }
331331 static inline bool classof(const Type *T) {
332332 return T->getTypeID() == ArrayTyID;
333333 }
371371 virtual void typeBecameConcrete(const DerivedType *AbsTy);
372372
373373 // Methods for support type inquiry through isa, cast, and dyn_cast:
374 static inline bool classof(const VectorType *T) { return true; }
374 static inline bool classof(const VectorType *) { return true; }
375375 static inline bool classof(const Type *T) {
376376 return T->getTypeID() == VectorTyID;
377377 }
406406 virtual void typeBecameConcrete(const DerivedType *AbsTy);
407407
408408 // Implement support type inquiry through isa, cast, and dyn_cast:
409 static inline bool classof(const PointerType *T) { return true; }
409 static inline bool classof(const PointerType *) { return true; }
410410 static inline bool classof(const Type *T) {
411411 return T->getTypeID() == PointerTyID;
412412 }
427427 }
428428
429429 // Implement support for type inquiry through isa, cast, and dyn_cast:
430 static inline bool classof(const OpaqueType *T) { return true; }
430 static inline bool classof(const OpaqueType *) { return true; }
431431 static inline bool classof(const Type *T) {
432432 return T->getTypeID() == OpaqueTyID;
433433 }
4949
5050 public:
5151 std::map &
52 getGlobalAddressMap(const MutexGuard &locked) {
52 getGlobalAddressMap(const MutexGuard &) {
5353 return GlobalAddressMap;
5454 }
5555
5656 std::map &
57 getGlobalAddressReverseMap(const MutexGuard& locked) {
57 getGlobalAddressReverseMap(const MutexGuard &) {
5858 return GlobalAddressReverseMap;
5959 }
6060 };
4949 };
5050
5151 protected:
52 GlobalValue(const Type *Ty, ValueTy vty, Use *Ops, unsigned NumOps,
52 GlobalValue(const Type *ty, ValueTy vty, Use *Ops, unsigned NumOps,
5353 LinkageTypes linkage, const std::string &name = "")
54 : Constant(Ty, vty, Ops, NumOps), Parent(0),
54 : Constant(ty, vty, Ops, NumOps), Parent(0),
5555 Linkage(linkage), Visibility(DefaultVisibility), Alignment(0) {
5656 if (!name.empty()) setName(name);
5757 }
111111 /// leads to undefined behavior.
112112 ///
113113 bool isConstant() const { return isConstantGlobal; }
114 void setConstant(bool Value) { isConstantGlobal = Value; }
114 void setConstant(bool Val) { isConstantGlobal = Val; }
115115
116116 /// If the value is "Thread Local", its value isn't shared by the threads.
117117 bool isThreadLocal() const { return isThreadLocalSymbol; }
118 void setThreadLocal(bool Value) { isThreadLocalSymbol = Value; }
118 void setThreadLocal(bool Val) { isThreadLocalSymbol = Val; }
119119
120120 /// removeFromParent - This method unlinks 'this' from the containing module,
121121 /// but does not delete it.
4747 /// it up to be materialized lazily. If the provider doesn't support this
4848 /// capability, this method is a noop.
4949 ///
50 virtual void dematerializeFunction(Function *F) {}
50 virtual void dematerializeFunction(Function *) {}
5151
5252 /// materializeModule - make sure the entire Module has been completely read.
5353 /// On error, return null and fill in the error string if specified.
7676 explicit ExistingModuleProvider(Module *M) {
7777 TheModule = M;
7878 }
79 bool materializeFunction(Function *F, std::string *ErrInfo = 0) {
79 bool materializeFunction(Function *, std::string * = 0) {
8080 return false;
8181 }
82 Module* materializeModule(std::string *ErrInfo = 0) { return TheModule; }
82 Module* materializeModule(std::string * = 0) { return TheModule; }
8383 };
8484
8585 } // End llvm namespace
108108
109109 /// Each pass is responsible for assigning a pass manager to itself.
110110 /// PMS is the stack of available pass manager.
111 virtual void assignPassManager(PMStack &PMS,
112 PassManagerType T = PMT_Unknown) {}
111 virtual void assignPassManager(PMStack &,
112 PassManagerType = PMT_Unknown) {}
113113 /// Check if available pass managers are suitable for this pass or not.
114 virtual void preparePassManager(PMStack &PMS) {}
114 virtual void preparePassManager(PMStack &) {}
115115
116116 /// Return what kind of Pass Manager can manage this pass.
117117 virtual PassManagerType getPotentialPassManagerType() const {
133133 /// particular analysis result to this function, it can then use the
134134 /// getAnalysis() function, below.
135135 ///
136 virtual void getAnalysisUsage(AnalysisUsage &Info) const {
136 virtual void getAnalysisUsage(AnalysisUsage &) const {
137137 // By default, no analysis results are used, all are invalidated.
138138 }
139139
249249
250250 /// ImmutablePasses are never run.
251251 ///
252 bool runOnModule(Module &M) { return false; }
252 bool runOnModule(Module &) { return false; }
253253
254254 explicit ImmutablePass(intptr_t pid) : ModulePass(pid) {}
255255 explicit ImmutablePass(const void *pid)
276276 /// doInitialization - Virtual method overridden by subclasses to do
277277 /// any necessary per-module initialization.
278278 ///
279 virtual bool doInitialization(Module &M) { return false; }
279 virtual bool doInitialization(Module &) { return false; }
280280
281281 /// runOnFunction - Virtual method overriden by subclasses to do the
282282 /// per-function processing of the pass.
286286 /// doFinalization - Virtual method overriden by subclasses to do any post
287287 /// processing needed after all passes have run.
288288 ///
289 virtual bool doFinalization(Module &M) { return false; }
289 virtual bool doFinalization(Module &) { return false; }
290290
291291 /// runOnModule - On a module, we run this pass by initializing,
292292 /// ronOnFunction'ing once for every function in the module, then by
328328 /// doInitialization - Virtual method overridden by subclasses to do
329329 /// any necessary per-module initialization.
330330 ///
331 virtual bool doInitialization(Module &M) { return false; }
331 virtual bool doInitialization(Module &) { return false; }
332332
333333 /// doInitialization - Virtual method overridden by BasicBlockPass subclasses
334334 /// to do any necessary per-function initialization.
335335 ///
336 virtual bool doInitialization(Function &F) { return false; }
336 virtual bool doInitialization(Function &) { return false; }
337337
338338 /// runOnBasicBlock - Virtual method overriden by subclasses to do the
339339 /// per-basicblock processing of the pass.
343343 /// doFinalization - Virtual method overriden by BasicBlockPass subclasses to
344344 /// do any post processing needed after all passes have run.
345345 ///
346 virtual bool doFinalization(Function &F) { return false; }
346 virtual bool doFinalization(Function &) { return false; }
347347
348348 /// doFinalization - Virtual method overriden by subclasses to do any post
349349 /// processing needed after all passes have run.
350350 ///
351 virtual bool doFinalization(Module &M) { return false; }
351 virtual bool doFinalization(Module &) { return false; }
352352
353353
354354 // To run this pass on a function, we simply call runOnBasicBlock once for
5252 /// through RegisterPass.
5353 PassInfo(const char *name, const char *arg, intptr_t pi,
5454 NormalCtor_t normal = 0,
55 bool isCFGOnly = false, bool isAnalysis = false)
55 bool isCFGOnly = false, bool is_analysis = false)
5656 : PassName(name), PassArgument(arg), PassID(pi),
5757 IsCFGOnlyPass(isCFGOnly),
58 IsAnalysis(isAnalysis), IsAnalysisGroup(false), NormalCtor(normal) {
58 IsAnalysis(is_analysis), IsAnalysisGroup(false), NormalCtor(normal) {
5959 registerPass();
6060 }
6161 /// PassInfo ctor - Do not call this directly, this should only be invoked
168168
169169 // Register Pass using default constructor...
170170 RegisterPass(const char *PassArg, const char *Name, bool CFGOnly = false,
171 bool IsAnalysis = false)
171 bool is_analysis = false)
172172 : PassInfo(Name, PassArg, intptr_t(&passName::ID),
173173 PassInfo::NormalCtor_t(callDefaultCtor),
174 CFGOnly, IsAnalysis) {
174 CFGOnly, is_analysis) {
175175 }
176176 };
177177
243243 /// Callback functions - These functions are invoked whenever a pass is loaded
244244 /// or removed from the current executable.
245245 ///
246 virtual void passRegistered(const PassInfo *P) {}
246 virtual void passRegistered(const PassInfo *) {}
247247
248248 /// enumeratePasses - Iterate over the registered passes, calling the
249249 /// passEnumerate callback on each PassInfo object.
253253 /// passEnumerate - Callback function invoked when someone calls
254254 /// enumeratePasses on this PassRegistrationListener object.
255255 ///
256 virtual void passEnumerate(const PassInfo *P) {}
256 virtual void passEnumerate(const PassInfo *) {}
257257 };
258258
259259
225225 //
226226 virtual void printOptionInfo(size_t GlobalWidth) const = 0;
227227
228 virtual void getExtraOptionNames(std::vector &OptionNames) {}
228 virtual void getExtraOptionNames(std::vector &) {}
229229
230230 // addOccurrence - Wrapper around handleOccurrence that enforces Flags
231231 //
323323 Values.push_back(std::make_pair(EnumName, std::make_pair(Val, Desc)));
324324
325325 // Process the varargs portion of the values...
326 while (const char *EnumName = va_arg(ValueArgs, const char *)) {
326 while (const char *enumName = va_arg(ValueArgs, const char *)) {
327327 DataType EnumVal = static_cast(va_arg(ValueArgs, int));
328328 const char *EnumDesc = va_arg(ValueArgs, const char *);
329 Values.push_back(std::make_pair(EnumName, // Add value to value map
329 Values.push_back(std::make_pair(enumName, // Add value to value map
330330 std::make_pair(EnumVal, EnumDesc)));
331331 }
332332 }
498498 return ValueRequired;
499499 }
500500
501 void getExtraOptionNames(std::vector &OptionNames) {}
502
503 void initialize(Option &O) {}
501 void getExtraOptionNames(std::vector &) {}
502
503 void initialize(Option &) {}
504504
505505 // Return the width of the option tag for printing...
506506 size_t getOptionWidth(const Option &O) const;
650650 class parser : public basic_parser {
651651 public:
652652 // parse - Return true on error.
653 bool parse(Option &O, const char *AN, const std::string &Arg,
653 bool parse(Option &, const char *, const std::string &Arg,
654654 std::string &Value) {
655655 Value = Arg;
656656 return false;
12561256
12571257 class alias : public Option {
12581258 Option *AliasFor;
1259 virtual bool handleOccurrence(unsigned pos, const char *ArgName,
1259 virtual bool handleOccurrence(unsigned pos, const char */*ArgName*/,
12601260 const std::string &Arg) {
12611261 return AliasFor->handleOccurrence(pos, AliasFor->ArgStr, Arg);
12621262 }
9898 /// used by the LLC tool to determine which target to use when an explicit
9999 /// -march option is not specified. If a target returns zero, it will never
100100 /// be chosen without an explicit -march option.
101 static unsigned getModuleMatchQuality(const Module &M) { return 0; }
101 static unsigned getModuleMatchQuality(const Module &) { return 0; }
102102
103103 /// getJITMatchQuality - This static method should be implemented by targets
104104 /// that provide JIT capabilities to indicate how suitable they are for
194194 /// This method should return FileModel::Error if emission of this file type
195195 /// is not supported.
196196 ///
197 virtual FileModel::Model addPassesToEmitFile(PassManagerBase &PM,
198 std::ostream &Out,
199 CodeGenFileType FileType,
200 bool Fast) {
197 virtual FileModel::Model addPassesToEmitFile(PassManagerBase &,
198 std::ostream &,
199 CodeGenFileType,
200 bool /*Fast*/) {
201201 return FileModel::None;
202202 }
203203
205205 /// to be split up (e.g., to add an object writer pass), this method can be
206206 /// used to finish up adding passes to emit the file, if necessary.
207207 ///
208 virtual bool addPassesToEmitFileFinish(PassManagerBase &PM,
209 MachineCodeEmitter *MCE, bool Fast) {
208 virtual bool addPassesToEmitFileFinish(PassManagerBase &,
209 MachineCodeEmitter *, bool /*Fast*/) {
210210 return true;
211211 }
212212
216216 /// of functions. This method returns true if machine code emission is
217217 /// not supported.
218218 ///
219 virtual bool addPassesToEmitMachineCode(PassManagerBase &PM,
220 MachineCodeEmitter &MCE, bool Fast) {
219 virtual bool addPassesToEmitMachineCode(PassManagerBase &,
220 MachineCodeEmitter &,
221 bool /*Fast*/) {
221222 return true;
222223 }
223224
225226 /// require having the entire module at once. This is not recommended, do not
226227 /// use this.
227228 virtual bool WantsWholeFile() const { return false; }
228 virtual bool addPassesToEmitWholeFile(PassManager &PM, std::ostream &Out,
229 CodeGenFileType FileType, bool Fast) {
229 virtual bool addPassesToEmitWholeFile(PassManager &, std::ostream &,
230 CodeGenFileType, bool /*Fast*/) {
230231 return true;
231232 }
232233 };
276277 /// addInstSelector - This method should add any "last minute" LLVM->LLVM
277278 /// passes, then install an instruction selector pass, which converts from
278279 /// LLVM code to machine instructions.
279 virtual bool addInstSelector(PassManagerBase &PM, bool Fast) {
280 virtual bool addInstSelector(PassManagerBase &, bool /*Fast*/) {
280281 return true;
281282 }
282283
283284 /// addPreRegAllocPasses - This method may be implemented by targets that want
284285 /// to run passes immediately before register allocation. This should return
285286 /// true if -print-machineinstrs should print after these passes.
286 virtual bool addPreRegAlloc(PassManagerBase &PM, bool Fast) {
287 virtual bool addPreRegAlloc(PassManagerBase &, bool /*Fast*/) {
287288 return false;
288289 }
289290
291292 /// want to run passes after register allocation but before prolog-epilog
292293 /// insertion. This should return true if -print-machineinstrs should print
293294 /// after these passes.
294 virtual bool addPostRegAlloc(PassManagerBase &PM, bool Fast) {
295 virtual bool addPostRegAlloc(PassManagerBase &, bool /*Fast*/) {
295296 return false;
296297 }
297298
298299 /// addPreEmitPass - This pass may be implemented by targets that want to run
299300 /// passes immediately before machine code is emitted. This should return
300301 /// true if -print-machineinstrs should print out the code after the passes.
301 virtual bool addPreEmitPass(PassManagerBase &PM, bool Fast) {
302 virtual bool addPreEmitPass(PassManagerBase &, bool /*Fast*/) {
302303 return false;
303304 }
304305
306307 /// addAssemblyEmitter - This pass should be overridden by the target to add
307308 /// the asmprinter, if asm emission is supported. If this is not supported,
308309 /// 'true' should be returned.
309 virtual bool addAssemblyEmitter(PassManagerBase &PM, bool Fast,
310 std::ostream &Out) {
310 virtual bool addAssemblyEmitter(PassManagerBase &, bool /*Fast*/,
311 std::ostream &) {
311312 return true;
312313 }
313314
314315 /// addCodeEmitter - This pass should be overridden by the target to add a
315316 /// code emitter, if supported. If this is not supported, 'true' should be
316317 /// returned. If DumpAsm is true, the generated assembly is printed to cerr.
317 virtual bool addCodeEmitter(PassManagerBase &PM, bool Fast, bool DumpAsm,
318 MachineCodeEmitter &MCE) {
318 virtual bool addCodeEmitter(PassManagerBase &, bool /*Fast*/,
319 bool /*DumpAsm*/, MachineCodeEmitter &) {
319320 return true;
320321 }
321322
323324 /// a code emitter (without setting flags), if supported. If this is not
324325 /// supported, 'true' should be returned. If DumpAsm is true, the generated
325326 /// assembly is printed to cerr.
326 virtual bool addSimpleCodeEmitter(PassManagerBase &PM, bool Fast,
327 bool DumpAsm, MachineCodeEmitter &MCE) {
327 virtual bool addSimpleCodeEmitter(PassManagerBase &, bool /*Fast*/,
328 bool /*DumpAsm*/, MachineCodeEmitter &) {
328329 return true;
329330 }
330331
292292 static const IntegerType *Int1Ty, *Int8Ty, *Int16Ty, *Int32Ty, *Int64Ty;
293293
294294 /// Methods for support type inquiry through isa, cast, and dyn_cast:
295 static inline bool classof(const Type *T) { return true; }
295 static inline bool classof(const Type *) { return true; }
296296
297297 void addRef() const {
298298 assert(isAbstract() && "Cannot add a reference to a non-abstract type!");
227227 unsigned NumOperands;
228228
229229 void *operator new(size_t s, unsigned Us);
230 User(const Type *Ty, unsigned vty, Use *OpList, unsigned NumOps)
231 : Value(Ty, vty), OperandList(OpList), NumOperands(NumOps) {}
230 User(const Type *ty, unsigned vty, Use *OpList, unsigned NumOps)
231 : Value(ty, vty), OperandList(OpList), NumOperands(NumOps) {}
232232 Use *allocHungoffUses(unsigned) const;
233233 void dropHungoffUses(Use *U) {
234234 if (OperandList == U) {
231231 return OS;
232232 }
233233
234 void Use::init(Value *V, User *user) {
234 void Use::init(Value *V, User *) {
235235 Val = V;
236236 if (V) V->addUse(*this);
237237 }