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

Unified Diff: runtime/vm/intermediate_language.h

Issue 285483002: More general dead phi elimination. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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
Index: runtime/vm/intermediate_language.h
===================================================================
--- runtime/vm/intermediate_language.h (revision 35967)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -1594,6 +1594,7 @@
// Direct access to phis_ in order to resize it due to phi elimination.
friend class ConstantPropagator;
+ friend class DeadCodeElimination;
virtual void ClearPredecessors() { predecessors_.Clear(); }
virtual void AddPredecessor(BlockEntryInstr* predecessor);
@@ -1998,6 +1999,9 @@
virtual bool MayThrow() const { return false; }
+ // A phi is redundant if all input operands are the same.
+ bool IsRedundant() const;
+
private:
// Direct access to inputs_ in order to resize it due to unreachable
// predecessors.

Powered by Google App Engine
This is Rietveld 408576698