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/IceCfg.h

Issue 300563003: Subzero: Initial O2 lowering (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Jan's third-round comments Created 6 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 | « crosstest/runtests.sh ('k') | src/IceCfg.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceCfg.h
diff --git a/src/IceCfg.h b/src/IceCfg.h
index 5f3bfd3fc67b90da0411af9267e3334b0da695de..dbf08c66ba3e5841223a47482c653a84914f871e 100644
--- a/src/IceCfg.h
+++ b/src/IceCfg.h
@@ -58,7 +58,7 @@ public:
const NodeList &getNodes() const { return Nodes; }
// Manage instruction numbering.
- int32_t newInstNumber() { return NextInstNumber++; }
+ InstNumberT newInstNumber() { return NextInstNumber++; }
// Manage Variables.
Variable *makeVariable(Type Ty, const CfgNode *Node,
@@ -72,6 +72,7 @@ public:
// Miscellaneous accessors.
TargetLowering *getTarget() const { return Target.get(); }
+ Liveness *getLiveness() const { return Live.get(); }
bool hasComputedFrame() const;
// Passes over the CFG.
@@ -80,11 +81,16 @@ public:
// compute the predecessor edges, in the form of
// CfgNode::InEdges[].
void computePredecessors();
+ void renumberInstructions();
void placePhiLoads();
void placePhiStores();
void deletePhis();
+ void doAddressOpt();
void genCode();
void genFrame();
+ void livenessLightweight();
+ void liveness(LivenessMode Mode);
+ bool validateLiveness() const;
// Manage the CurrentNode field, which is used for validating the
// Variable::DefNode field during dumping/emitting.
@@ -92,7 +98,7 @@ public:
const CfgNode *getCurrentNode() const { return CurrentNode; }
void emit();
- void dump();
+ void dump(const IceString &Message = "");
// Allocate data of type T using the per-Cfg allocator.
template <typename T> T *allocate() { return Allocator.Allocate<T>(); }
@@ -136,9 +142,10 @@ private:
IceString ErrorMessage;
CfgNode *Entry; // entry basic block
NodeList Nodes; // linearized node list; Entry should be first
- int32_t NextInstNumber;
+ InstNumberT NextInstNumber;
VarList Variables;
VarList Args; // subset of Variables, in argument order
+ llvm::OwningPtr<Liveness> Live;
llvm::OwningPtr<TargetLowering> Target;
// CurrentNode is maintained during dumping/emitting just for
« no previous file with comments | « crosstest/runtests.sh ('k') | src/IceCfg.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698