V8 Project
v8::internal::HLoadEliminationEffects Class Reference
+ Inheritance diagram for v8::internal::HLoadEliminationEffects:
+ Collaboration diagram for v8::internal::HLoadEliminationEffects:

Public Member Functions

 HLoadEliminationEffects (Zone *zone)
 
bool Disabled ()
 
void Process (HInstruction *instr, Zone *zone)
 
void Apply (HLoadEliminationTable *table)
 
void Union (HLoadEliminationEffects *that, Zone *zone)
 
- Public Member Functions inherited from v8::internal::ZoneObject
 INLINE (void *operator new(size_t size, Zone *zone))
 
void operator delete (void *, size_t)
 
void operator delete (void *pointer, Zone *zone)
 

Private Attributes

Zonezone_
 
GVNFlagSet flags_
 
ZoneList< HStoreNamedField * > stores_
 

Detailed Description

Definition at line 436 of file hydrogen-load-elimination.cc.

Constructor & Destructor Documentation

◆ HLoadEliminationEffects()

v8::internal::HLoadEliminationEffects::HLoadEliminationEffects ( Zone zone)
inlineexplicit

Definition at line 438 of file hydrogen-load-elimination.cc.

Member Function Documentation

◆ Apply()

void v8::internal::HLoadEliminationEffects::Apply ( HLoadEliminationTable table)
inline

Definition at line 455 of file hydrogen-load-elimination.cc.

455  {
456  // Loads must not be hoisted past the OSR entry, therefore we kill
457  // everything if we see an OSR entry.
458  if (flags_.Contains(kInobjectFields) || flags_.Contains(kOsrEntries)) {
459  table->Kill();
460  return;
461  }
462  if (flags_.Contains(kElementsKind) || flags_.Contains(kMaps)) {
463  table->KillOffset(JSObject::kMapOffset);
464  }
465  if (flags_.Contains(kElementsKind) || flags_.Contains(kElementsPointer)) {
466  table->KillOffset(JSObject::kElementsOffset);
467  }
468 
469  // Kill non-agreeing fields for each store contained in these effects.
470  for (int i = 0; i < stores_.length(); i++) {
471  table->KillStore(stores_[i]);
472  }
473  }
bool Contains(E element) const
Definition: utils.h:851
static const int kMapOffset
Definition: objects.h:1427
static const int kElementsOffset
Definition: objects.h:2194

References v8::internal::EnumSet< E, T >::Contains(), flags_, v8::internal::JSObject::kElementsOffset, v8::internal::HLoadEliminationTable::Kill(), v8::internal::HLoadEliminationTable::KillOffset(), v8::internal::HLoadEliminationTable::KillStore(), v8::internal::HeapObject::kMapOffset, and stores_.

+ Here is the call graph for this function:

◆ Disabled()

bool v8::internal::HLoadEliminationEffects::Disabled ( )
inline

Definition at line 441 of file hydrogen-load-elimination.cc.

441  {
442  return false; // Effects are _not_ disabled.
443  }

◆ Process()

void v8::internal::HLoadEliminationEffects::Process ( HInstruction instr,
Zone zone 
)
inline

Definition at line 446 of file hydrogen-load-elimination.cc.

446  {
447  if (instr->IsStoreNamedField()) {
448  stores_.Add(HStoreNamedField::cast(instr), zone_);
449  } else {
450  flags_.Add(instr->ChangesFlags());
451  }
452  }
void Add(E element)
Definition: utils.h:855
void Add(const T &element, AllocationPolicy allocator=AllocationPolicy())
Definition: list-inl.h:17

References v8::internal::List< T, AllocationPolicy >::Add(), v8::internal::EnumSet< E, T >::Add(), v8::internal::HValue::ChangesFlags(), flags_, stores_, and zone_.

+ Here is the call graph for this function:

◆ Union()

void v8::internal::HLoadEliminationEffects::Union ( HLoadEliminationEffects that,
Zone zone 
)
inline

Definition at line 476 of file hydrogen-load-elimination.cc.

476  {
477  flags_.Add(that->flags_);
478  for (int i = 0; i < that->stores_.length(); i++) {
479  stores_.Add(that->stores_[i], zone);
480  }
481  }

References v8::internal::List< T, AllocationPolicy >::Add(), v8::internal::EnumSet< E, T >::Add(), flags_, and stores_.

+ Here is the call graph for this function:

Member Data Documentation

◆ flags_

GVNFlagSet v8::internal::HLoadEliminationEffects::flags_
private

Definition at line 485 of file hydrogen-load-elimination.cc.

Referenced by Apply(), Process(), and Union().

◆ stores_

ZoneList<HStoreNamedField*> v8::internal::HLoadEliminationEffects::stores_
private

Definition at line 486 of file hydrogen-load-elimination.cc.

Referenced by Apply(), Process(), and Union().

◆ zone_

Zone* v8::internal::HLoadEliminationEffects::zone_
private

Definition at line 484 of file hydrogen-load-elimination.cc.

Referenced by Process().


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