Index: src/hydrogen.h |
diff --git a/src/hydrogen.h b/src/hydrogen.h |
index aa360594c30910387d2e8314379c6a97349cfcec..71a1b91aa5224d16e5729bbbaed6f6427833e2ba 100644 |
--- a/src/hydrogen.h |
+++ b/src/hydrogen.h |
@@ -68,6 +68,11 @@ class HBasicBlock: public ZoneObject { |
void set_last(HInstruction* instr) { last_ = instr; } |
HControlInstruction* end() const { return end_; } |
HLoopInformation* loop_information() const { return loop_information_; } |
+ HLoopInformation* current_loop() const { |
+ return IsLoopHeader() ? loop_information() |
+ : (parent_loop_header() != NULL |
+ ? parent_loop_header()->loop_information() : NULL); |
+ } |
const ZoneList<HBasicBlock*>* predecessors() const { return &predecessors_; } |
bool HasPredecessor() const { return predecessors_.length() > 0; } |
const ZoneList<HBasicBlock*>* dominated_blocks() const { |
@@ -251,6 +256,20 @@ class HLoopInformation: public ZoneObject { |
stack_check_ = stack_check; |
} |
+ bool IsNestedInThisLoop(HLoopInformation* other) { |
+ while (other != NULL) { |
+ if (other == this) { |
+ return true; |
+ } |
+ other = other->parent_loop(); |
+ } |
+ return false; |
+ } |
+ HLoopInformation* parent_loop() { |
+ HBasicBlock* parent_header = loop_header()->parent_loop_header(); |
+ return parent_header != NULL ? parent_header->loop_information() : NULL; |
+ } |
+ |
private: |
void AddBlock(HBasicBlock* block); |
@@ -262,6 +281,7 @@ class HLoopInformation: public ZoneObject { |
class BoundsCheckTable; |
+class InductionVariableBlocksTable; |
class HGraph: public ZoneObject { |
public: |
explicit HGraph(CompilationInfo* info); |
@@ -446,6 +466,13 @@ class HGraph: public ZoneObject { |
void SetupInformativeDefinitionsInBlock(HBasicBlock* block); |
void SetupInformativeDefinitionsRecursively(HBasicBlock* block); |
void EliminateRedundantBoundsChecks(HBasicBlock* bb, BoundsCheckTable* table); |
+ void EliminateRedundantBoundsChecksUsingInductionVariables(); |
+ void CollectInductionVariableData(HBasicBlock* bb, |
titzer
2013/07/02 13:45:06
I think you can move two of these methods to live
|
+ InductionVariableBlocksTable* table); |
+ void EliminateRedundantBoundsChecksUsingInductionVariables( |
+ HBasicBlock* bb, |
+ InductionVariableBlocksTable* table); |
+ void NewJoke(); |
titzer
2013/07/02 13:45:06
Was ist das?
Massi
2013/07/08 11:55:07
Debugging leftover :-)
|
Isolate* isolate_; |
int next_block_id_; |