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

Unified Diff: src/crankshaft/hydrogen.cc

Issue 1860123003: [compiler] Remove CompilationInfo::opt_count field. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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/crankshaft/hydrogen.h ('k') | src/crankshaft/hydrogen-gvn.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/hydrogen.cc
diff --git a/src/crankshaft/hydrogen.cc b/src/crankshaft/hydrogen.cc
index 38a9fd0ad88425776d69b9485ac0ea852c81d91d..e1b9ba77070fadc0e0a04cb0a9216e2b97632c34 100644
--- a/src/crankshaft/hydrogen.cc
+++ b/src/crankshaft/hydrogen.cc
@@ -3599,7 +3599,6 @@ std::ostream& operator<<(std::ostream& os, const HBasicBlock& b) {
return os << "B" << b.block_id();
}
-
HGraph::HGraph(CompilationInfo* info, CallInterfaceDescriptor descriptor)
: isolate_(info->isolate()),
next_block_id_(0),
@@ -3612,6 +3611,7 @@ HGraph::HGraph(CompilationInfo* info, CallInterfaceDescriptor descriptor)
info_(info),
descriptor_(descriptor),
zone_(info->zone()),
+ allow_code_motion_(false),
use_optimistic_licm_(false),
depends_on_empty_array_proto_elements_(false),
type_change_checksum_(0),
@@ -4445,6 +4445,11 @@ bool HOptimizedGraphBuilder::BuildGraph() {
!type_info->matches_inlined_type_change_checksum(composite_checksum));
type_info->set_inlined_type_change_checksum(composite_checksum);
+ // Set this predicate early to avoid handle deref during graph optimization.
+ graph()->set_allow_code_motion(
+ current_info()->IsStub() ||
+ current_info()->shared_info()->opt_count() + 1 < FLAG_max_opt_count);
+
// Perform any necessary OSR-specific cleanups or changes to the graph.
osr()->FinishGraph();
« no previous file with comments | « src/crankshaft/hydrogen.h ('k') | src/crankshaft/hydrogen-gvn.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698