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

Unified Diff: src/IceCfg.h

Issue 265703002: Add Om1 lowering with no optimizations (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Merge changed from Karl's committed CL Created 6 years, 7 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 | « pydir/build-pnacl-ir.py ('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 05e1e3b30ace68b9ccc56b2b85fa8f6ca8cbe7b2..5f3bfd3fc67b90da0411af9267e3334b0da695de 100644
--- a/src/IceCfg.h
+++ b/src/IceCfg.h
@@ -58,7 +58,7 @@ public:
const NodeList &getNodes() const { return Nodes; }
// Manage instruction numbering.
- int newInstNumber() { return NextInstNumber++; }
+ int32_t newInstNumber() { return NextInstNumber++; }
// Manage Variables.
Variable *makeVariable(Type Ty, const CfgNode *Node,
@@ -70,16 +70,28 @@ public:
void addArg(Variable *Arg);
const VarList &getArgs() const { return Args; }
+ // Miscellaneous accessors.
+ TargetLowering *getTarget() const { return Target.get(); }
+ bool hasComputedFrame() const;
+
+ // Passes over the CFG.
+ void translate();
// After the CFG is fully constructed, iterate over the nodes and
// compute the predecessor edges, in the form of
// CfgNode::InEdges[].
void computePredecessors();
+ void placePhiLoads();
+ void placePhiStores();
+ void deletePhis();
+ void genCode();
+ void genFrame();
// Manage the CurrentNode field, which is used for validating the
// Variable::DefNode field during dumping/emitting.
void setCurrentNode(const CfgNode *Node) { CurrentNode = Node; }
const CfgNode *getCurrentNode() const { return CurrentNode; }
+ void emit();
void dump();
// Allocate data of type T using the per-Cfg allocator.
@@ -124,9 +136,10 @@ private:
IceString ErrorMessage;
CfgNode *Entry; // entry basic block
NodeList Nodes; // linearized node list; Entry should be first
- int NextInstNumber;
+ int32_t NextInstNumber;
VarList Variables;
VarList Args; // subset of Variables, in argument order
+ llvm::OwningPtr<TargetLowering> Target;
// CurrentNode is maintained during dumping/emitting just for
// validating Variable::DefNode. Normally, a traversal over
« no previous file with comments | « pydir/build-pnacl-ir.py ('k') | src/IceCfg.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698