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

Unified Diff: runtime/vm/intermediate_language.h

Issue 1343383003: VM: Store edge counters in one per-function array. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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_inliner.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 60f2db93e046a0e573d2f0424d8418bb7f322ea3..68a88003ae9f82908939a20774010ccc51ee3983 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -610,13 +610,12 @@ class Instruction : public ZoneAllocated {
explicit Instruction(intptr_t deopt_id = Isolate::kNoDeoptId)
: deopt_id_(deopt_id),
- lifetime_position_(-1),
+ lifetime_position_(kNoPlaceId),
previous_(NULL),
next_(NULL),
env_(NULL),
locs_(NULL),
- inlining_id_(-1),
- place_id_(kNoPlaceId) { }
+ inlining_id_(-1) { }
virtual ~Instruction() { }
@@ -889,13 +888,15 @@ FOR_EACH_ABSTRACT_INSTRUCTION(INSTRUCTION_TYPE_CHECK)
};
intptr_t deopt_id_;
- intptr_t lifetime_position_; // Position used by register allocator.
+ union {
+ intptr_t lifetime_position_; // Position used by register allocator.
+ intptr_t place_id_;
+ };
Instruction* previous_;
Instruction* next_;
Environment* env_;
LocationSummary* locs_;
intptr_t inlining_id_;
- intptr_t place_id_;
DISALLOW_COPY_AND_ASSIGN(Instruction);
};
@@ -2158,6 +2159,7 @@ class GotoInstr : public TemplateInstruction<0, NoThrow> {
public:
explicit GotoInstr(JoinEntryInstr* entry)
: TemplateInstruction(Isolate::Current()->GetNextDeoptId()),
+ block_(NULL),
successor_(entry),
edge_weight_(0.0),
parallel_move_(NULL) {
@@ -2165,6 +2167,9 @@ class GotoInstr : public TemplateInstruction<0, NoThrow> {
DECLARE_INSTRUCTION(Goto)
+ BlockEntryInstr* block() const { return block_; }
+ void set_block(BlockEntryInstr* block) { block_ = block; }
+
JoinEntryInstr* successor() const { return successor_; }
void set_successor(JoinEntryInstr* successor) { successor_ = successor; }
virtual intptr_t SuccessorCount() const;
@@ -2206,6 +2211,7 @@ class GotoInstr : public TemplateInstruction<0, NoThrow> {
virtual void PrintTo(BufferFormatter* f) const;
private:
+ BlockEntryInstr* block_;
JoinEntryInstr* successor_;
double edge_weight_;
« no previous file with comments | « runtime/vm/flow_graph_inliner.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698