Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
dart::AliasedSet Class Reference
Inheritance diagram for dart::AliasedSet:
dart::ZoneAllocated

Public Types

enum  { kNoAlias = 0 }
 

Public Member Functions

 AliasedSet (Zone *zone, PointerSet< Place > *places_map, ZoneGrowableArray< Place * > *places, PhiPlaceMoves *phi_moves, bool print_traces)
 
intptr_t LookupAliasId (const Place &alias)
 
BitVectorGetKilledSet (intptr_t alias)
 
intptr_t max_place_id () const
 
bool IsEmpty () const
 
BitVectoraliased_by_effects () const
 
const ZoneGrowableArray< Place * > & places () const
 
PlaceLookupCanonical (Place *place) const
 
void PrintSet (BitVector *set)
 
const PhiPlaceMovesphi_moves () const
 
void RollbackAliasedIdentities ()
 
bool CanBeAliased (Definition *alloc)
 
- Public Member Functions inherited from dart::ZoneAllocated
 ZoneAllocated ()
 
void * operator new (size_t size)
 
void * operator new (size_t size, Zone *zone)
 
void operator delete (void *pointer)
 

Detailed Description

Definition at line 736 of file redundancy_elimination.cc.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
kNoAlias 

Definition at line 815 of file redundancy_elimination.cc.

Constructor & Destructor Documentation

◆ AliasedSet()

dart::AliasedSet::AliasedSet ( Zone zone,
PointerSet< Place > *  places_map,
ZoneGrowableArray< Place * > *  places,
PhiPlaceMoves phi_moves,
bool  print_traces 
)
inline

Definition at line 738 of file redundancy_elimination.cc.

743 : zone_(zone),
744 print_traces_(print_traces),
745 places_map_(places_map),
746 places_(*places),
747 phi_moves_(phi_moves),
748 aliases_(5),
749 aliases_map_(),
750 typed_data_access_sizes_(),
751 representatives_(),
752 killed_(),
753 aliased_by_effects_(new(zone) BitVector(zone, places->length())) {
755 zone_, kAnyInstanceAnyIndexAlias));
756 for (intptr_t i = 0; i < places_.length(); i++) {
757 AddRepresentative(places_[i]);
758 }
759 ComputeKillSets();
760 }
const PhiPlaceMoves * phi_moves() const
const ZoneGrowableArray< Place * > & places() const
static Place * CreateAnyInstanceAnyIndexAlias(Zone *zone, intptr_t id)

Member Function Documentation

◆ aliased_by_effects()

BitVector * dart::AliasedSet::aliased_by_effects ( ) const
inline

Definition at line 774 of file redundancy_elimination.cc.

774{ return aliased_by_effects_; }

◆ CanBeAliased()

bool dart::AliasedSet::CanBeAliased ( Definition alloc)
inline

Definition at line 803 of file redundancy_elimination.cc.

803 {
804 if (!Place::IsAllocation(alloc)) {
805 return true;
806 }
807
808 if (alloc->Identity().IsUnknown()) {
809 ComputeAliasing(alloc);
810 }
811
812 return !alloc->Identity().IsNotAliased();
813 }
static bool IsAllocation(Definition *defn)

◆ GetKilledSet()

BitVector * dart::AliasedSet::GetKilledSet ( intptr_t  alias)
inline

Definition at line 767 of file redundancy_elimination.cc.

767 {
768 return (alias < killed_.length()) ? killed_[alias] : nullptr;
769 }

◆ IsEmpty()

bool dart::AliasedSet::IsEmpty ( ) const
inline

Definition at line 772 of file redundancy_elimination.cc.

772{ return max_place_id() == 0; }
intptr_t max_place_id() const

◆ LookupAliasId()

intptr_t dart::AliasedSet::LookupAliasId ( const Place alias)
inline

Definition at line 762 of file redundancy_elimination.cc.

762 {
763 const Place* result = aliases_map_.LookupValue(&alias);
764 return (result != nullptr) ? result->id() : static_cast<intptr_t>(kNoAlias);
765 }
GAsyncResult * result

◆ LookupCanonical()

Place * dart::AliasedSet::LookupCanonical ( Place place) const
inline

Definition at line 778 of file redundancy_elimination.cc.

778 {
779 return places_map_->LookupValue(place);
780 }

◆ max_place_id()

intptr_t dart::AliasedSet::max_place_id ( ) const
inline

Definition at line 771 of file redundancy_elimination.cc.

771{ return places().length(); }

◆ phi_moves()

const PhiPlaceMoves * dart::AliasedSet::phi_moves ( ) const
inline

Definition at line 793 of file redundancy_elimination.cc.

793{ return phi_moves_; }

◆ places()

const ZoneGrowableArray< Place * > & dart::AliasedSet::places ( ) const
inline

Definition at line 776 of file redundancy_elimination.cc.

776{ return places_; }

◆ PrintSet()

void dart::AliasedSet::PrintSet ( BitVector set)
inline

Definition at line 782 of file redundancy_elimination.cc.

782 {
783 bool comma = false;
784 for (BitVector::Iterator it(set); !it.Done(); it.Advance()) {
785 if (comma) {
786 THR_Print(", ");
787 }
788 THR_Print("%s", places_[it.Current()]->ToCString());
789 comma = true;
790 }
791 }
#define THR_Print(format,...)
Definition log.h:20

◆ RollbackAliasedIdentities()

void dart::AliasedSet::RollbackAliasedIdentities ( )
inline

Definition at line 795 of file redundancy_elimination.cc.

795 {
796 for (intptr_t i = 0; i < identity_rollback_.length(); ++i) {
797 identity_rollback_[i]->SetIdentity(AliasIdentity::Unknown());
798 }
799 }
static AliasIdentity Unknown()
Definition il.h:2399

The documentation for this class was generated from the following file: