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

Unified Diff: src/hydrogen.h

Issue 14046017: Abcd for performance check. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased on bleeding edge. Created 7 years, 7 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 b053fc71c5fc33fbd449da41eadfb18e5cb4db4f..1b5faf0d4b5e09fa236edaf56af7745c7f1e5631 100644
--- a/src/hydrogen.h
+++ b/src/hydrogen.h
@@ -70,6 +70,11 @@ class HBasicBlock: public ZoneObject {
HInstruction* GetLastInstruction();
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 {
@@ -227,7 +232,8 @@ class HLoopInformation: public ZoneObject {
: back_edges_(4, zone),
loop_header_(loop_header),
blocks_(8, zone),
- stack_check_(NULL) {
+ stack_check_(NULL),
+ exits_count_(0) {
blocks_.Add(loop_header, zone);
}
virtual ~HLoopInformation() {}
@@ -243,6 +249,23 @@ class HLoopInformation: public ZoneObject {
stack_check_ = stack_check;
}
+ int exits_count() { return exits_count_; }
+ HLoopInformation* parent_loop() {
+ HBasicBlock* parent_header = loop_header()->parent_loop_header();
+ return parent_header != NULL ? parent_header->loop_information() : NULL;
+ }
+ bool IsNestedInThisLoop(HLoopInformation* other) {
+ while (other != NULL) {
+ if (other == this) {
+ return true;
+ }
+ other = other->parent_loop();
+ }
+ return false;
+ }
+ void ProcessEdge(HBasicBlock* destination);
+ void ProcessThrow();
+
private:
void AddBlock(HBasicBlock* block);
@@ -250,6 +273,7 @@ class HLoopInformation: public ZoneObject {
HBasicBlock* loop_header_;
ZoneList<HBasicBlock*> blocks_;
HStackCheck* stack_check_;
+ int exits_count_;
};
class BoundsCheckTable;
@@ -267,6 +291,33 @@ class HGraph: public ZoneObject {
HEnvironment* start_environment() const { return start_environment_; }
void FinalizeUniqueValueIds();
+
+ bool HasRelationBeenEvaluated(HValue* value,
+ NumericRelation relation,
+ HValue* other_value,
+ int offset,
+ int scale,
+ HBasicBlock* block,
+ bool* result) {
+ return evaluated_relations_table_.IsInTable(
+ value->id(), relation, other_value->id(),
+ offset, scale, block->block_id(), result);
+ }
+ void AddRelationToTable(HValue* value,
+ NumericRelation relation,
+ HValue* other_value,
+ int offset,
+ int scale,
+ HBasicBlock* block,
+ bool result) {
+ evaluated_relations_table_.AddToTable(
+ value->id(), relation, other_value->id(),
+ offset, scale, block->block_id(), result);
+ }
+ void ClearRelationsTable() {
+ evaluated_relations_table_.Clear();
+ }
+
void InitializeInferredTypes();
void InsertTypeConversions();
void MergeRemovableSimulates();
@@ -427,6 +478,8 @@ class HGraph: public ZoneObject {
void SetupInformativeDefinitionsInBlock(HBasicBlock* block);
void SetupInformativeDefinitionsRecursively(HBasicBlock* block);
void EliminateRedundantBoundsChecks(HBasicBlock* bb, BoundsCheckTable* table);
+ void EliminateRedundantBoundsChecksUsingIdefs(HBasicBlock* bb);
+ void ApplyBoundsChecksIndexChanges(HBasicBlock* bb);
Isolate* isolate_;
int next_block_id_;
@@ -455,6 +508,8 @@ class HGraph: public ZoneObject {
CompilationInfo* info_;
Zone* zone_;
+ NumericRelationTable evaluated_relations_table_;
+
bool is_recursive_;
bool use_optimistic_licm_;
bool has_soft_deoptimize_;
« 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