| Index: src/hydrogen.h
|
| diff --git a/src/hydrogen.h b/src/hydrogen.h
|
| index aa360594c30910387d2e8314379c6a97349cfcec..86feaf19fb3ab9277419d735daf95f6c1c1e1aab 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,7 @@ class HGraph: public ZoneObject {
|
| void SetupInformativeDefinitionsInBlock(HBasicBlock* block);
|
| void SetupInformativeDefinitionsRecursively(HBasicBlock* block);
|
| void EliminateRedundantBoundsChecks(HBasicBlock* bb, BoundsCheckTable* table);
|
| + void EliminateRedundantBoundsChecksUsingInductionVariables();
|
|
|
| Isolate* isolate_;
|
| int next_block_id_;
|
|
|