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

Unified Diff: src/IceLiveness.h

Issue 830303003: Subzero: Clean up a few areas. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Rewrite another loop using reverse_range() Created 5 years, 11 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/IceGlobalContext.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 a542f3ea3d98e252562dc3ed181a992561474d2c..c287dc22a995b92ed72a5b7e42a92e07f0177d83 100644
--- a/src/IceLiveness.h
+++ b/src/IceLiveness.h
@@ -25,40 +25,38 @@
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 {
Liveness(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:
Liveness(Cfg *Func, LivenessMode Mode)
: Func(Func), Mode(Mode), NumGlobals(0) {}
« no previous file with comments | « src/IceGlobalContext.cpp ('k') | src/IceOperand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698