Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: src/IceLiveness.h

Issue 1197223002: Subzero: Use C++11 member initializers where practical. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Rebase Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceIntrinsics.cpp ('k') | src/IceOperand.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceLiveness.h
diff --git a/src/IceLiveness.h b/src/IceLiveness.h
index 6af0ef05257f8caea0f14483a28f723d0af97e89..333a9049916a5e5eb2c4feed3552ea667dab94b2 100644
--- a/src/IceLiveness.h
+++ b/src/IceLiveness.h
@@ -34,15 +34,15 @@ class Liveness {
LivenessNode &operator=(const LivenessNode &) = delete;
public:
- LivenessNode() : NumLocals(0), NumNonDeadPhis(0) {}
+ LivenessNode() = default;
LivenessNode(const LivenessNode &) = default;
// NumLocals is the number of Variables local to this block.
- SizeT NumLocals;
+ SizeT NumLocals = 0;
// 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;
+ SizeT NumNonDeadPhis = 0;
// 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.
@@ -59,8 +59,7 @@ class Liveness {
};
public:
- Liveness(Cfg *Func, LivenessMode Mode)
- : Func(Func), Mode(Mode), NumGlobals(0) {}
+ Liveness(Cfg *Func, LivenessMode Mode) : Func(Func), Mode(Mode) {}
void init();
Cfg *getFunc() const { return Func; }
LivenessMode getMode() const { return Mode; }
@@ -102,7 +101,7 @@ private:
}
Cfg *Func;
LivenessMode Mode;
- SizeT NumGlobals;
+ SizeT NumGlobals = 0;
// Size of Nodes is Cfg::Nodes.size().
std::vector<LivenessNode> Nodes;
// VarToLiveMap maps a Variable's Variable::Number to its live index
« no previous file with comments | « src/IceIntrinsics.cpp ('k') | src/IceOperand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698