delete ResourcesModel;
}
- bool isBottomUp() const { return false; }
+ bool isBottomUp() const override { return false; }
- void initNodes(std::vector<SUnit> &sunits);
+ void initNodes(std::vector<SUnit> &sunits) override;
- void addNode(const SUnit *SU) {
+ void addNode(const SUnit *SU) override {
NumNodesSolelyBlocking.resize(SUnits->size(), 0);
}
- void updateNode(const SUnit *SU) {}
+ void updateNode(const SUnit *SU) override {}
- void releaseState() {
+ void releaseState() override {
SUnits = 0;
}
signed regPressureDelta(SUnit *SU, bool RawPressure = false);
signed rawRegPressureDelta (SUnit *SU, unsigned RCId);
- bool empty() const { return Queue.empty(); }
+ bool empty() const override { return Queue.empty(); }
- virtual void push(SUnit *U);
+ void push(SUnit *U) override;
- virtual SUnit *pop();
+ SUnit *pop() override;
- virtual void remove(SUnit *SU);
+ void remove(SUnit *SU) override;
- virtual void dump(ScheduleDAG* DAG) const;
+ void dump(ScheduleDAG* DAG) const override;
/// scheduledNode - Main resource tracking point.
- void scheduledNode(SUnit *Node);
+ void scheduledNode(SUnit *Node) override;
bool isResourceAvailable(SUnit *SU);
void reserveResources(SUnit *SU);
return TM.getTargetLowering();
}
- virtual void getAnalysisUsage(AnalysisUsage &AU) const;
+ void getAnalysisUsage(AnalysisUsage &AU) const override;
- virtual bool runOnMachineFunction(MachineFunction &MF);
+ bool runOnMachineFunction(MachineFunction &MF) override;
virtual void EmitFunctionEntryCode() {}
protected:
/// LexToken - Read the next token and return its code.
- virtual AsmToken LexToken();
+ AsmToken LexToken() override;
public:
AsmLexer(const MCAsmInfo &MAI);
void setBuffer(const MemoryBuffer *buf, const char *ptr = NULL);
- virtual StringRef LexUntilEndOfStatement();
+ StringRef LexUntilEndOfStatement() override;
StringRef LexUntilEndOfLine();
- virtual const AsmToken peekTok(bool ShouldSkipSpace = true);
+ const AsmToken peekTok(bool ShouldSkipSpace = true) override;
bool isAtStartOfComment(char Char);
bool isAtStatementSeparator(const char *Ptr);
public:
APByteStreamer(AsmPrinter &Asm) : AP(Asm) {}
- void EmitInt8(uint8_t Byte, const Twine &Comment) {
+ void EmitInt8(uint8_t Byte, const Twine &Comment) override {
AP.OutStreamer.AddComment(Comment);
AP.EmitInt8(Byte);
}
- void EmitSLEB128(uint64_t DWord, const Twine &Comment) {
+ void EmitSLEB128(uint64_t DWord, const Twine &Comment) override {
AP.OutStreamer.AddComment(Comment);
AP.EmitSLEB128(DWord);
}
- void EmitULEB128(uint64_t DWord, const Twine &Comment) {
+ void EmitULEB128(uint64_t DWord, const Twine &Comment) override {
AP.OutStreamer.AddComment(Comment);
AP.EmitULEB128(DWord);
}
DIEHash &Hash;
public:
HashingByteStreamer(DIEHash &H) : Hash(H) {}
- void EmitInt8(uint8_t Byte, const Twine &Comment) {
+ void EmitInt8(uint8_t Byte, const Twine &Comment) override {
Hash.update(Byte);
}
- void EmitSLEB128(uint64_t DWord, const Twine &Comment) {
+ void EmitSLEB128(uint64_t DWord, const Twine &Comment) override {
Hash.addSLEB128(DWord);
}
- void EmitULEB128(uint64_t DWord, const Twine &Comment) {
+ void EmitULEB128(uint64_t DWord, const Twine &Comment) override {
Hash.addULEB128(DWord);
}
};
/// EmitValue - Emit integer of appropriate size.
///
- virtual void EmitValue(AsmPrinter *AP, dwarf::Form Form) const;
+ void EmitValue(AsmPrinter *AP, dwarf::Form Form) const override;
uint64_t getValue() const { return Integer; }
/// SizeOf - Determine size of integer value in bytes.
///
- virtual unsigned SizeOf(AsmPrinter *AP, dwarf::Form Form) const;
+ unsigned SizeOf(AsmPrinter *AP, dwarf::Form Form) const override;
// Implement isa/cast/dyncast.
static bool classof(const DIEValue *I) { return I->getType() == isInteger; }
#ifndef NDEBUG
- virtual void print(raw_ostream &O) const;
+ void print(raw_ostream &O) const override;
#endif
};
/// EmitValue - Emit expression value.
///
- virtual void EmitValue(AsmPrinter *AP, dwarf::Form Form) const;
+ void EmitValue(AsmPrinter *AP, dwarf::Form Form) const override;
/// getValue - Get MCExpr.
///
/// SizeOf - Determine size of expression value in bytes.
///
- virtual unsigned SizeOf(AsmPrinter *AP, dwarf::Form Form) const;
+ unsigned SizeOf(AsmPrinter *AP, dwarf::Form Form) const override;
// Implement isa/cast/dyncast.
static bool classof(const DIEValue *E) { return E->getType() == isExpr; }
#ifndef NDEBUG
- virtual void print(raw_ostream &O) const;
+ void print(raw_ostream &O) const override;
#endif
};
/// EmitValue - Emit label value.
///
- virtual void EmitValue(AsmPrinter *AP, dwarf::Form Form) const;
+ void EmitValue(AsmPrinter *AP, dwarf::Form Form) const override;
/// getValue - Get MCSymbol.
///
/// SizeOf - Determine size of label value in bytes.
///
- virtual unsigned SizeOf(AsmPrinter *AP, dwarf::Form Form) const;
+ unsigned SizeOf(AsmPrinter *AP, dwarf::Form Form) const override;
// Implement isa/cast/dyncast.
static bool classof(const DIEValue *L) { return L->getType() == isLabel; }
#ifndef NDEBUG
- virtual void print(raw_ostream &O) const;
+ void print(raw_ostream &O) const override;
#endif
};
/// EmitValue - Emit delta value.
///
- virtual void EmitValue(AsmPrinter *AP, dwarf::Form Form) const;
+ void EmitValue(AsmPrinter *AP, dwarf::Form Form) const override;
/// SizeOf - Determine size of delta value in bytes.
///
- virtual unsigned SizeOf(AsmPrinter *AP, dwarf::Form Form) const;
+ unsigned SizeOf(AsmPrinter *AP, dwarf::Form Form) const override;
// Implement isa/cast/dyncast.
static bool classof(const DIEValue *D) { return D->getType() == isDelta; }
#ifndef NDEBUG
- virtual void print(raw_ostream &O) const;
+ void print(raw_ostream &O) const override;
#endif
};
/// EmitValue - Emit delta value.
///
- virtual void EmitValue(AsmPrinter *AP, dwarf::Form Form) const;
+ void EmitValue(AsmPrinter *AP, dwarf::Form Form) const override;
/// SizeOf - Determine size of delta value in bytes.
///
- virtual unsigned SizeOf(AsmPrinter *AP, dwarf::Form Form) const;
+ unsigned SizeOf(AsmPrinter *AP, dwarf::Form Form) const override;
// Implement isa/cast/dyncast.
static bool classof(const DIEValue *D) { return D->getType() == isString; }
#ifndef NDEBUG
- virtual void print(raw_ostream &O) const;
+ void print(raw_ostream &O) const override;
#endif
};
/// EmitValue - Emit debug information entry offset.
///
- virtual void EmitValue(AsmPrinter *AP, dwarf::Form Form) const;
+ void EmitValue(AsmPrinter *AP, dwarf::Form Form) const override;
/// SizeOf - Determine size of debug information entry in bytes.
///
- virtual unsigned SizeOf(AsmPrinter *AP, dwarf::Form Form) const {
+ unsigned SizeOf(AsmPrinter *AP, dwarf::Form Form) const override {
return Form == dwarf::DW_FORM_ref_addr ? getRefAddrSize(AP)
: sizeof(int32_t);
}
static bool classof(const DIEValue *E) { return E->getType() == isEntry; }
#ifndef NDEBUG
- virtual void print(raw_ostream &O) const;
+ void print(raw_ostream &O) const override;
#endif
};
: DIEValue(isTypeSignature), Unit(Unit) {}
/// \brief Emit type unit signature.
- virtual void EmitValue(AsmPrinter *Asm, dwarf::Form Form) const;
+ void EmitValue(AsmPrinter *Asm, dwarf::Form Form) const override;
/// Returns size of a ref_sig8 entry.
- virtual unsigned SizeOf(AsmPrinter *AP, dwarf::Form Form) const {
+ unsigned SizeOf(AsmPrinter *AP, dwarf::Form Form) const override {
assert(Form == dwarf::DW_FORM_ref_sig8);
return 8;
}
return E->getType() == isTypeSignature;
}
#ifndef NDEBUG
- virtual void print(raw_ostream &O) const;
+ void print(raw_ostream &O) const override;
void dump() const;
#endif
};
/// EmitValue - Emit location data.
///
- virtual void EmitValue(AsmPrinter *AP, dwarf::Form Form) const;
+ void EmitValue(AsmPrinter *AP, dwarf::Form Form) const override;
/// SizeOf - Determine size of location data in bytes.
///
- virtual unsigned SizeOf(AsmPrinter *AP, dwarf::Form Form) const;
+ unsigned SizeOf(AsmPrinter *AP, dwarf::Form Form) const override;
// Implement isa/cast/dyncast.
static bool classof(const DIEValue *E) { return E->getType() == isLoc; }
#ifndef NDEBUG
- virtual void print(raw_ostream &O) const;
+ void print(raw_ostream &O) const override;
#endif
};
/// EmitValue - Emit location data.
///
- virtual void EmitValue(AsmPrinter *AP, dwarf::Form Form) const;
+ void EmitValue(AsmPrinter *AP, dwarf::Form Form) const override;
/// SizeOf - Determine size of location data in bytes.
///
- virtual unsigned SizeOf(AsmPrinter *AP, dwarf::Form Form) const;
+ unsigned SizeOf(AsmPrinter *AP, dwarf::Form Form) const override;
// Implement isa/cast/dyncast.
static bool classof(const DIEValue *E) { return E->getType() == isBlock; }
#ifndef NDEBUG
- virtual void print(raw_ostream &O) const;
+ void print(raw_ostream &O) const override;
#endif
};
/// EmitValue - Emit location data.
///
- virtual void EmitValue(AsmPrinter *AP, dwarf::Form Form) const;
+ void EmitValue(AsmPrinter *AP, dwarf::Form Form) const override;
/// SizeOf - Determine size of location data in bytes.
///
- virtual unsigned SizeOf(AsmPrinter *AP, dwarf::Form Form) const;
+ unsigned SizeOf(AsmPrinter *AP, dwarf::Form Form) const override;
// Implement isa/cast/dyncast.
static bool classof(const DIEValue *E) { return E->getType() == isLocList; }
#ifndef NDEBUG
- virtual void print(raw_ostream &O) const;
+ void print(raw_ostream &O) const override;
#endif
};
void beginModule();
/// \brief Emit all Dwarf sections that should come after the content.
- void endModule();
+ void endModule() override;
/// \brief Gather pre-function debug information.
- void beginFunction(const MachineFunction *MF);
+ void beginFunction(const MachineFunction *MF) override;
/// \brief Gather and emit post-function debug information.
- void endFunction(const MachineFunction *MF);
+ void endFunction(const MachineFunction *MF) override;
/// \brief Process beginning of an instruction.
- void beginInstruction(const MachineInstr *MI);
+ void beginInstruction(const MachineInstr *MI) override;
/// \brief Process end of an instruction.
- void endInstruction();
+ void endInstruction() override;
/// \brief Add a DIE to the set of types that we're going to pull into
/// type units.
/// \brief For symbols that have a size designated (e.g. common symbols),
/// this tracks that size.
- void setSymbolSize(const MCSymbol *Sym, uint64_t Size) {
+ void setSymbolSize(const MCSymbol *Sym, uint64_t Size) override {
SymSize[Sym] = Size;
}
/// endModule - Emit all exception information that should come after the
/// content.
- virtual void endModule();
+ void endModule() override;
/// beginFunction - Gather pre-function exception information. Assumes being
/// emitted immediately after the function entry point.
- virtual void beginFunction(const MachineFunction *MF);
+ void beginFunction(const MachineFunction *MF) override;
/// endFunction - Gather and emit post-function exception information.
- virtual void endFunction(const MachineFunction *);
+ void endFunction(const MachineFunction *) override;
// We don't need these.
- virtual void setSymbolSize(const MCSymbol *Sym, uint64_t Size) {}
- virtual void beginInstruction(const MachineInstr *MI) {}
- virtual void endInstruction() {}
+ void setSymbolSize(const MCSymbol *Sym, uint64_t Size) override {}
+ void beginInstruction(const MachineInstr *MI) override {}
+ void endInstruction() override {}
};
class DwarfCFIException : public DwarfException {
/// endModule - Emit all exception information that should come after the
/// content.
- virtual void endModule();
+ void endModule() override;
/// beginFunction - Gather pre-function exception information. Assumes being
/// emitted immediately after the function entry point.
- virtual void beginFunction(const MachineFunction *MF);
+ void beginFunction(const MachineFunction *MF) override;
/// endFunction - Gather and emit post-function exception information.
- virtual void endFunction(const MachineFunction *);
+ void endFunction(const MachineFunction *) override;
};
class ARMException : public DwarfException {
- void EmitTypeInfos(unsigned TTypeEncoding);
+ void EmitTypeInfos(unsigned TTypeEncoding) override;
ARMTargetStreamer &getTargetStreamer();
/// shouldEmitCFI - Per-function flag to indicate if frame CFI info
/// endModule - Emit all exception information that should come after the
/// content.
- virtual void endModule();
+ void endModule() override;
/// beginFunction - Gather pre-function exception information. Assumes being
/// emitted immediately after the function entry point.
- virtual void beginFunction(const MachineFunction *MF);
+ void beginFunction(const MachineFunction *MF) override;
/// endFunction - Gather and emit post-function exception information.
- virtual void endFunction(const MachineFunction *);
+ void endFunction(const MachineFunction *) override;
};
class Win64Exception : public DwarfException {
/// endModule - Emit all exception information that should come after the
/// content.
- virtual void endModule();
+ void endModule() override;
/// beginFunction - Gather pre-function exception information. Assumes being
/// emitted immediately after the function entry point.
- virtual void beginFunction(const MachineFunction *MF);
+ void beginFunction(const MachineFunction *MF) override;
/// endFunction - Gather and emit post-function exception information.
- virtual void endFunction(const MachineFunction *);
+ void endFunction(const MachineFunction *) override;
};
} // End of namespace llvm
class ErlangGCPrinter : public GCMetadataPrinter {
public:
- void beginAssembly(AsmPrinter &AP);
- void finishAssembly(AsmPrinter &AP);
+ void beginAssembly(AsmPrinter &AP) override;
+ void finishAssembly(AsmPrinter &AP) override;
};
}
class OcamlGCMetadataPrinter : public GCMetadataPrinter {
public:
- void beginAssembly(AsmPrinter &AP);
- void finishAssembly(AsmPrinter &AP);
+ void beginAssembly(AsmPrinter &AP) override;
+ void finishAssembly(AsmPrinter &AP) override;
};
}
free(I->second);
}
- virtual void setSymbolSize(const llvm::MCSymbol *, uint64_t) {}
+ void setSymbolSize(const llvm::MCSymbol *, uint64_t) override {}
/// \brief Emit the COFF section that holds the line table information.
- virtual void endModule();
+ void endModule() override;
/// \brief Gather pre-function debug information.
- virtual void beginFunction(const MachineFunction *MF);
+ void beginFunction(const MachineFunction *MF) override;
/// \brief Gather post-function debug information.
- virtual void endFunction(const MachineFunction *);
+ void endFunction(const MachineFunction *) override;
/// \brief Process beginning of an instruction.
- virtual void beginInstruction(const MachineInstr *MI);
+ void beginInstruction(const MachineInstr *MI) override;
/// \brief Process end of an instruction.
- virtual void endInstruction() {}
+ void endInstruction() override {}
};
} // End of namespace llvm
explicit WorkListRemover(DAGCombiner &dc)
: SelectionDAG::DAGUpdateListener(dc.getDAG()), DC(dc) {}
- virtual void NodeDeleted(SDNode *N, SDNode *E) {
+ void NodeDeleted(SDNode *N, SDNode *E) override {
DC.removeFromWorkList(N);
}
};
public:
// DAGUpdateListener implementation.
- virtual void NodeDeleted(SDNode *N, SDNode *E) {
+ void NodeDeleted(SDNode *N, SDNode *E) override {
ForgetNode(N);
}
- virtual void NodeUpdated(SDNode *N) {}
+ void NodeUpdated(SDNode *N) override {}
// Node replacement helpers
void ReplacedNode(SDNode *N) {
: SelectionDAG::DAGUpdateListener(dtl.getDAG()),
DTL(dtl), NodesToAnalyze(nta) {}
- virtual void NodeDeleted(SDNode *N, SDNode *E) {
+ void NodeDeleted(SDNode *N, SDNode *E) override {
assert(N->getNodeId() != DAGTypeLegalizer::ReadyToProcess &&
N->getNodeId() != DAGTypeLegalizer::Processed &&
"Invalid node ID for RAUW deletion!");
NodesToAnalyze.insert(E);
}
- virtual void NodeUpdated(SDNode *N) {
+ void NodeUpdated(SDNode *N) override {
// Node updates can mean pretty much anything. It is possible that an
// operand was set to something already processed (f.e.) in which case
// this node could become ready. Recompute its flags.
ScheduleDAGFast(MachineFunction &mf)
: ScheduleDAGSDNodes(mf) {}
- void Schedule();
+ void Schedule() override;
/// AddPred - adds a predecessor edge to SUnit SU.
/// This returns true if this is a new predecessor.
void ListScheduleBottomUp();
/// forceUnitLatencies - The fast scheduler doesn't care about real latencies.
- bool forceUnitLatencies() const { return true; }
+ bool forceUnitLatencies() const override { return true; }
};
} // end anonymous namespace
public:
ScheduleDAGLinearize(MachineFunction &mf) : ScheduleDAGSDNodes(mf) {}
- void Schedule();
+ void Schedule() override;
- MachineBasicBlock *EmitSchedule(MachineBasicBlock::iterator &InsertPos);
+ MachineBasicBlock *
+ EmitSchedule(MachineBasicBlock::iterator &InsertPos) override;
private:
std::vector<SDNode*> Sequence;
delete AvailableQueue;
}
- void Schedule();
+ void Schedule() override;
ScheduleHazardRecognizer *getHazardRec() { return HazardRec; }
/// forceUnitLatencies - Register-pressure-reducing scheduling doesn't
/// need actual latency information but the hybrid scheduler does.
- bool forceUnitLatencies() const {
+ bool forceUnitLatencies() const override {
return !NeedLatency;
}
};
return scheduleDAG->getHazardRec();
}
- void initNodes(std::vector<SUnit> &sunits);
+ void initNodes(std::vector<SUnit> &sunits) override;
- void addNode(const SUnit *SU);
+ void addNode(const SUnit *SU) override;
- void updateNode(const SUnit *SU);
+ void updateNode(const SUnit *SU) override;
- void releaseState() {
+ void releaseState() override {
SUnits = 0;
SethiUllmanNumbers.clear();
std::fill(RegPressure.begin(), RegPressure.end(), 0);
return SU->getNode()->getIROrder();
}
- bool empty() const { return Queue.empty(); }
+ bool empty() const override { return Queue.empty(); }
- void push(SUnit *U) {
+ void push(SUnit *U) override {
assert(!U->NodeQueueId && "Node in the queue already");
U->NodeQueueId = ++CurQueueId;
Queue.push_back(U);
}
- void remove(SUnit *SU) {
+ void remove(SUnit *SU) override {
assert(!Queue.empty() && "Queue is empty!");
assert(SU->NodeQueueId != 0 && "Not in queue!");
std::vector<SUnit *>::iterator I = std::find(Queue.begin(), Queue.end(),
SU->NodeQueueId = 0;
}
- bool tracksRegPressure() const { return TracksRegPressure; }
+ bool tracksRegPressure() const override { return TracksRegPressure; }
void dumpRegPressure() const;
int RegPressureDiff(SUnit *SU, unsigned &LiveUses) const;
- void scheduledNode(SUnit *SU);
+ void scheduledNode(SUnit *SU) override;
- void unscheduledNode(SUnit *SU);
+ void unscheduledNode(SUnit *SU) override;
protected:
bool canClobber(const SUnit *SU, const SUnit *Op);
tii, tri, tli),
Picker(this) {}
- bool isBottomUp() const { return SF::IsBottomUp; }
+ bool isBottomUp() const override { return SF::IsBottomUp; }
- bool isReady(SUnit *U) const {
+ bool isReady(SUnit *U) const override {
return Picker.HasReadyFilter && Picker.isReady(U, getCurCycle());
}
- SUnit *pop() {
+ SUnit *pop() override {
if (Queue.empty()) return NULL;
SUnit *V = popFromQueue(Queue, Picker, scheduleDAG);
virtual MachineBasicBlock*
EmitSchedule(MachineBasicBlock::iterator &InsertPos);
- virtual void dumpNode(const SUnit *SU) const;
+ void dumpNode(const SUnit *SU) const override;
void dumpSchedule() const;
- virtual std::string getGraphNodeLabel(const SUnit *SU) const;
+ std::string getGraphNodeLabel(const SUnit *SU) const override;
- virtual std::string getDAGName() const;
+ std::string getDAGName() const override;
virtual void getCustomGraphFeatures(GraphWriter<ScheduleDAG*> &GW) const;
delete AvailableQueue;
}
- void Schedule();
+ void Schedule() override;
private:
void releaseSucc(SUnit *SU, const SDep &D);
SDNode::use_iterator &UI;
SDNode::use_iterator &UE;
- virtual void NodeDeleted(SDNode *N, SDNode *E) {
+ void NodeDeleted(SDNode *N, SDNode *E) override {
// Increment the iterator as needed.
while (UI != UE && N == *UI)
++UI;
/// NodeDeleted - Handle nodes deleted from the graph. If the node being
/// deleted is the current ISelPosition node, update ISelPosition.
///
- virtual void NodeDeleted(SDNode *N, SDNode *E) {
+ void NodeDeleted(SDNode *N, SDNode *E) override {
if (ISelPosition == SelectionDAG::allnodes_iterator(N))
++ISelPosition;
}