| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/crankshaft/hydrogen-gvn.h" | 5 #include "src/crankshaft/hydrogen-gvn.h" |
| 6 | 6 |
| 7 #include "src/crankshaft/hydrogen.h" | 7 #include "src/crankshaft/hydrogen.h" |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| (...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 667 return side_effects; | 667 return side_effects; |
| 668 } | 668 } |
| 669 | 669 |
| 670 | 670 |
| 671 // Each instance of this class is like a "stack frame" for the recursive | 671 // Each instance of this class is like a "stack frame" for the recursive |
| 672 // traversal of the dominator tree done during GVN (the stack is handled | 672 // traversal of the dominator tree done during GVN (the stack is handled |
| 673 // as a double linked list). | 673 // as a double linked list). |
| 674 // We reuse frames when possible so the list length is limited by the depth | 674 // We reuse frames when possible so the list length is limited by the depth |
| 675 // of the dominator tree but this forces us to initialize each frame calling | 675 // of the dominator tree but this forces us to initialize each frame calling |
| 676 // an explicit "Initialize" method instead of a using constructor. | 676 // an explicit "Initialize" method instead of a using constructor. |
| 677 class GvnBasicBlockState: public ZoneObject { | 677 class GvnBasicBlockState : public ZoneObject { |
| 678 public: | 678 public: |
| 679 static GvnBasicBlockState* CreateEntry(Zone* zone, | 679 static GvnBasicBlockState* CreateEntry(Zone* zone, |
| 680 HBasicBlock* entry_block, | 680 HBasicBlock* entry_block, |
| 681 HInstructionMap* entry_map) { | 681 HInstructionMap* entry_map) { |
| 682 return new(zone) | 682 return new(zone) |
| 683 GvnBasicBlockState(NULL, entry_block, entry_map, NULL, zone); | 683 GvnBasicBlockState(NULL, entry_block, entry_map, NULL, zone); |
| 684 } | 684 } |
| 685 | 685 |
| 686 HBasicBlock* block() { return block_; } | 686 HBasicBlock* block() { return block_; } |
| 687 HInstructionMap* map() { return map_; } | 687 HInstructionMap* map() { return map_; } |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 885 successor_map->Kill(side_effects_on_all_paths); | 885 successor_map->Kill(side_effects_on_all_paths); |
| 886 successor_dominators->Kill(side_effects_on_all_paths); | 886 successor_dominators->Kill(side_effects_on_all_paths); |
| 887 } | 887 } |
| 888 } | 888 } |
| 889 current = next; | 889 current = next; |
| 890 } | 890 } |
| 891 } | 891 } |
| 892 | 892 |
| 893 } // namespace internal | 893 } // namespace internal |
| 894 } // namespace v8 | 894 } // namespace v8 |
| OLD | NEW |