| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 612 return AllowCodeMotion() && !instr->block()->IsDeoptimizing(); | 612 return AllowCodeMotion() && !instr->block()->IsDeoptimizing(); |
| 613 } | 613 } |
| 614 | 614 |
| 615 | 615 |
| 616 GVNFlagSet | 616 GVNFlagSet |
| 617 HGlobalValueNumberingPhase::CollectSideEffectsOnPathsToDominatedBlock( | 617 HGlobalValueNumberingPhase::CollectSideEffectsOnPathsToDominatedBlock( |
| 618 HBasicBlock* dominator, HBasicBlock* dominated) { | 618 HBasicBlock* dominator, HBasicBlock* dominated) { |
| 619 GVNFlagSet side_effects; | 619 GVNFlagSet side_effects; |
| 620 for (int i = 0; i < dominated->predecessors()->length(); ++i) { | 620 for (int i = 0; i < dominated->predecessors()->length(); ++i) { |
| 621 HBasicBlock* block = dominated->predecessors()->at(i); | 621 HBasicBlock* block = dominated->predecessors()->at(i); |
| 622 if (dominator->block_id() < block->block_id() && | 622 if (dominator->block_id() <= block->block_id() && |
| 623 block->block_id() < dominated->block_id() && | 623 block->block_id() < dominated->block_id() && |
| 624 visited_on_paths_.Add(block->block_id())) { | 624 visited_on_paths_.Add(block->block_id())) { |
| 625 side_effects.Add(block_side_effects_[block->block_id()]); | 625 side_effects.Add(block_side_effects_[block->block_id()]); |
| 626 if (block->IsLoopHeader()) { | 626 if (block->IsLoopHeader()) { |
| 627 side_effects.Add(loop_side_effects_[block->block_id()]); | 627 side_effects.Add(loop_side_effects_[block->block_id()]); |
| 628 } | 628 } |
| 629 side_effects.Add(CollectSideEffectsOnPathsToDominatedBlock( | 629 side_effects.Add(CollectSideEffectsOnPathsToDominatedBlock( |
| 630 dominator, block)); | 630 dominator, block)); |
| 631 } | 631 } |
| 632 } | 632 } |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 848 dominated); | 848 dominated); |
| 849 successor_map->Kill(side_effects_on_all_paths); | 849 successor_map->Kill(side_effects_on_all_paths); |
| 850 successor_dominators->Kill(side_effects_on_all_paths); | 850 successor_dominators->Kill(side_effects_on_all_paths); |
| 851 } | 851 } |
| 852 } | 852 } |
| 853 current = next; | 853 current = next; |
| 854 } | 854 } |
| 855 } | 855 } |
| 856 | 856 |
| 857 } } // namespace v8::internal | 857 } } // namespace v8::internal |
| OLD | NEW |