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

Public Member Functions

HBasicBlock * block ()
 
HInstructionMap * map ()
 
HSideEffectMap * dominators ()
 
GvnBasicBlockStatenext_in_dominator_tree_traversal (Zone *zone, HBasicBlock **dominator)
 
- 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)
 

Static Public Member Functions

static GvnBasicBlockStateCreateEntry (Zone *zone, HBasicBlock *entry_block, HInstructionMap *entry_map)
 

Private Member Functions

void Initialize (HBasicBlock *block, HInstructionMap *map, HSideEffectMap *dominators, bool copy_map, Zone *zone)
 
bool is_done ()
 
 GvnBasicBlockState (GvnBasicBlockState *previous, HBasicBlock *block, HInstructionMap *map, HSideEffectMap *dominators, Zone *zone)
 
GvnBasicBlockStatenext_dominated (Zone *zone)
 
GvnBasicBlockStatepush (Zone *zone, HBasicBlock *block)
 
GvnBasicBlockStatepop ()
 

Private Attributes

GvnBasicBlockStateprevious_
 
GvnBasicBlockStatenext_
 
HBasicBlock * block_
 
HInstructionMap * map_
 
HSideEffectMap dominators_
 
int dominated_index_
 
int length_
 

Detailed Description

Definition at line 674 of file hydrogen-gvn.cc.

Constructor & Destructor Documentation

◆ GvnBasicBlockState()

v8::internal::GvnBasicBlockState::GvnBasicBlockState ( GvnBasicBlockState previous,
HBasicBlock *  block,
HInstructionMap *  map,
HSideEffectMap *  dominators,
Zone zone 
)
inlineprivate

Definition at line 725 of file hydrogen-gvn.cc.

730  : previous_(previous), next_(NULL) {
731  Initialize(block, map, dominators, true, zone);
732  }
GvnBasicBlockState * previous_
void Initialize(HBasicBlock *block, HInstructionMap *map, HSideEffectMap *dominators, bool copy_map, Zone *zone)
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL

References block(), dominators(), Initialize(), and map().

Referenced by CreateEntry(), and push().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Function Documentation

◆ block()

HBasicBlock* v8::internal::GvnBasicBlockState::block ( )
inline

Definition at line 683 of file hydrogen-gvn.cc.

683 { return block_; }

References block_.

Referenced by GvnBasicBlockState(), Initialize(), next_in_dominator_tree_traversal(), pop(), and push().

+ Here is the caller graph for this function:

◆ CreateEntry()

static GvnBasicBlockState* v8::internal::GvnBasicBlockState::CreateEntry ( Zone zone,
HBasicBlock *  entry_block,
HInstructionMap *  entry_map 
)
inlinestatic

Definition at line 676 of file hydrogen-gvn.cc.

678  {
679  return new(zone)
680  GvnBasicBlockState(NULL, entry_block, entry_map, NULL, zone);
681  }
GvnBasicBlockState(GvnBasicBlockState *previous, HBasicBlock *block, HInstructionMap *map, HSideEffectMap *dominators, Zone *zone)

References GvnBasicBlockState(), and NULL.

+ Here is the call graph for this function:

◆ dominators()

HSideEffectMap* v8::internal::GvnBasicBlockState::dominators ( )
inline

Definition at line 685 of file hydrogen-gvn.cc.

685 { return &dominators_; }

References dominators_.

Referenced by GvnBasicBlockState(), Initialize(), next_dominated(), and push().

+ Here is the caller graph for this function:

◆ Initialize()

void v8::internal::GvnBasicBlockState::Initialize ( HBasicBlock *  block,
HInstructionMap *  map,
HSideEffectMap *  dominators,
bool  copy_map,
Zone zone 
)
inlineprivate

Definition at line 710 of file hydrogen-gvn.cc.

714  {
715  block_ = block;
716  map_ = copy_map ? map->Copy(zone) : map;
717  dominated_index_ = -1;
718  length_ = block->dominated_blocks()->length();
719  if (dominators != NULL) {
721  }
722  }

References block(), block_, dominated_index_, dominators(), dominators_, length_, map(), map_, and NULL.

Referenced by GvnBasicBlockState(), next_dominated(), and push().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ is_done()

bool v8::internal::GvnBasicBlockState::is_done ( )
inlineprivate

Definition at line 723 of file hydrogen-gvn.cc.

723 { return dominated_index_ >= length_; }

References dominated_index_, and length_.

Referenced by pop().

+ Here is the caller graph for this function:

◆ map()

HInstructionMap* v8::internal::GvnBasicBlockState::map ( )
inline

Definition at line 684 of file hydrogen-gvn.cc.

684 { return map_; }

References map_.

Referenced by GvnBasicBlockState(), Initialize(), next_dominated(), and push().

+ Here is the caller graph for this function:

◆ next_dominated()

GvnBasicBlockState* v8::internal::GvnBasicBlockState::next_dominated ( Zone zone)
inlineprivate

Definition at line 734 of file hydrogen-gvn.cc.

734  {
736  if (dominated_index_ == length_ - 1) {
737  // No need to copy the map for the last child in the dominator tree.
738  Initialize(block_->dominated_blocks()->at(dominated_index_),
739  map(),
740  dominators(),
741  false,
742  zone);
743  return this;
744  } else if (dominated_index_ < length_) {
745  return push(zone, block_->dominated_blocks()->at(dominated_index_));
746  } else {
747  return NULL;
748  }
749  }
GvnBasicBlockState * push(Zone *zone, HBasicBlock *block)

References block_, dominated_index_, dominators(), Initialize(), length_, map(), NULL, and push().

Referenced by next_in_dominator_tree_traversal().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ next_in_dominator_tree_traversal()

GvnBasicBlockState* v8::internal::GvnBasicBlockState::next_in_dominator_tree_traversal ( Zone zone,
HBasicBlock **  dominator 
)
inline

Definition at line 687 of file hydrogen-gvn.cc.

689  {
690  // This assignment needs to happen before calling next_dominated() because
691  // that call can reuse "this" if we are at the last dominated block.
692  *dominator = block();
693  GvnBasicBlockState* result = next_dominated(zone);
694  if (result == NULL) {
695  GvnBasicBlockState* dominator_state = pop();
696  if (dominator_state != NULL) {
697  // This branch is guaranteed not to return NULL because pop() never
698  // returns a state where "is_done() == true".
699  *dominator = dominator_state->block();
700  result = dominator_state->next_dominated(zone);
701  } else {
702  // Unnecessary (we are returning NULL) but done for cleanness.
703  *dominator = NULL;
704  }
705  }
706  return result;
707  }
GvnBasicBlockState * next_dominated(Zone *zone)
GvnBasicBlockState * pop()

References block(), next_dominated(), NULL, and pop().

+ Here is the call graph for this function:

◆ pop()

GvnBasicBlockState* v8::internal::GvnBasicBlockState::pop ( )
inlineprivate

Definition at line 760 of file hydrogen-gvn.cc.

760  {
761  GvnBasicBlockState* result = previous_;
762  while (result != NULL && result->is_done()) {
763  TRACE_GVN_2("Backtracking from block B%d to block b%d\n",
764  block()->block_id(),
765  previous_->block()->block_id())
766  result = result->previous_;
767  }
768  return result;
769  }
#define TRACE_GVN_2(msg, a1, a2)

References block(), is_done(), NULL, previous_, and TRACE_GVN_2.

Referenced by next_in_dominator_tree_traversal().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ push()

GvnBasicBlockState* v8::internal::GvnBasicBlockState::push ( Zone zone,
HBasicBlock *  block 
)
inlineprivate

Definition at line 751 of file hydrogen-gvn.cc.

751  {
752  if (next_ == NULL) {
753  next_ =
754  new(zone) GvnBasicBlockState(this, block, map(), dominators(), zone);
755  } else {
756  next_->Initialize(block, map(), dominators(), true, zone);
757  }
758  return next_;
759  }

References block(), dominators(), GvnBasicBlockState(), Initialize(), map(), next_, and NULL.

Referenced by next_dominated().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ block_

HBasicBlock* v8::internal::GvnBasicBlockState::block_
private

Definition at line 773 of file hydrogen-gvn.cc.

Referenced by block(), Initialize(), and next_dominated().

◆ dominated_index_

int v8::internal::GvnBasicBlockState::dominated_index_
private

Definition at line 776 of file hydrogen-gvn.cc.

Referenced by Initialize(), is_done(), and next_dominated().

◆ dominators_

HSideEffectMap v8::internal::GvnBasicBlockState::dominators_
private

Definition at line 775 of file hydrogen-gvn.cc.

Referenced by dominators(), and Initialize().

◆ length_

int v8::internal::GvnBasicBlockState::length_
private

Definition at line 777 of file hydrogen-gvn.cc.

Referenced by Initialize(), is_done(), and next_dominated().

◆ map_

HInstructionMap* v8::internal::GvnBasicBlockState::map_
private

Definition at line 774 of file hydrogen-gvn.cc.

Referenced by Initialize(), and map().

◆ next_

GvnBasicBlockState* v8::internal::GvnBasicBlockState::next_
private

Definition at line 772 of file hydrogen-gvn.cc.

Referenced by push().

◆ previous_

GvnBasicBlockState* v8::internal::GvnBasicBlockState::previous_
private

Definition at line 771 of file hydrogen-gvn.cc.

Referenced by pop().


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