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

Unified Diff: runtime/vm/intermediate_language.h

Issue 12827027: Revert "Compute local variable liveness before translation to SSA." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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 | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.h
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index 88199207f873cd758460fc8603fde3c31ae7ea70..d11cc8461ada366a4559fd6181ab33d7c0248756 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -619,6 +619,11 @@ class Instruction : public ZoneAllocated {
void Goto(JoinEntryInstr* entry);
+ // Mutate assigned_vars to add the local variable index for all
+ // frame-allocated locals assigned to by the instruction.
+ virtual void RecordAssignedVars(BitVector* assigned_vars,
+ intptr_t fixed_parameter_count);
+
virtual const char* DebugName() const = 0;
// Printing support.
@@ -964,6 +969,7 @@ class BlockEntryInstr : public Instruction {
GrowableArray<BlockEntryInstr*>* preorder,
GrowableArray<BlockEntryInstr*>* postorder,
GrowableArray<intptr_t>* parent,
+ GrowableArray<BitVector*>* assigned_vars,
intptr_t variable_count,
intptr_t fixed_parameter_count);
@@ -1384,6 +1390,9 @@ class Definition : public Instruction {
// NULL iterator.
void ReplaceWith(Definition* other, ForwardInstructionIterator* iterator);
+ virtual void RecordAssignedVars(BitVector* assigned_vars,
+ intptr_t fixed_parameter_count);
+
// Printing support. These functions are sometimes overridden for custom
// formatting. Otherwise, it prints in the format "opcode(op1, op2, op3)".
virtual void PrintTo(BufferFormatter* f) const;
@@ -2700,8 +2709,7 @@ class StaticCallInstr : public TemplateDefinition<0> {
class LoadLocalInstr : public TemplateDefinition<0> {
public:
- explicit LoadLocalInstr(const LocalVariable& local)
- : local_(local), is_last_(false) { }
+ explicit LoadLocalInstr(const LocalVariable& local) : local_(local) { }
DECLARE_INSTRUCTION(LoadLocal)
virtual CompileType ComputeType() const;
@@ -2717,12 +2725,8 @@ class LoadLocalInstr : public TemplateDefinition<0> {
return false;
}
- void mark_last() { is_last_ = true; }
- bool is_last() const { return is_last_; }
-
private:
const LocalVariable& local_;
- bool is_last_;
DISALLOW_COPY_AND_ASSIGN(LoadLocalInstr);
};
@@ -2730,8 +2734,7 @@ class LoadLocalInstr : public TemplateDefinition<0> {
class StoreLocalInstr : public TemplateDefinition<1> {
public:
- StoreLocalInstr(const LocalVariable& local, Value* value)
- : local_(local), is_dead_(false), is_last_(false) {
+ StoreLocalInstr(const LocalVariable& local, Value* value) : local_(local) {
SetInputAt(0, value);
}
@@ -2741,6 +2744,9 @@ class StoreLocalInstr : public TemplateDefinition<1> {
const LocalVariable& local() const { return local_; }
Value* value() const { return inputs_[0]; }
+ virtual void RecordAssignedVars(BitVector* assigned_vars,
+ intptr_t fixed_parameter_count);
+
virtual void PrintOperandsTo(BufferFormatter* f) const;
virtual bool CanDeoptimize() const { return false; }
@@ -2750,16 +2756,8 @@ class StoreLocalInstr : public TemplateDefinition<1> {
return false;
}
- void mark_dead() { is_dead_ = true; }
- bool is_dead() const { return is_dead_; }
-
- void mark_last() { is_last_ = true; }
- bool is_last() const { return is_last_; }
-
private:
const LocalVariable& local_;
- bool is_dead_;
- bool is_last_;
DISALLOW_COPY_AND_ASSIGN(StoreLocalInstr);
};
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698