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

Unified Diff: src/hydrogen.h

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, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.h
diff --git a/src/hydrogen.h b/src/hydrogen.h
index 98b05d147a290d67e10cbe57daae8bc2f73b02ea..687e4c6adad56a5cd697b27096725e8f3e5e4dca 100644
--- a/src/hydrogen.h
+++ b/src/hydrogen.h
@@ -118,6 +118,12 @@ class HBasicBlock: public ZoneObject {
bool HasParentLoopHeader() const { return parent_loop_header_ != NULL; }
+ // Returns header of the innermost loop containing this block.
+ // Returns the block itself if it is a loop header.
+ HBasicBlock* LoopHeader() {
+ return IsLoopHeader() ? this : parent_loop_header();
+ }
+
void SetJoinId(BailoutId ast_id);
void Finish(HControlInstruction* last);
@@ -217,7 +223,8 @@ class HLoopInformation: public ZoneObject {
: back_edges_(4, zone),
loop_header_(loop_header),
blocks_(8, zone),
- stack_check_(NULL) {
+ stack_check_(NULL),
+ exit_block_(NULL) {
blocks_.Add(loop_header, zone);
}
virtual ~HLoopInformation() {}
@@ -233,6 +240,9 @@ class HLoopInformation: public ZoneObject {
stack_check_ = stack_check;
}
+ HBasicBlock* exit_block() const { return exit_block_; }
+ void set_exit_block(HBasicBlock* block) { exit_block_ = block; }
+
private:
void AddBlock(HBasicBlock* block);
@@ -240,6 +250,7 @@ class HLoopInformation: public ZoneObject {
HBasicBlock* loop_header_;
ZoneList<HBasicBlock*> blocks_;
HStackCheck* stack_check_;
+ HBasicBlock* exit_block_;
};
class BoundsCheckTable;
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698