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

Unified Diff: src/hydrogen.h

Issue 11414201: Make HJSArrayLength more likely to have identical GVNs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 1 month 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') | src/hydrogen.cc » ('J')
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..b2e3fa7f8c64457eb1d2a9c677ddf236e6f85996 100644
--- a/src/hydrogen.h
+++ b/src/hydrogen.h
@@ -370,6 +370,17 @@ class HGraph: public ZoneObject {
uint32_instructions_->Add(instr, zone());
}
+ // We record all HJSArrayLength instructions to process them later.
+ void RecordJSArrayLength(HJSArrayLength* inst) {
+ array_lengths_.Add(inst, zone());
+ }
+ // To make it likely that GVN will match two HJSArrayLength instructions
+ // we need to make sure that they depend on the same map check and that
+ // they have the same type (hopefully Smi and not Tagged).
+ // In this method we group all HJSArrayLength insts by the array they
+ // operate on and try to make the checks uniform in each group.
+ void ProcessJSArrayLengths();
+
private:
HConstant* GetConstant(SetOncePointer<HConstant>* pointer,
Handle<Object> value);
@@ -397,6 +408,7 @@ class HGraph: public ZoneObject {
ZoneList<HBasicBlock*> blocks_;
ZoneList<HValue*> values_;
ZoneList<HPhi*>* phi_list_;
+ ZoneList<HJSArrayLength*> array_lengths_;
ZoneList<HInstruction*>* uint32_instructions_;
SetOncePointer<HConstant> undefined_constant_;
SetOncePointer<HConstant> constant_1_;
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | src/hydrogen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698