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

Unified Diff: runtime/vm/flow_graph_type_propagator.cc

Issue 12340108: Remove dead phis as soon as they are discovered. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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
Index: runtime/vm/flow_graph_type_propagator.cc
diff --git a/runtime/vm/flow_graph_type_propagator.cc b/runtime/vm/flow_graph_type_propagator.cc
index 4f4fb03f094e33112edc00b7ca03ce64b4ead94f..9c3245890912f9e980da0f94961b88b2f2948e2a 100644
--- a/runtime/vm/flow_graph_type_propagator.cc
+++ b/runtime/vm/flow_graph_type_propagator.cc
@@ -172,9 +172,7 @@ void FlowGraphTypePropagator::VisitValue(Value* value) {
void FlowGraphTypePropagator::VisitJoinEntry(JoinEntryInstr* join) {
for (PhiIterator it(join); !it.Done(); it.Advance()) {
- if (it.Current()->is_alive()) {
- worklist_.Add(it.Current());
- }
+ worklist_.Add(it.Current());
}
}
@@ -528,12 +526,7 @@ CompileType PhiInstr::ComputeType() const {
bool PhiInstr::RecomputeType() {
- if (!is_alive()) {
- return false;
- }
-
CompileType result = CompileType::None();
-
for (intptr_t i = 0; i < InputCount(); i++) {
if (FLAG_trace_type_propagation) {
OS::Print(" phi %"Pd" input %"Pd": v%"Pd" has reaching type %s\n",

Powered by Google App Engine
This is Rietveld 408576698