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

Unified Diff: src/hydrogen.h

Issue 17568015: New array bounds check elimination pass (focused on induction variables and bitwise operations). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Switched flag to false by default. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/flag-definitions.h ('k') | 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 f1962fe1c4fb06d4bfb2bcef13cdb72dbb90e201..44166befe3d5cf3f7073e046eaffdd5aa53704ab 100644
--- a/src/hydrogen.h
+++ b/src/hydrogen.h
@@ -69,6 +69,11 @@ class HBasicBlock: public ZoneObject {
void set_last(HInstruction* instr) { last_ = instr; }
HControlInstruction* end() const { return end_; }
HLoopInformation* loop_information() const { return loop_information_; }
+ HLoopInformation* current_loop() const {
+ return IsLoopHeader() ? loop_information()
+ : (parent_loop_header() != NULL
+ ? parent_loop_header()->loop_information() : NULL);
+ }
const ZoneList<HBasicBlock*>* predecessors() const { return &predecessors_; }
bool HasPredecessor() const { return predecessors_.length() > 0; }
const ZoneList<HBasicBlock*>* dominated_blocks() const {
@@ -271,6 +276,20 @@ class HLoopInformation: public ZoneObject {
stack_check_ = stack_check;
}
+ bool IsNestedInThisLoop(HLoopInformation* other) {
+ while (other != NULL) {
+ if (other == this) {
+ return true;
+ }
+ other = other->parent_loop();
+ }
+ return false;
+ }
+ HLoopInformation* parent_loop() {
+ HBasicBlock* parent_header = loop_header()->parent_loop_header();
+ return parent_header != NULL ? parent_header->loop_information() : NULL;
+ }
+
private:
void AddBlock(HBasicBlock* block);
@@ -282,6 +301,7 @@ class HLoopInformation: public ZoneObject {
class BoundsCheckTable;
+class InductionVariableBlocksTable;
class HGraph: public ZoneObject {
public:
explicit HGraph(CompilationInfo* info);
@@ -448,6 +468,7 @@ class HGraph: public ZoneObject {
void CheckForBackEdge(HBasicBlock* block, HBasicBlock* successor);
void SetupInformativeDefinitionsInBlock(HBasicBlock* block);
void SetupInformativeDefinitionsRecursively(HBasicBlock* block);
+ void EliminateRedundantBoundsChecksUsingInductionVariables();
Isolate* isolate_;
int next_block_id_;
« no previous file with comments | « src/flag-definitions.h ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698