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

Unified Diff: src/IceOperand.h

Issue 680733002: Subzero: Allow delaying Phi lowering until after register allocation. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix vector const undef lowering for phis. Created 6 years, 2 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/IceLiveness.cpp ('k') | src/IceOperand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceOperand.h
diff --git a/src/IceOperand.h b/src/IceOperand.h
index 6d31127166e303e45ac23415eb6882a569cb1f6e..76a01810bf1bb6700a7147fdf327e1bbb5eacd09 100644
--- a/src/IceOperand.h
+++ b/src/IceOperand.h
@@ -398,6 +398,8 @@ public:
void setIgnoreLiveness() { IgnoreLiveness = true; }
bool getIgnoreLiveness() const { return IgnoreLiveness; }
+ bool needsStackSlot() const { return NeedsStackSlot; }
+ void setNeedsStackSlot() { NeedsStackSlot = true; }
int32_t getStackOffset() const { return StackOffset; }
void setStackOffset(int32_t Offset) { StackOffset = Offset; }
@@ -474,9 +476,9 @@ public:
protected:
Variable(OperandKind K, Type Ty, SizeT Index, const IceString &Name)
: Operand(K, Ty), Number(Index), Name(Name), IsArgument(false),
- IsImplicitArgument(false), IgnoreLiveness(false), StackOffset(0),
- RegNum(NoRegister), RegNumTmp(NoRegister), Weight(1), LoVar(NULL),
- HiVar(NULL) {
+ IsImplicitArgument(false), IgnoreLiveness(false), NeedsStackSlot(false),
+ StackOffset(0), RegNum(NoRegister), RegNumTmp(NoRegister), Weight(1),
+ LoVar(NULL), HiVar(NULL) {
Vars = VarsReal;
Vars[0] = this;
NumVars = 1;
@@ -492,6 +494,9 @@ protected:
// constructing and validating live ranges. This is usually
// reserved for the stack pointer.
bool IgnoreLiveness;
+ // NeedsStackSlot starts out false, and is set to true once we know
+ // for sure that the variable needs a stack slot.
+ bool NeedsStackSlot;
// StackOffset is the canonical location on stack (only if
// RegNum==NoRegister || IsArgument).
int32_t StackOffset;
@@ -578,6 +583,9 @@ public:
// Initialize the state by traversing all instructions/variables in
// the CFG.
void init(MetadataKind TrackingKind);
+ // Add a single node. This is called by init(), and can be called
+ // incrementally from elsewhere, e.g. after edge-splitting.
+ void addNode(CfgNode *Node);
// Returns whether the given Variable is tracked in this object. It
// should only return false if changes were made to the CFG after
// running init(), in which case the state is stale and the results
« no previous file with comments | « src/IceLiveness.cpp ('k') | src/IceOperand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698