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

Side by Side Diff: src/hydrogen-gvn.cc

Issue 18254008: Collect side effects on paths to dominated block including the dominator. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | test/mjsunit/allocation-folding.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/allocation-folding.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698