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

Unified Diff: runtime/vm/flow_graph_inliner.cc

Issue 2751103003: VM: Propagate non-nullness from instance calls. (Closed)
Patch Set: canonicalize redundant redefinitions Created 3 years, 9 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 | « runtime/vm/flow_graph.cc ('k') | runtime/vm/flow_graph_type_propagator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_inliner.cc
diff --git a/runtime/vm/flow_graph_inliner.cc b/runtime/vm/flow_graph_inliner.cc
index 06f46b987613e3c88c4b307ac997a6479891f5bb..88f3575ff58b73d8ba031aebe22e6822831655a1 100644
--- a/runtime/vm/flow_graph_inliner.cc
+++ b/runtime/vm/flow_graph_inliner.cc
@@ -158,8 +158,12 @@ class GraphInfoCollector : public ValueObject {
block_it.Advance()) {
for (ForwardInstructionIterator it(block_it.Current()); !it.Done();
it.Advance()) {
- ++instruction_count_;
Instruction* current = it.Current();
+ // Don't count instructions that won't generate any code.
+ if (current->IsRedefinition()) {
+ continue;
+ }
+ ++instruction_count_;
if (current->IsInstanceCall() || current->IsStaticCall() ||
current->IsClosureCall()) {
++call_site_count_;
« no previous file with comments | « runtime/vm/flow_graph.cc ('k') | runtime/vm/flow_graph_type_propagator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698