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

Unified Diff: runtime/vm/intermediate_language.h

Issue 11269040: More inlining flags and tuned heuristics. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Improved heuristics. Created 8 years, 1 month 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 9d6c9c1226e1d654b1b6341861629ccaa653ac70..baed14c25f4ac723a953156f0b537daeaecee662 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -667,6 +667,8 @@ class ParallelMoveInstr : public TemplateInstruction<0> {
// branches.
class BlockEntryInstr : public Instruction {
public:
+ static const intptr_t kInvalidLoopDepth = -1;
+
virtual BlockEntryInstr* AsBlockEntry() { return this; }
virtual intptr_t PredecessorCount() const = 0;
@@ -747,12 +749,19 @@ class BlockEntryInstr : public Instruction {
loop_info_ = loop_info;
}
+ intptr_t loop_depth() const { return loop_depth_; }
+ void set_loop_depth(intptr_t loop_depth) {
+ ASSERT(loop_depth_ == kInvalidLoopDepth);
+ ASSERT(loop_depth != kInvalidLoopDepth);
+ loop_depth_ = loop_depth;
+ }
+
virtual BlockEntryInstr* GetBlock() const {
return const_cast<BlockEntryInstr*>(this);
}
protected:
- BlockEntryInstr(intptr_t block_id, intptr_t try_index)
+ BlockEntryInstr(intptr_t block_id, intptr_t try_index, intptr_t loop_depth)
: block_id_(block_id),
try_index_(try_index),
preorder_number_(-1),
@@ -761,7 +770,8 @@ class BlockEntryInstr : public Instruction {
dominated_blocks_(1),
last_instruction_(NULL),
parallel_move_(NULL),
- loop_info_(NULL) { }
+ loop_info_(NULL),
+ loop_depth_(loop_depth) { }
private:
virtual void ClearPredecessors() = 0;
@@ -788,6 +798,9 @@ class BlockEntryInstr : public Instruction {
// preorder number.
BitVector* loop_info_;
+ // Syntactic loop depth of the block.
+ intptr_t loop_depth_;
+
DISALLOW_COPY_AND_ASSIGN(BlockEntryInstr);
};
@@ -901,8 +914,8 @@ class GraphEntryInstr : public BlockEntryInstr {
class JoinEntryInstr : public BlockEntryInstr {
public:
- JoinEntryInstr(intptr_t block_id, intptr_t try_index)
- : BlockEntryInstr(block_id, try_index),
+ JoinEntryInstr(intptr_t block_id, intptr_t try_index, intptr_t loop_depth)
+ : BlockEntryInstr(block_id, try_index, loop_depth),
predecessors_(2), // Two is the assumed to be the common case.
phis_(NULL),
phi_count_(0) { }
@@ -971,8 +984,8 @@ class PhiIterator : public ValueObject {
class TargetEntryInstr : public BlockEntryInstr {
public:
- TargetEntryInstr(intptr_t block_id, intptr_t try_index)
- : BlockEntryInstr(block_id, try_index),
+ TargetEntryInstr(intptr_t block_id, intptr_t try_index, intptr_t loop_depth)
+ : BlockEntryInstr(block_id, try_index, loop_depth),
predecessor_(NULL),
catch_try_index_(CatchClauseNode::kInvalidTryIndex) { }
« 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