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

Side by Side Diff: src/hydrogen.cc

Issue 11575030: For the values defined in the loop and spilled outside sink spill store out of the loop down to loo… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: address comments Created 7 years, 10 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 | « src/hydrogen.h ('k') | src/lithium-allocator.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 } 668 }
669 669
670 670
671 HBasicBlock* HGraphBuilder::CreateLoop(IterationStatement* statement, 671 HBasicBlock* HGraphBuilder::CreateLoop(IterationStatement* statement,
672 HBasicBlock* loop_entry, 672 HBasicBlock* loop_entry,
673 HBasicBlock* body_exit, 673 HBasicBlock* body_exit,
674 HBasicBlock* loop_successor, 674 HBasicBlock* loop_successor,
675 HBasicBlock* break_block) { 675 HBasicBlock* break_block) {
676 if (body_exit != NULL) body_exit->Goto(loop_entry); 676 if (body_exit != NULL) body_exit->Goto(loop_entry);
677 loop_entry->PostProcessLoopHeader(statement); 677 loop_entry->PostProcessLoopHeader(statement);
678
679 HBasicBlock* exit_block = loop_successor;
678 if (break_block != NULL) { 680 if (break_block != NULL) {
679 if (loop_successor != NULL) loop_successor->Goto(break_block); 681 if (loop_successor != NULL) loop_successor->Goto(break_block);
680 break_block->SetJoinId(statement->ExitId()); 682 break_block->SetJoinId(statement->ExitId());
681 return break_block; 683 exit_block = break_block;
682 } 684 }
683 return loop_successor; 685
686 if (loop_entry->IsLoopHeader()) {
687 loop_entry->loop_information()->set_exit_block(exit_block);
688 }
689
690 return exit_block;
684 } 691 }
685 692
686 693
687 void HBasicBlock::FinishExit(HControlInstruction* instruction) { 694 void HBasicBlock::FinishExit(HControlInstruction* instruction) {
688 Finish(instruction); 695 Finish(instruction);
689 ClearEnvironment(); 696 ClearEnvironment();
690 } 697 }
691 698
692 699
693 HGraph::HGraph(CompilationInfo* info) 700 HGraph::HGraph(CompilationInfo* info)
(...skipping 9422 matching lines...) Expand 10 before | Expand all | Expand 10 after
10116 } 10123 }
10117 } 10124 }
10118 10125
10119 #ifdef DEBUG 10126 #ifdef DEBUG
10120 if (graph_ != NULL) graph_->Verify(false); // No full verify. 10127 if (graph_ != NULL) graph_->Verify(false); // No full verify.
10121 if (allocator_ != NULL) allocator_->Verify(); 10128 if (allocator_ != NULL) allocator_->Verify();
10122 #endif 10129 #endif
10123 } 10130 }
10124 10131
10125 } } // namespace v8::internal 10132 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen.h ('k') | src/lithium-allocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698