Commit b56c8f42 by Jim Stichnoth

Subzero: Use 'override' as appropriate for C++11.

Not necessary for the LLVM 3.5 merge, but nice to have anyway. BUG= https://code.google.com/p/nativeclient/issues/detail?id=3930 R=jfb@chromium.org, jvoung@chromium.org Review URL: https://codereview.chromium.org/605123002
parent 5081c21b
...@@ -470,11 +470,12 @@ void CfgNode::emit(Cfg *Func) const { ...@@ -470,11 +470,12 @@ void CfgNode::emit(Cfg *Func) const {
} }
Str << getAsmName() << ":\n"; Str << getAsmName() << ":\n";
for (PhiList::const_iterator I = Phis.begin(), E = Phis.end(); I != E; ++I) { for (PhiList::const_iterator I = Phis.begin(), E = Phis.end(); I != E; ++I) {
InstPhi *Inst = *I; InstPhi *Phi = *I;
if (Inst->isDeleted()) if (Phi->isDeleted())
continue; continue;
// Emitting a Phi instruction should cause an error. // Emitting a Phi instruction should cause an error.
Inst->emit(Func); Inst *Instr = Phi;
Instr->emit(Func);
} }
for (InstList::const_iterator I = Insts.begin(), E = Insts.end(); I != E; for (InstList::const_iterator I = Insts.begin(), E = Insts.end(); I != E;
++I) { ++I) {
......
...@@ -196,7 +196,7 @@ void Inst::liveness(InstNumberT InstNumber, llvm::BitVector &Live, ...@@ -196,7 +196,7 @@ void Inst::liveness(InstNumberT InstNumber, llvm::BitVector &Live,
InstAlloca::InstAlloca(Cfg *Func, Operand *ByteCount, uint32_t AlignInBytes, InstAlloca::InstAlloca(Cfg *Func, Operand *ByteCount, uint32_t AlignInBytes,
Variable *Dest) Variable *Dest)
: Inst(Func, Inst::Alloca, 1, Dest), AlignInBytes(AlignInBytes) { : InstHighLevel(Func, Inst::Alloca, 1, Dest), AlignInBytes(AlignInBytes) {
// Verify AlignInBytes is 0 or a power of 2. // Verify AlignInBytes is 0 or a power of 2.
assert(AlignInBytes == 0 || llvm::isPowerOf2_32(AlignInBytes)); assert(AlignInBytes == 0 || llvm::isPowerOf2_32(AlignInBytes));
addSource(ByteCount); addSource(ByteCount);
...@@ -204,7 +204,7 @@ InstAlloca::InstAlloca(Cfg *Func, Operand *ByteCount, uint32_t AlignInBytes, ...@@ -204,7 +204,7 @@ InstAlloca::InstAlloca(Cfg *Func, Operand *ByteCount, uint32_t AlignInBytes,
InstArithmetic::InstArithmetic(Cfg *Func, OpKind Op, Variable *Dest, InstArithmetic::InstArithmetic(Cfg *Func, OpKind Op, Variable *Dest,
Operand *Source1, Operand *Source2) Operand *Source1, Operand *Source2)
: Inst(Func, Inst::Arithmetic, 2, Dest), Op(Op) { : InstHighLevel(Func, Inst::Arithmetic, 2, Dest), Op(Op) {
addSource(Source1); addSource(Source1);
addSource(Source2); addSource(Source2);
} }
...@@ -221,7 +221,7 @@ bool InstArithmetic::isCommutative() const { ...@@ -221,7 +221,7 @@ bool InstArithmetic::isCommutative() const {
} }
InstAssign::InstAssign(Cfg *Func, Variable *Dest, Operand *Source) InstAssign::InstAssign(Cfg *Func, Variable *Dest, Operand *Source)
: Inst(Func, Inst::Assign, 1, Dest) { : InstHighLevel(Func, Inst::Assign, 1, Dest) {
addSource(Source); addSource(Source);
} }
...@@ -230,7 +230,7 @@ InstAssign::InstAssign(Cfg *Func, Variable *Dest, Operand *Source) ...@@ -230,7 +230,7 @@ InstAssign::InstAssign(Cfg *Func, Variable *Dest, Operand *Source)
// semantics, there is at most one edge from one node to another. // semantics, there is at most one edge from one node to another.
InstBr::InstBr(Cfg *Func, Operand *Source, CfgNode *TargetTrue, InstBr::InstBr(Cfg *Func, Operand *Source, CfgNode *TargetTrue,
CfgNode *TargetFalse) CfgNode *TargetFalse)
: Inst(Func, Inst::Br, 1, NULL), TargetFalse(TargetFalse), : InstHighLevel(Func, Inst::Br, 1, NULL), TargetFalse(TargetFalse),
TargetTrue(TargetTrue) { TargetTrue(TargetTrue) {
if (TargetTrue == TargetFalse) { if (TargetTrue == TargetFalse) {
TargetTrue = NULL; // turn into unconditional version TargetTrue = NULL; // turn into unconditional version
...@@ -240,7 +240,8 @@ InstBr::InstBr(Cfg *Func, Operand *Source, CfgNode *TargetTrue, ...@@ -240,7 +240,8 @@ InstBr::InstBr(Cfg *Func, Operand *Source, CfgNode *TargetTrue,
} }
InstBr::InstBr(Cfg *Func, CfgNode *Target) InstBr::InstBr(Cfg *Func, CfgNode *Target)
: Inst(Func, Inst::Br, 0, NULL), TargetFalse(Target), TargetTrue(NULL) {} : InstHighLevel(Func, Inst::Br, 0, NULL), TargetFalse(Target),
TargetTrue(NULL) {}
NodeList InstBr::getTerminatorEdges() const { NodeList InstBr::getTerminatorEdges() const {
NodeList OutEdges; NodeList OutEdges;
...@@ -251,27 +252,27 @@ NodeList InstBr::getTerminatorEdges() const { ...@@ -251,27 +252,27 @@ NodeList InstBr::getTerminatorEdges() const {
} }
InstCast::InstCast(Cfg *Func, OpKind CastKind, Variable *Dest, Operand *Source) InstCast::InstCast(Cfg *Func, OpKind CastKind, Variable *Dest, Operand *Source)
: Inst(Func, Inst::Cast, 1, Dest), CastKind(CastKind) { : InstHighLevel(Func, Inst::Cast, 1, Dest), CastKind(CastKind) {
addSource(Source); addSource(Source);
} }
InstExtractElement::InstExtractElement(Cfg *Func, Variable *Dest, InstExtractElement::InstExtractElement(Cfg *Func, Variable *Dest,
Operand *Source1, Operand *Source2) Operand *Source1, Operand *Source2)
: Inst(Func, Inst::ExtractElement, 2, Dest) { : InstHighLevel(Func, Inst::ExtractElement, 2, Dest) {
addSource(Source1); addSource(Source1);
addSource(Source2); addSource(Source2);
} }
InstFcmp::InstFcmp(Cfg *Func, FCond Condition, Variable *Dest, Operand *Source1, InstFcmp::InstFcmp(Cfg *Func, FCond Condition, Variable *Dest, Operand *Source1,
Operand *Source2) Operand *Source2)
: Inst(Func, Inst::Fcmp, 2, Dest), Condition(Condition) { : InstHighLevel(Func, Inst::Fcmp, 2, Dest), Condition(Condition) {
addSource(Source1); addSource(Source1);
addSource(Source2); addSource(Source2);
} }
InstIcmp::InstIcmp(Cfg *Func, ICond Condition, Variable *Dest, Operand *Source1, InstIcmp::InstIcmp(Cfg *Func, ICond Condition, Variable *Dest, Operand *Source1,
Operand *Source2) Operand *Source2)
: Inst(Func, Inst::Icmp, 2, Dest), Condition(Condition) { : InstHighLevel(Func, Inst::Icmp, 2, Dest), Condition(Condition) {
addSource(Source1); addSource(Source1);
addSource(Source2); addSource(Source2);
} }
...@@ -279,19 +280,19 @@ InstIcmp::InstIcmp(Cfg *Func, ICond Condition, Variable *Dest, Operand *Source1, ...@@ -279,19 +280,19 @@ InstIcmp::InstIcmp(Cfg *Func, ICond Condition, Variable *Dest, Operand *Source1,
InstInsertElement::InstInsertElement(Cfg *Func, Variable *Dest, InstInsertElement::InstInsertElement(Cfg *Func, Variable *Dest,
Operand *Source1, Operand *Source2, Operand *Source1, Operand *Source2,
Operand *Source3) Operand *Source3)
: Inst(Func, Inst::InsertElement, 3, Dest) { : InstHighLevel(Func, Inst::InsertElement, 3, Dest) {
addSource(Source1); addSource(Source1);
addSource(Source2); addSource(Source2);
addSource(Source3); addSource(Source3);
} }
InstLoad::InstLoad(Cfg *Func, Variable *Dest, Operand *SourceAddr) InstLoad::InstLoad(Cfg *Func, Variable *Dest, Operand *SourceAddr)
: Inst(Func, Inst::Load, 1, Dest) { : InstHighLevel(Func, Inst::Load, 1, Dest) {
addSource(SourceAddr); addSource(SourceAddr);
} }
InstPhi::InstPhi(Cfg *Func, SizeT MaxSrcs, Variable *Dest) InstPhi::InstPhi(Cfg *Func, SizeT MaxSrcs, Variable *Dest)
: Inst(Func, Phi, MaxSrcs, Dest) { : InstHighLevel(Func, Phi, MaxSrcs, Dest) {
Labels = Func->allocateArrayOf<CfgNode *>(MaxSrcs); Labels = Func->allocateArrayOf<CfgNode *>(MaxSrcs);
} }
...@@ -350,14 +351,14 @@ Inst *InstPhi::lower(Cfg *Func) { ...@@ -350,14 +351,14 @@ Inst *InstPhi::lower(Cfg *Func) {
} }
InstRet::InstRet(Cfg *Func, Operand *RetValue) InstRet::InstRet(Cfg *Func, Operand *RetValue)
: Inst(Func, Ret, RetValue ? 1 : 0, NULL) { : InstHighLevel(Func, Ret, RetValue ? 1 : 0, NULL) {
if (RetValue) if (RetValue)
addSource(RetValue); addSource(RetValue);
} }
InstSelect::InstSelect(Cfg *Func, Variable *Dest, Operand *Condition, InstSelect::InstSelect(Cfg *Func, Variable *Dest, Operand *Condition,
Operand *SourceTrue, Operand *SourceFalse) Operand *SourceTrue, Operand *SourceFalse)
: Inst(Func, Inst::Select, 3, Dest) { : InstHighLevel(Func, Inst::Select, 3, Dest) {
assert(typeElementType(Condition->getType()) == IceType_i1); assert(typeElementType(Condition->getType()) == IceType_i1);
addSource(Condition); addSource(Condition);
addSource(SourceTrue); addSource(SourceTrue);
...@@ -365,14 +366,14 @@ InstSelect::InstSelect(Cfg *Func, Variable *Dest, Operand *Condition, ...@@ -365,14 +366,14 @@ InstSelect::InstSelect(Cfg *Func, Variable *Dest, Operand *Condition,
} }
InstStore::InstStore(Cfg *Func, Operand *Data, Operand *Addr) InstStore::InstStore(Cfg *Func, Operand *Data, Operand *Addr)
: Inst(Func, Inst::Store, 2, NULL) { : InstHighLevel(Func, Inst::Store, 2, NULL) {
addSource(Data); addSource(Data);
addSource(Addr); addSource(Addr);
} }
InstSwitch::InstSwitch(Cfg *Func, SizeT NumCases, Operand *Source, InstSwitch::InstSwitch(Cfg *Func, SizeT NumCases, Operand *Source,
CfgNode *LabelDefault) CfgNode *LabelDefault)
: Inst(Func, Inst::Switch, 1, NULL), LabelDefault(LabelDefault), : InstHighLevel(Func, Inst::Switch, 1, NULL), LabelDefault(LabelDefault),
NumCases(NumCases) { NumCases(NumCases) {
addSource(Source); addSource(Source);
Values = Func->allocateArrayOf<uint64_t>(NumCases); Values = Func->allocateArrayOf<uint64_t>(NumCases);
...@@ -400,24 +401,25 @@ NodeList InstSwitch::getTerminatorEdges() const { ...@@ -400,24 +401,25 @@ NodeList InstSwitch::getTerminatorEdges() const {
} }
InstUnreachable::InstUnreachable(Cfg *Func) InstUnreachable::InstUnreachable(Cfg *Func)
: Inst(Func, Inst::Unreachable, 0, NULL) {} : InstHighLevel(Func, Inst::Unreachable, 0, NULL) {}
InstFakeDef::InstFakeDef(Cfg *Func, Variable *Dest, Variable *Src) InstFakeDef::InstFakeDef(Cfg *Func, Variable *Dest, Variable *Src)
: Inst(Func, Inst::FakeDef, Src ? 1 : 0, Dest) { : InstHighLevel(Func, Inst::FakeDef, Src ? 1 : 0, Dest) {
assert(Dest); assert(Dest);
if (Src) if (Src)
addSource(Src); addSource(Src);
} }
InstFakeUse::InstFakeUse(Cfg *Func, Variable *Src) InstFakeUse::InstFakeUse(Cfg *Func, Variable *Src)
: Inst(Func, Inst::FakeUse, 1, NULL) { : InstHighLevel(Func, Inst::FakeUse, 1, NULL) {
assert(Src); assert(Src);
addSource(Src); addSource(Src);
} }
InstFakeKill::InstFakeKill(Cfg *Func, const VarList &KilledRegs, InstFakeKill::InstFakeKill(Cfg *Func, const VarList &KilledRegs,
const Inst *Linked) const Inst *Linked)
: Inst(Func, Inst::FakeKill, KilledRegs.size(), NULL), Linked(Linked) { : InstHighLevel(Func, Inst::FakeKill, KilledRegs.size(), NULL),
Linked(Linked) {
for (VarList::const_iterator I = KilledRegs.begin(), E = KilledRegs.end(); for (VarList::const_iterator I = KilledRegs.begin(), E = KilledRegs.end();
I != E; ++I) { I != E; ++I) {
Variable *Var = *I; Variable *Var = *I;
...@@ -449,12 +451,6 @@ void Inst::dumpDecorated(const Cfg *Func) const { ...@@ -449,12 +451,6 @@ void Inst::dumpDecorated(const Cfg *Func) const {
Str << "\n"; Str << "\n";
} }
void Inst::emit(const Cfg * /*Func*/) const {
llvm_unreachable("emit() called on a non-lowered instruction");
}
void Inst::emitIAS(const Cfg *Func) const { emit(Func); }
void Inst::dump(const Cfg *Func) const { void Inst::dump(const Cfg *Func) const {
Ostream &Str = Func->getContext()->getStrDump(); Ostream &Str = Func->getContext()->getStrDump();
dumpDest(Func); dumpDest(Func);
...@@ -754,6 +750,4 @@ void InstTarget::dump(const Cfg *Func) const { ...@@ -754,6 +750,4 @@ void InstTarget::dump(const Cfg *Func) const {
Inst::dump(Func); Inst::dump(Func);
} }
void InstTarget::dumpExtras(const Cfg *Func) const { Inst::dumpExtras(Func); }
} // end of namespace Ice } // end of namespace Ice
...@@ -102,9 +102,9 @@ class Constant : public Operand { ...@@ -102,9 +102,9 @@ class Constant : public Operand {
public: public:
uint32_t getPoolEntryID() const { return PoolEntryID; } uint32_t getPoolEntryID() const { return PoolEntryID; }
using Operand::dump; using Operand::dump;
virtual void emit(const Cfg *Func) const { emit(Func->getContext()); } void emit(const Cfg *Func) const override { emit(Func->getContext()); }
virtual void emit(GlobalContext *Ctx) const = 0; virtual void emit(GlobalContext *Ctx) const = 0;
virtual void dump(const Cfg *Func, Ostream &Str) const = 0; void dump(const Cfg *Func, Ostream &Str) const = 0;
static bool classof(const Operand *Operand) { static bool classof(const Operand *Operand) {
OperandKind Kind = Operand->getKind(); OperandKind Kind = Operand->getKind();
...@@ -117,7 +117,7 @@ protected: ...@@ -117,7 +117,7 @@ protected:
Vars = NULL; Vars = NULL;
NumVars = 0; NumVars = 0;
} }
virtual ~Constant() {} ~Constant() override {}
// PoolEntryID is an integer that uniquely identifies the constant // PoolEntryID is an integer that uniquely identifies the constant
// within its constant pool. It is used for building the constant // within its constant pool. It is used for building the constant
// pool in the object code and for referencing its entries. // pool in the object code and for referencing its entries.
...@@ -141,9 +141,9 @@ public: ...@@ -141,9 +141,9 @@ public:
using Constant::emit; using Constant::emit;
// The target needs to implement this for each ConstantPrimitive // The target needs to implement this for each ConstantPrimitive
// specialization. // specialization.
virtual void emit(GlobalContext *Ctx) const; void emit(GlobalContext *Ctx) const override;
using Constant::dump; using Constant::dump;
virtual void dump(const Cfg *, Ostream &Str) const { Str << getValue(); } void dump(const Cfg *, Ostream &Str) const override { Str << getValue(); }
static bool classof(const Operand *Operand) { static bool classof(const Operand *Operand) {
return Operand->getKind() == K; return Operand->getKind() == K;
...@@ -154,7 +154,7 @@ private: ...@@ -154,7 +154,7 @@ private:
: Constant(K, Ty, PoolEntryID), Value(Value) {} : Constant(K, Ty, PoolEntryID), Value(Value) {}
ConstantPrimitive(const ConstantPrimitive &) LLVM_DELETED_FUNCTION; ConstantPrimitive(const ConstantPrimitive &) LLVM_DELETED_FUNCTION;
ConstantPrimitive &operator=(const ConstantPrimitive &) LLVM_DELETED_FUNCTION; ConstantPrimitive &operator=(const ConstantPrimitive &) LLVM_DELETED_FUNCTION;
virtual ~ConstantPrimitive() {} ~ConstantPrimitive() override {}
const T Value; const T Value;
}; };
...@@ -213,8 +213,8 @@ public: ...@@ -213,8 +213,8 @@ public:
bool getSuppressMangling() const { return SuppressMangling; } bool getSuppressMangling() const { return SuppressMangling; }
using Constant::emit; using Constant::emit;
using Constant::dump; using Constant::dump;
virtual void emit(GlobalContext *Ctx) const; void emit(GlobalContext *Ctx) const override;
virtual void dump(const Cfg *Func, Ostream &Str) const; void dump(const Cfg *Func, Ostream &Str) const override;
static bool classof(const Operand *Operand) { static bool classof(const Operand *Operand) {
OperandKind Kind = Operand->getKind(); OperandKind Kind = Operand->getKind();
...@@ -229,7 +229,7 @@ private: ...@@ -229,7 +229,7 @@ private:
ConstantRelocatable(const ConstantRelocatable &) LLVM_DELETED_FUNCTION; ConstantRelocatable(const ConstantRelocatable &) LLVM_DELETED_FUNCTION;
ConstantRelocatable & ConstantRelocatable &
operator=(const ConstantRelocatable &) LLVM_DELETED_FUNCTION; operator=(const ConstantRelocatable &) LLVM_DELETED_FUNCTION;
virtual ~ConstantRelocatable() {} ~ConstantRelocatable() override {}
const int64_t Offset; // fixed offset to add const int64_t Offset; // fixed offset to add
const IceString Name; // optional for debug/dump const IceString Name; // optional for debug/dump
bool SuppressMangling; bool SuppressMangling;
...@@ -248,8 +248,8 @@ public: ...@@ -248,8 +248,8 @@ public:
using Constant::emit; using Constant::emit;
using Constant::dump; using Constant::dump;
// The target needs to implement this. // The target needs to implement this.
virtual void emit(GlobalContext *Ctx) const; void emit(GlobalContext *Ctx) const override;
virtual void dump(const Cfg *, Ostream &Str) const { Str << "undef"; } void dump(const Cfg *, Ostream &Str) const override { Str << "undef"; }
static bool classof(const Operand *Operand) { static bool classof(const Operand *Operand) {
return Operand->getKind() == kConstUndef; return Operand->getKind() == kConstUndef;
...@@ -260,7 +260,7 @@ private: ...@@ -260,7 +260,7 @@ private:
: Constant(kConstUndef, Ty, PoolEntryID) {} : Constant(kConstUndef, Ty, PoolEntryID) {}
ConstantUndef(const ConstantUndef &) LLVM_DELETED_FUNCTION; ConstantUndef(const ConstantUndef &) LLVM_DELETED_FUNCTION;
ConstantUndef &operator=(const ConstantUndef &) LLVM_DELETED_FUNCTION; ConstantUndef &operator=(const ConstantUndef &) LLVM_DELETED_FUNCTION;
virtual ~ConstantUndef() {} ~ConstantUndef() override {}
}; };
// RegWeight is a wrapper for a uint32_t weight value, with a // RegWeight is a wrapper for a uint32_t weight value, with a
...@@ -415,9 +415,9 @@ public: ...@@ -415,9 +415,9 @@ public:
// VarsReal. // VarsReal.
Variable asType(Type Ty); Variable asType(Type Ty);
virtual void emit(const Cfg *Func) const; void emit(const Cfg *Func) const override;
using Operand::dump; using Operand::dump;
virtual void dump(const Cfg *Func, Ostream &Str) const; void dump(const Cfg *Func, Ostream &Str) const override;
static bool classof(const Operand *Operand) { static bool classof(const Operand *Operand) {
OperandKind Kind = Operand->getKind(); OperandKind Kind = Operand->getKind();
...@@ -425,7 +425,7 @@ public: ...@@ -425,7 +425,7 @@ public:
} }
// The destructor is public because of the asType() method. // The destructor is public because of the asType() method.
virtual ~Variable() {} ~Variable() override {}
protected: protected:
Variable(OperandKind K, Type Ty, SizeT Index, const IceString &Name) Variable(OperandKind K, Type Ty, SizeT Index, const IceString &Name)
......
...@@ -28,36 +28,36 @@ class TargetX8632 : public TargetLowering { ...@@ -28,36 +28,36 @@ class TargetX8632 : public TargetLowering {
public: public:
static TargetX8632 *create(Cfg *Func) { return new TargetX8632(Func); } static TargetX8632 *create(Cfg *Func) { return new TargetX8632(Func); }
virtual void translateOm1(); void translateOm1() override;
virtual void translateO2(); void translateO2() override;
virtual bool doBranchOpt(Inst *I, const CfgNode *NextNode); bool doBranchOpt(Inst *I, const CfgNode *NextNode) override;
virtual Variable *getPhysicalRegister(SizeT RegNum); Variable *getPhysicalRegister(SizeT RegNum) override;
virtual IceString getRegName(SizeT RegNum, Type Ty) const; IceString getRegName(SizeT RegNum, Type Ty) const override;
virtual llvm::SmallBitVector getRegisterSet(RegSetMask Include, llvm::SmallBitVector getRegisterSet(RegSetMask Include,
RegSetMask Exclude) const; RegSetMask Exclude) const override;
virtual const llvm::SmallBitVector &getRegisterSetForType(Type Ty) const { const llvm::SmallBitVector &getRegisterSetForType(Type Ty) const override {
return TypeToRegisterSet[Ty]; return TypeToRegisterSet[Ty];
} }
virtual bool hasFramePointer() const { return IsEbpBasedFrame; } bool hasFramePointer() const override { return IsEbpBasedFrame; }
virtual SizeT getFrameOrStackReg() const { SizeT getFrameOrStackReg() const override {
return IsEbpBasedFrame ? RegX8632::Reg_ebp : RegX8632::Reg_esp; return IsEbpBasedFrame ? RegX8632::Reg_ebp : RegX8632::Reg_esp;
} }
virtual size_t typeWidthInBytesOnStack(Type Ty) const { size_t typeWidthInBytesOnStack(Type Ty) const override {
// Round up to the next multiple of 4 bytes. In particular, i1, // Round up to the next multiple of 4 bytes. In particular, i1,
// i8, and i16 are rounded up to 4 bytes. // i8, and i16 are rounded up to 4 bytes.
return (typeWidthInBytes(Ty) + 3) & ~3; return (typeWidthInBytes(Ty) + 3) & ~3;
} }
virtual SizeT getBundleAlignLog2Bytes() const { return 5; } SizeT getBundleAlignLog2Bytes() const override { return 5; }
virtual llvm::ArrayRef<uint8_t> getNonExecBundlePadding() const { llvm::ArrayRef<uint8_t> getNonExecBundlePadding() const override {
static const uint8_t Padding[] = { 0xF4 }; static const uint8_t Padding[] = { 0xF4 };
return llvm::ArrayRef<uint8_t>(Padding, 1); return llvm::ArrayRef<uint8_t>(Padding, 1);
} }
virtual void emitVariable(const Variable *Var) const; void emitVariable(const Variable *Var) const override;
virtual void lowerArguments(); void lowerArguments() override;
virtual void addProlog(CfgNode *Node); void addProlog(CfgNode *Node) override;
virtual void addEpilog(CfgNode *Node); void addEpilog(CfgNode *Node) override;
virtual void emitConstants() const; void emitConstants() const override;
SizeT makeNextLabelNumber() { return NextLabelNumber++; } SizeT makeNextLabelNumber() { return NextLabelNumber++; }
// Ensure that a 64-bit Variable has been split into 2 32-bit // Ensure that a 64-bit Variable has been split into 2 32-bit
// Variables, creating them if necessary. This is needed for all // Variables, creating them if necessary. This is needed for all
...@@ -82,29 +82,29 @@ public: ...@@ -82,29 +82,29 @@ public:
protected: protected:
TargetX8632(Cfg *Func); TargetX8632(Cfg *Func);
virtual void postLower(); void postLower() override;
virtual void lowerAlloca(const InstAlloca *Inst); void lowerAlloca(const InstAlloca *Inst) override;
virtual void lowerArithmetic(const InstArithmetic *Inst); void lowerArithmetic(const InstArithmetic *Inst) override;
virtual void lowerAssign(const InstAssign *Inst); void lowerAssign(const InstAssign *Inst) override;
virtual void lowerBr(const InstBr *Inst); void lowerBr(const InstBr *Inst) override;
virtual void lowerCall(const InstCall *Inst); void lowerCall(const InstCall *Inst) override;
virtual void lowerCast(const InstCast *Inst); void lowerCast(const InstCast *Inst) override;
virtual void lowerExtractElement(const InstExtractElement *Inst); void lowerExtractElement(const InstExtractElement *Inst) override;
virtual void lowerFcmp(const InstFcmp *Inst); void lowerFcmp(const InstFcmp *Inst) override;
virtual void lowerIcmp(const InstIcmp *Inst); void lowerIcmp(const InstIcmp *Inst) override;
virtual void lowerIntrinsicCall(const InstIntrinsicCall *Inst); void lowerIntrinsicCall(const InstIntrinsicCall *Inst) override;
virtual void lowerInsertElement(const InstInsertElement *Inst); void lowerInsertElement(const InstInsertElement *Inst) override;
virtual void lowerLoad(const InstLoad *Inst); void lowerLoad(const InstLoad *Inst) override;
virtual void lowerPhi(const InstPhi *Inst); void lowerPhi(const InstPhi *Inst) override;
virtual void lowerRet(const InstRet *Inst); void lowerRet(const InstRet *Inst) override;
virtual void lowerSelect(const InstSelect *Inst); void lowerSelect(const InstSelect *Inst) override;
virtual void lowerStore(const InstStore *Inst); void lowerStore(const InstStore *Inst) override;
virtual void lowerSwitch(const InstSwitch *Inst); void lowerSwitch(const InstSwitch *Inst) override;
virtual void lowerUnreachable(const InstUnreachable *Inst); void lowerUnreachable(const InstUnreachable *Inst) override;
virtual void doAddressOptLoad(); void doAddressOptLoad() override;
virtual void doAddressOptStore(); void doAddressOptStore() override;
virtual void randomlyInsertNop(float Probability); void randomlyInsertNop(float Probability) override;
// Naive lowering of cmpxchg. // Naive lowering of cmpxchg.
void lowerAtomicCmpxchg(Variable *DestPrev, Operand *Ptr, Operand *Expected, void lowerAtomicCmpxchg(Variable *DestPrev, Operand *Ptr, Operand *Expected,
...@@ -477,7 +477,7 @@ protected: ...@@ -477,7 +477,7 @@ protected:
private: private:
TargetX8632(const TargetX8632 &) LLVM_DELETED_FUNCTION; TargetX8632(const TargetX8632 &) LLVM_DELETED_FUNCTION;
TargetX8632 &operator=(const TargetX8632 &) LLVM_DELETED_FUNCTION; TargetX8632 &operator=(const TargetX8632 &) LLVM_DELETED_FUNCTION;
virtual ~TargetX8632() {} ~TargetX8632() override {}
template <typename T> void emitConstantPool() const; template <typename T> void emitConstantPool() const;
}; };
...@@ -486,9 +486,9 @@ public: ...@@ -486,9 +486,9 @@ public:
static TargetGlobalInitLowering *create(GlobalContext *Ctx) { static TargetGlobalInitLowering *create(GlobalContext *Ctx) {
return new TargetGlobalInitX8632(Ctx); return new TargetGlobalInitX8632(Ctx);
} }
virtual void lower(const IceString &Name, SizeT Align, bool IsInternal, void lower(const IceString &Name, SizeT Align, bool IsInternal, bool IsConst,
bool IsConst, bool IsZeroInitializer, SizeT Size, bool IsZeroInitializer, SizeT Size, const char *Data,
const char *Data, bool DisableTranslation); bool DisableTranslation) override;
protected: protected:
TargetGlobalInitX8632(GlobalContext *Ctx); TargetGlobalInitX8632(GlobalContext *Ctx);
...@@ -497,7 +497,7 @@ private: ...@@ -497,7 +497,7 @@ private:
TargetGlobalInitX8632(const TargetGlobalInitX8632 &) LLVM_DELETED_FUNCTION; TargetGlobalInitX8632(const TargetGlobalInitX8632 &) LLVM_DELETED_FUNCTION;
TargetGlobalInitX8632 & TargetGlobalInitX8632 &
operator=(const TargetGlobalInitX8632 &) LLVM_DELETED_FUNCTION; operator=(const TargetGlobalInitX8632 &) LLVM_DELETED_FUNCTION;
virtual ~TargetGlobalInitX8632() {} ~TargetGlobalInitX8632() override {}
}; };
template <> void ConstantInteger32::emit(GlobalContext *Ctx) const; template <> void ConstantInteger32::emit(GlobalContext *Ctx) const;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment