| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_ | 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_ |
| 6 #define VM_INTERMEDIATE_LANGUAGE_H_ | 6 #define VM_INTERMEDIATE_LANGUAGE_H_ |
| 7 | 7 |
| 8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 9 #include "vm/ast.h" | 9 #include "vm/ast.h" |
| 10 #include "vm/growable_array.h" | 10 #include "vm/growable_array.h" |
| (...skipping 1576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1587 virtual EffectSet Dependencies() const { return EffectSet::None(); } | 1587 virtual EffectSet Dependencies() const { return EffectSet::None(); } |
| 1588 | 1588 |
| 1589 private: | 1589 private: |
| 1590 // Classes that have access to predecessors_ when inlining. | 1590 // Classes that have access to predecessors_ when inlining. |
| 1591 friend class BlockEntryInstr; | 1591 friend class BlockEntryInstr; |
| 1592 friend class InlineExitCollector; | 1592 friend class InlineExitCollector; |
| 1593 friend class PolymorphicInliner; | 1593 friend class PolymorphicInliner; |
| 1594 | 1594 |
| 1595 // Direct access to phis_ in order to resize it due to phi elimination. | 1595 // Direct access to phis_ in order to resize it due to phi elimination. |
| 1596 friend class ConstantPropagator; | 1596 friend class ConstantPropagator; |
| 1597 friend class DeadCodeElimination; |
| 1597 | 1598 |
| 1598 virtual void ClearPredecessors() { predecessors_.Clear(); } | 1599 virtual void ClearPredecessors() { predecessors_.Clear(); } |
| 1599 virtual void AddPredecessor(BlockEntryInstr* predecessor); | 1600 virtual void AddPredecessor(BlockEntryInstr* predecessor); |
| 1600 | 1601 |
| 1601 GrowableArray<BlockEntryInstr*> predecessors_; | 1602 GrowableArray<BlockEntryInstr*> predecessors_; |
| 1602 ZoneGrowableArray<PhiInstr*>* phis_; | 1603 ZoneGrowableArray<PhiInstr*>* phis_; |
| 1603 | 1604 |
| 1604 DISALLOW_COPY_AND_ASSIGN(JoinEntryInstr); | 1605 DISALLOW_COPY_AND_ASSIGN(JoinEntryInstr); |
| 1605 }; | 1606 }; |
| 1606 | 1607 |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1991 BitVector* reaching_defs() const { | 1992 BitVector* reaching_defs() const { |
| 1992 return reaching_defs_; | 1993 return reaching_defs_; |
| 1993 } | 1994 } |
| 1994 | 1995 |
| 1995 void set_reaching_defs(BitVector* reaching_defs) { | 1996 void set_reaching_defs(BitVector* reaching_defs) { |
| 1996 reaching_defs_ = reaching_defs; | 1997 reaching_defs_ = reaching_defs; |
| 1997 } | 1998 } |
| 1998 | 1999 |
| 1999 virtual bool MayThrow() const { return false; } | 2000 virtual bool MayThrow() const { return false; } |
| 2000 | 2001 |
| 2002 // A phi is redundant if all input operands are the same. |
| 2003 bool IsRedundant() const; |
| 2004 |
| 2001 private: | 2005 private: |
| 2002 // Direct access to inputs_ in order to resize it due to unreachable | 2006 // Direct access to inputs_ in order to resize it due to unreachable |
| 2003 // predecessors. | 2007 // predecessors. |
| 2004 friend class ConstantPropagator; | 2008 friend class ConstantPropagator; |
| 2005 | 2009 |
| 2006 void RawSetInputAt(intptr_t i, Value* value) { inputs_[i] = value; } | 2010 void RawSetInputAt(intptr_t i, Value* value) { inputs_[i] = value; } |
| 2007 | 2011 |
| 2008 JoinEntryInstr* block_; | 2012 JoinEntryInstr* block_; |
| 2009 GrowableArray<Value*> inputs_; | 2013 GrowableArray<Value*> inputs_; |
| 2010 bool is_alive_; | 2014 bool is_alive_; |
| (...skipping 5946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7957 ForwardInstructionIterator* current_iterator_; | 7961 ForwardInstructionIterator* current_iterator_; |
| 7958 | 7962 |
| 7959 private: | 7963 private: |
| 7960 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); | 7964 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); |
| 7961 }; | 7965 }; |
| 7962 | 7966 |
| 7963 | 7967 |
| 7964 } // namespace dart | 7968 } // namespace dart |
| 7965 | 7969 |
| 7966 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 7970 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |