Commit 7e571364 by Jim Stichnoth

Subzero: Clean up a few areas.

1. Use a reverse_range() adaptor for range-based reverse iteration through containers. 2. Remove the emitting of the commented llvm-mc command line. 3. Remove a few TODOs. 4. For commented-out declarations within a class T like this: // T(const T&) = delete; // T &operator=(const T &) = delete; Replace them with this: T(const T&) = default; T &operator=(const T &) = default; And try to keep them private where possible. 5. Make LivenessNode and TimerTreeNode into internal classes. BUG= none R=jvoung@chromium.org Review URL: https://codereview.chromium.org/830303003
parent 5a122d70
...@@ -269,8 +269,7 @@ void Cfg::liveness(LivenessMode Mode) { ...@@ -269,8 +269,7 @@ void Cfg::liveness(LivenessMode Mode) {
llvm::BitVector NeedToProcess(Nodes.size(), true); llvm::BitVector NeedToProcess(Nodes.size(), true);
while (NeedToProcess.any()) { while (NeedToProcess.any()) {
// Iterate in reverse topological order to speed up convergence. // Iterate in reverse topological order to speed up convergence.
for (auto I = Nodes.rbegin(), E = Nodes.rend(); I != E; ++I) { for (CfgNode *Node : reverse_range(Nodes)) {
CfgNode *Node = *I;
if (NeedToProcess[Node->getIndex()]) { if (NeedToProcess[Node->getIndex()]) {
NeedToProcess[Node->getIndex()] = false; NeedToProcess[Node->getIndex()] = false;
bool Changed = Node->liveness(getLiveness()); bool Changed = Node->liveness(getLiveness());
...@@ -442,16 +441,6 @@ void Cfg::emit() { ...@@ -442,16 +441,6 @@ void Cfg::emit() {
dump("After recomputing liveness for -decorate-asm"); dump("After recomputing liveness for -decorate-asm");
} }
Ostream &Str = Ctx->getStrEmit(); Ostream &Str = Ctx->getStrEmit();
if (!Ctx->testAndSetHasEmittedFirstMethod()) {
// Print a helpful command for assembling the output.
// TODO: have the Target emit the header
// TODO: need a per-file emit in addition to per-CFG
Str << "# $LLVM_BIN_PATH/llvm-mc"
<< " -arch=x86"
<< " -filetype=obj"
<< " -o=MyObj.o"
<< "\n\n";
}
IceString MangledName = getContext()->mangleName(getFunctionName()); IceString MangledName = getContext()->mangleName(getFunctionName());
emitTextHeader(MangledName); emitTextHeader(MangledName);
for (CfgNode *Node : Nodes) for (CfgNode *Node : Nodes)
......
...@@ -104,10 +104,6 @@ void CfgNode::placePhiLoads() { ...@@ -104,10 +104,6 @@ void CfgNode::placePhiLoads() {
// Note that this transformation takes the Phi dest variables out of // Note that this transformation takes the Phi dest variables out of
// SSA form, as there may be assignments to the dest variable in // SSA form, as there may be assignments to the dest variable in
// multiple blocks. // multiple blocks.
//
// TODO: Defer this pass until after register allocation, then split
// critical edges, add the assignments, and lower them. This should
// reduce the amount of shuffling at the end of each block.
void CfgNode::placePhiStores() { void CfgNode::placePhiStores() {
// Find the insertion point. // Find the insertion point.
InstList::iterator InsertionPoint = Insts.end(); InstList::iterator InsertionPoint = Insts.end();
...@@ -250,14 +246,13 @@ CfgNode *CfgNode::splitIncomingEdge(CfgNode *Pred, SizeT EdgeIndex) { ...@@ -250,14 +246,13 @@ CfgNode *CfgNode::splitIncomingEdge(CfgNode *Pred, SizeT EdgeIndex) {
} }
} }
assert(Found); assert(Found);
// Repoint a suitable branch instruction's target. // Repoint a suitable branch instruction's target and return.
Found = false; Found = false;
for (auto I = Pred->getInsts().rbegin(), E = Pred->getInsts().rend(); for (Inst &I : reverse_range(Pred->getInsts())) {
!Found && I != E; ++I) { if (!I.isDeleted() && I.repointEdge(this, NewNode))
if (!I->isDeleted()) { return NewNode;
Found = I->repointEdge(this, NewNode);
}
} }
// This should be unreachable, so the assert will fail.
assert(Found); assert(Found);
return NewNode; return NewNode;
} }
...@@ -533,11 +528,10 @@ void CfgNode::livenessLightweight() { ...@@ -533,11 +528,10 @@ void CfgNode::livenessLightweight() {
SizeT NumVars = Func->getNumVariables(); SizeT NumVars = Func->getNumVariables();
LivenessBV Live(NumVars); LivenessBV Live(NumVars);
// Process regular instructions in reverse order. // Process regular instructions in reverse order.
// TODO(stichnot): Use llvm::make_range with LLVM 3.5. for (Inst &I : reverse_range(Insts)) {
for (auto I = Insts.rbegin(), E = Insts.rend(); I != E; ++I) { if (I.isDeleted())
if (I->isDeleted())
continue; continue;
I->livenessLightweight(Func, Live); I.livenessLightweight(Func, Live);
} }
for (Inst &I : Phis) { for (Inst &I : Phis) {
if (I.isDeleted()) if (I.isDeleted())
...@@ -579,10 +573,10 @@ bool CfgNode::liveness(Liveness *Liveness) { ...@@ -579,10 +573,10 @@ bool CfgNode::liveness(Liveness *Liveness) {
Liveness->getLiveOut(this) = Live; Liveness->getLiveOut(this) = Live;
// Process regular instructions in reverse order. // Process regular instructions in reverse order.
for (auto I = Insts.rbegin(), E = Insts.rend(); I != E; ++I) { for (Inst &I : reverse_range(Insts)) {
if (I->isDeleted()) if (I.isDeleted())
continue; continue;
I->liveness(I->getNumber(), Live, Liveness, LiveBegin, LiveEnd); I.liveness(I.getNumber(), Live, Liveness, LiveBegin, LiveEnd);
} }
// Process phis in forward order so that we can override the // Process phis in forward order so that we can override the
// instruction number to be that of the earliest phi instruction in // instruction number to be that of the earliest phi instruction in
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include "llvm/ADT/BitVector.h" #include "llvm/ADT/BitVector.h"
#include "llvm/ADT/ilist.h" #include "llvm/ADT/ilist.h"
#include "llvm/ADT/ilist_node.h" #include "llvm/ADT/ilist_node.h"
#include "llvm/ADT/iterator_range.h"
#include "llvm/ADT/SmallBitVector.h" #include "llvm/ADT/SmallBitVector.h"
#include "llvm/ADT/SmallVector.h" #include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/STLExtras.h" #include "llvm/ADT/STLExtras.h"
...@@ -157,6 +158,17 @@ typedef uint32_t VerboseMask; ...@@ -157,6 +158,17 @@ typedef uint32_t VerboseMask;
typedef llvm::raw_ostream Ostream; typedef llvm::raw_ostream Ostream;
typedef llvm::raw_fd_ostream Fdstream; typedef llvm::raw_fd_ostream Fdstream;
// Reverse range adaptors written in terms of llvm::make_range().
template <typename T>
llvm::iterator_range<typename T::const_reverse_iterator>
reverse_range(const T &Container) {
return llvm::make_range(Container.rbegin(), Container.rend());
}
template <typename T>
llvm::iterator_range<typename T::reverse_iterator> reverse_range(T &Container) {
return llvm::make_range(Container.rbegin(), Container.rend());
}
} // end of namespace Ice } // end of namespace Ice
#endif // SUBZERO_SRC_ICEDEFS_H #endif // SUBZERO_SRC_ICEDEFS_H
...@@ -130,8 +130,7 @@ GlobalContext::GlobalContext(Ostream *OsDump, Ostream *OsEmit, ...@@ -130,8 +130,7 @@ GlobalContext::GlobalContext(Ostream *OsDump, Ostream *OsEmit,
IceString TestPrefix, const ClFlags &Flags) IceString TestPrefix, const ClFlags &Flags)
: StrDump(OsDump), StrEmit(OsEmit), VMask(Mask), : StrDump(OsDump), StrEmit(OsEmit), VMask(Mask),
ConstPool(new ConstantPool()), Arch(Arch), Opt(Opt), ConstPool(new ConstantPool()), Arch(Arch), Opt(Opt),
TestPrefix(TestPrefix), Flags(Flags), HasEmittedFirstMethod(false), TestPrefix(TestPrefix), Flags(Flags), RNG(""), ObjectWriter() {
RNG(""), ObjectWriter() {
// Pre-register built-in stack names. // Pre-register built-in stack names.
if (ALLOW_DUMP) { if (ALLOW_DUMP) {
newTimerStackID("Total across all functions"); newTimerStackID("Total across all functions");
......
...@@ -33,7 +33,7 @@ class FuncSigType; ...@@ -33,7 +33,7 @@ class FuncSigType;
// This class collects rudimentary statistics during translation. // This class collects rudimentary statistics during translation.
class CodeStats { class CodeStats {
CodeStats(const CodeStats &) = delete; CodeStats(const CodeStats &) = delete;
// CodeStats &operator=(const CodeStats &) = delete; CodeStats &operator=(const CodeStats &) = default;
public: public:
CodeStats() CodeStats()
...@@ -90,15 +90,6 @@ public: ...@@ -90,15 +90,6 @@ public:
IceString getTestPrefix() const { return TestPrefix; } IceString getTestPrefix() const { return TestPrefix; }
IceString mangleName(const IceString &Name) const; IceString mangleName(const IceString &Name) const;
// The purpose of HasEmitted is to add a header comment at the
// beginning of assembly code emission, doing it once per file
// rather than once per function.
bool testAndSetHasEmittedFirstMethod() {
bool HasEmitted = HasEmittedFirstMethod;
HasEmittedFirstMethod = true;
return HasEmitted;
}
// Manage Constants. // Manage Constants.
// getConstant*() functions are not const because they might add // getConstant*() functions are not const because they might add
// something to the constant pool. // something to the constant pool.
...@@ -214,7 +205,6 @@ private: ...@@ -214,7 +205,6 @@ private:
const OptLevel Opt; const OptLevel Opt;
const IceString TestPrefix; const IceString TestPrefix;
const ClFlags &Flags; const ClFlags &Flags;
bool HasEmittedFirstMethod;
RandomNumberGenerator RNG; RandomNumberGenerator RNG;
std::unique_ptr<ELFObjectWriter> ObjectWriter; std::unique_ptr<ELFObjectWriter> ObjectWriter;
CodeStats StatsFunction; CodeStats StatsFunction;
......
...@@ -25,40 +25,38 @@ ...@@ -25,40 +25,38 @@
namespace Ice { namespace Ice {
class LivenessNode {
// TODO: Disable these constructors when Liveness::Nodes is no
// longer an STL container.
// LivenessNode(const LivenessNode &) = delete;
// LivenessNode &operator=(const LivenessNode &) = delete;
public:
LivenessNode() : NumLocals(0), NumNonDeadPhis(0) {}
// NumLocals is the number of Variables local to this block.
SizeT NumLocals;
// NumNonDeadPhis tracks the number of Phi instructions that
// Inst::liveness() identified as tentatively live. If
// NumNonDeadPhis changes from the last liveness pass, then liveness
// has not yet converged.
SizeT NumNonDeadPhis;
// LiveToVarMap maps a liveness bitvector index to a Variable. This
// is generally just for printing/dumping. The index should be less
// than NumLocals + Liveness::NumGlobals.
std::vector<Variable *> LiveToVarMap;
// LiveIn and LiveOut track the in- and out-liveness of the global
// variables. The size of each vector is
// LivenessNode::NumGlobals.
LivenessBV LiveIn, LiveOut;
// LiveBegin and LiveEnd track the instruction numbers of the start
// and end of each variable's live range within this block. The
// index/key of each element is less than NumLocals +
// Liveness::NumGlobals.
LiveBeginEndMap LiveBegin, LiveEnd;
};
class Liveness { class Liveness {
Liveness(const Liveness &) = delete; Liveness(const Liveness &) = delete;
Liveness &operator=(const Liveness &) = delete; Liveness &operator=(const Liveness &) = delete;
class LivenessNode {
LivenessNode &operator=(const LivenessNode &) = delete;
public:
LivenessNode() : NumLocals(0), NumNonDeadPhis(0) {}
LivenessNode(const LivenessNode &) = default;
// NumLocals is the number of Variables local to this block.
SizeT NumLocals;
// NumNonDeadPhis tracks the number of Phi instructions that
// Inst::liveness() identified as tentatively live. If
// NumNonDeadPhis changes from the last liveness pass, then liveness
// has not yet converged.
SizeT NumNonDeadPhis;
// LiveToVarMap maps a liveness bitvector index to a Variable. This
// is generally just for printing/dumping. The index should be less
// than NumLocals + Liveness::NumGlobals.
std::vector<Variable *> LiveToVarMap;
// LiveIn and LiveOut track the in- and out-liveness of the global
// variables. The size of each vector is
// LivenessNode::NumGlobals.
LivenessBV LiveIn, LiveOut;
// LiveBegin and LiveEnd track the instruction numbers of the start
// and end of each variable's live range within this block. The
// index/key of each element is less than NumLocals +
// Liveness::NumGlobals.
LiveBeginEndMap LiveBegin, LiveEnd;
};
public: public:
Liveness(Cfg *Func, LivenessMode Mode) Liveness(Cfg *Func, LivenessMode Mode)
: Func(Func), Mode(Mode), NumGlobals(0) {} : Func(Func), Mode(Mode), NumGlobals(0) {}
......
...@@ -282,12 +282,12 @@ private: ...@@ -282,12 +282,12 @@ private:
// special value that represents infinite weight, and an addWeight() // special value that represents infinite weight, and an addWeight()
// method that ensures that W+infinity=infinity. // method that ensures that W+infinity=infinity.
class RegWeight { class RegWeight {
// RegWeight(const RegWeight &) = delete;
// RegWeight &operator=(const RegWeight &) = delete;
public: public:
RegWeight() : Weight(0) {} RegWeight() : Weight(0) {}
RegWeight(uint32_t Weight) : Weight(Weight) {} RegWeight(uint32_t Weight) : Weight(Weight) {}
RegWeight(const RegWeight &) = default;
RegWeight &operator=(const RegWeight &) = default;
const static uint32_t Inf = ~0; // Force regalloc to give a register const static uint32_t Inf = ~0; // Force regalloc to give a register
const static uint32_t Zero = 0; // Force regalloc NOT to give a register const static uint32_t Zero = 0; // Force regalloc NOT to give a register
void addWeight(uint32_t Delta) { void addWeight(uint32_t Delta) {
...@@ -526,7 +526,6 @@ typedef std::vector<const Inst *, CfgLocalAllocator<const Inst *> > InstDefList; ...@@ -526,7 +526,6 @@ typedef std::vector<const Inst *, CfgLocalAllocator<const Inst *> > InstDefList;
// VariableTracking tracks the metadata for a single variable. It is // VariableTracking tracks the metadata for a single variable. It is
// only meant to be used internally by VariablesMetadata. // only meant to be used internally by VariablesMetadata.
class VariableTracking { class VariableTracking {
// VariableTracking(const VariableTracking &) = delete;
VariableTracking &operator=(const VariableTracking &) = delete; VariableTracking &operator=(const VariableTracking &) = delete;
public: public:
...@@ -545,6 +544,7 @@ public: ...@@ -545,6 +544,7 @@ public:
VariableTracking() VariableTracking()
: MultiDef(MDS_Unknown), MultiBlock(MBS_Unknown), SingleUseNode(nullptr), : MultiDef(MDS_Unknown), MultiBlock(MBS_Unknown), SingleUseNode(nullptr),
SingleDefNode(nullptr), FirstOrSingleDefinition(nullptr) {} SingleDefNode(nullptr), FirstOrSingleDefinition(nullptr) {}
VariableTracking(const VariableTracking &) = default;
MultiDefState getMultiDef() const { return MultiDef; } MultiDefState getMultiDef() const { return MultiDef; }
MultiBlockState getMultiBlock() const { return MultiBlock; } MultiBlockState getMultiBlock() const { return MultiBlock; }
const Inst *getFirstDefinition() const; const Inst *getFirstDefinition() const;
......
...@@ -494,9 +494,7 @@ void LinearScan::scan(const llvm::SmallBitVector &RegMaskFull, ...@@ -494,9 +494,7 @@ void LinearScan::scan(const llvm::SmallBitVector &RegMaskFull,
// complexity. // complexity.
llvm::SmallBitVector PrecoloredUnhandledMask(RegMask.size()); llvm::SmallBitVector PrecoloredUnhandledMask(RegMask.size());
// Note: PrecoloredUnhandledMask is only used for dumping. // Note: PrecoloredUnhandledMask is only used for dumping.
for (auto I = UnhandledPrecolored.rbegin(), E = UnhandledPrecolored.rend(); for (Variable *Item : reverse_range(UnhandledPrecolored)) {
I != E; ++I) {
Variable *Item = *I;
assert(Item->hasReg()); assert(Item->hasReg());
if (Cur->rangeEndsBefore(Item)) if (Cur->rangeEndsBefore(Item))
break; break;
...@@ -731,8 +729,8 @@ void LinearScan::dump(Cfg *Func) const { ...@@ -731,8 +729,8 @@ void LinearScan::dump(Cfg *Func) const {
Str << "\n"; Str << "\n";
} }
Str << "++++++ Unhandled:\n"; Str << "++++++ Unhandled:\n";
for (auto I = Unhandled.rbegin(), E = Unhandled.rend(); I != E; ++I) { for (const Variable *Item : reverse_range(Unhandled)) {
dumpLiveRange(*I, Func); dumpLiveRange(Item, Func);
Str << "\n"; Str << "\n";
} }
Str << "++++++ Active:\n"; Str << "++++++ Active:\n";
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
// //
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
#include "llvm/ADT/DenseMap.h"
#include "llvm/Support/CommandLine.h" #include "llvm/Support/CommandLine.h"
#include "llvm/Support/MathExtras.h" #include "llvm/Support/MathExtras.h"
...@@ -927,7 +926,6 @@ void TargetX8632::addProlog(CfgNode *Node) { ...@@ -927,7 +926,6 @@ void TargetX8632::addProlog(CfgNode *Node) {
void TargetX8632::addEpilog(CfgNode *Node) { void TargetX8632::addEpilog(CfgNode *Node) {
InstList &Insts = Node->getInsts(); InstList &Insts = Node->getInsts();
InstList::reverse_iterator RI, E; InstList::reverse_iterator RI, E;
// TODO(stichnot): Use llvm::make_range with LLVM 3.5.
for (RI = Insts.rbegin(), E = Insts.rend(); RI != E; ++RI) { for (RI = Insts.rbegin(), E = Insts.rend(); RI != E; ++RI) {
if (llvm::isa<InstX8632Ret>(*RI)) if (llvm::isa<InstX8632Ret>(*RI))
break; break;
...@@ -4242,9 +4240,9 @@ void TargetX8632::lowerPhiAssignments(CfgNode *Node, ...@@ -4242,9 +4240,9 @@ void TargetX8632::lowerPhiAssignments(CfgNode *Node,
// register set, and the lowered instruction numbers may be out of // register set, and the lowered instruction numbers may be out of
// order, but that can be worked around by renumbering the block // order, but that can be worked around by renumbering the block
// afterwards if necessary. // afterwards if necessary.
for (auto I = Assignments.rbegin(), E = Assignments.rend(); I != E; ++I) { for (const Inst &I : reverse_range(Assignments)) {
Context.rewind(); Context.rewind();
auto Assign = llvm::dyn_cast<InstAssign>(&*I); auto Assign = llvm::dyn_cast<InstAssign>(&I);
Variable *Dest = Assign->getDest(); Variable *Dest = Assign->getDest();
Operand *Src = Assign->getSrc(0); Operand *Src = Assign->getSrc(0);
Variable *SrcVar = llvm::dyn_cast<Variable>(Src); Variable *SrcVar = llvm::dyn_cast<Variable>(Src);
......
...@@ -141,12 +141,11 @@ typedef std::multimap<double, IceString> DumpMapType; ...@@ -141,12 +141,11 @@ typedef std::multimap<double, IceString> DumpMapType;
void dumpHelper(Ostream &Str, const DumpMapType &Map, double TotalTime) { void dumpHelper(Ostream &Str, const DumpMapType &Map, double TotalTime) {
if (!ALLOW_DUMP) if (!ALLOW_DUMP)
return; return;
// TODO(stichnot): Use llvm::make_range with LLVM 3.5. for (auto &I : reverse_range(Map)) {
for (auto I = Map.rbegin(), E = Map.rend(); I != E; ++I) {
char buf[80]; char buf[80];
snprintf(buf, llvm::array_lengthof(buf), " %10.6f (%4.1f%%): ", I->first, snprintf(buf, llvm::array_lengthof(buf), " %10.6f (%4.1f%%): ", I.first,
I->first * 100 / TotalTime); I.first * 100 / TotalTime);
Str << buf << I->second << "\n"; Str << buf << I.second << "\n";
} }
} }
......
...@@ -19,33 +19,30 @@ ...@@ -19,33 +19,30 @@
namespace Ice { namespace Ice {
class TimerTreeNode; class TimerStack {
TimerStack &operator=(const TimerStack &) = delete;
// Timer tree index type
typedef std::vector<TimerTreeNode>::size_type TTindex;
// TimerTreeNode represents an interior or leaf node in the call tree. // Timer tree index type
// It contains a list of children, a pointer to its parent, and the typedef std::vector<class TimerTreeNode>::size_type TTindex;
// timer ID for the node. It also holds the cumulative time spent at
// this node and below. The children are always at a higher index in
// the TimerTreeNode::Nodes array, and the parent is always at a lower
// index.
class TimerTreeNode {
// TimerTreeNode(const TimerTreeNode &) = delete;
TimerTreeNode &operator=(const TimerTreeNode &) = delete;
public: // TimerTreeNode represents an interior or leaf node in the call tree.
TimerTreeNode() : Parent(0), Interior(0), Time(0), UpdateCount(0) {} // It contains a list of children, a pointer to its parent, and the
std::vector<TTindex> Children; // indexed by TimerIdT // timer ID for the node. It also holds the cumulative time spent at
TTindex Parent; // this node and below. The children are always at a higher index in
TimerIdT Interior; // the TimerTreeNode::Nodes array, and the parent is always at a lower
double Time; // index.
size_t UpdateCount; class TimerTreeNode {
}; TimerTreeNode &operator=(const TimerTreeNode &) = delete;
class TimerStack { public:
// TimerStack(const TimerStack &) = delete; TimerTreeNode() : Parent(0), Interior(0), Time(0), UpdateCount(0) {}
TimerStack &operator=(const TimerStack &) = delete; TimerTreeNode(const TimerTreeNode &) = default;
std::vector<TTindex> Children; // indexed by TimerIdT
TTindex Parent;
TimerIdT Interior;
double Time;
size_t UpdateCount;
};
public: public:
enum TimerTag { enum TimerTag {
...@@ -55,6 +52,7 @@ public: ...@@ -55,6 +52,7 @@ public:
TT__num TT__num
}; };
TimerStack(const IceString &Name); TimerStack(const IceString &Name);
TimerStack(const TimerStack &) = default;
TimerIdT getTimerID(const IceString &Name); TimerIdT getTimerID(const IceString &Name);
void setName(const IceString &NewName) { Name = NewName; } void setName(const IceString &NewName) { Name = NewName; }
void push(TimerIdT ID); void push(TimerIdT ID);
......
...@@ -112,10 +112,7 @@ inline StreamType &operator<<(StreamType &Str, const Type &Ty) { ...@@ -112,10 +112,7 @@ inline StreamType &operator<<(StreamType &Str, const Type &Ty) {
} }
/// Models a type signature for a function. /// Models a type signature for a function.
/// TODO(kschimpf): Consider using arena memory allocation for
/// the contents of type signatures.
class FuncSigType { class FuncSigType {
// FuncSigType(const FuncSigType &Ty) = delete;
FuncSigType &operator=(const FuncSigType &Ty) = delete; FuncSigType &operator=(const FuncSigType &Ty) = delete;
public: public:
typedef std::vector<Type> ArgListType; typedef std::vector<Type> ArgListType;
...@@ -123,6 +120,7 @@ public: ...@@ -123,6 +120,7 @@ public:
// Creates a function signature type with the given return type. // Creates a function signature type with the given return type.
// Parameter types should be added using calls to appendArgType. // Parameter types should be added using calls to appendArgType.
FuncSigType() : ReturnType(IceType_void) {} FuncSigType() : ReturnType(IceType_void) {}
FuncSigType(const FuncSigType &Ty) = default;
void appendArgType(Type ArgType) { ArgList.push_back(ArgType); } void appendArgType(Type ArgType) { ArgList.push_back(ArgType); }
......
...@@ -49,13 +49,13 @@ static cl::opt<bool> AllowErrorRecovery( ...@@ -49,13 +49,13 @@ static cl::opt<bool> AllowErrorRecovery(
// Use methods setAsSimpleType and setAsFuncSigType to define // Use methods setAsSimpleType and setAsFuncSigType to define
// the extended type. // the extended type.
class ExtendedType { class ExtendedType {
// ExtendedType(const ExtendedType &Ty) = delete;
ExtendedType &operator=(const ExtendedType &Ty) = delete; ExtendedType &operator=(const ExtendedType &Ty) = delete;
public: public:
/// Discriminator for LLVM-style RTTI. /// Discriminator for LLVM-style RTTI.
enum TypeKind { Undefined, Simple, FuncSig }; enum TypeKind { Undefined, Simple, FuncSig };
ExtendedType() : Kind(Undefined) {} ExtendedType() : Kind(Undefined) {}
ExtendedType(const ExtendedType &Ty) = default;
virtual ~ExtendedType() {} virtual ~ExtendedType() {}
......
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