V8 Project
v8::internal::HAliasAnalyzer Class Reference

#include <hydrogen-alias-analysis.h>

+ Inheritance diagram for v8::internal::HAliasAnalyzer:
+ Collaboration diagram for v8::internal::HAliasAnalyzer:

Public Member Functions

HAliasing Query (HValue *a, HValue *b)
 
bool MayAlias (HValue *a, HValue *b)
 
bool MustAlias (HValue *a, HValue *b)
 
bool NoAlias (HValue *a, HValue *b)
 
- 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)
 

Detailed Description

Definition at line 23 of file hydrogen-alias-analysis.h.

Member Function Documentation

◆ MayAlias()

bool v8::internal::HAliasAnalyzer::MayAlias ( HValue a,
HValue b 
)
inline

Definition at line 57 of file hydrogen-alias-analysis.h.

57  {
58  return Query(a, b) != kNoAlias;
59  }
HAliasing Query(HValue *a, HValue *b)

References v8::internal::kNoAlias, and Query().

Referenced by v8::internal::HCheckTable::Kill(), v8::internal::HLoadEliminationTable::KillFieldInternal(), and v8::internal::HStoreEliminationPhase::ProcessLoad().

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

◆ MustAlias()

bool v8::internal::HAliasAnalyzer::MustAlias ( HValue a,
HValue b 
)
inline

Definition at line 61 of file hydrogen-alias-analysis.h.

61  {
62  return Query(a, b) == kMustAlias;
63  }

References v8::internal::kMustAlias, and Query().

Referenced by v8::internal::HCheckTable::Find(), v8::internal::HLoadEliminationTable::Find(), v8::internal::HLoadEliminationTable::FindOrCreate(), and v8::internal::HStoreEliminationPhase::ProcessStore().

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

◆ NoAlias()

bool v8::internal::HAliasAnalyzer::NoAlias ( HValue a,
HValue b 
)
inline

Definition at line 65 of file hydrogen-alias-analysis.h.

65  {
66  return Query(a, b) == kNoAlias;
67  }

References v8::internal::kNoAlias, and Query().

+ Here is the call graph for this function:

◆ Query()

HAliasing v8::internal::HAliasAnalyzer::Query ( HValue a,
HValue b 
)
inline

Definition at line 27 of file hydrogen-alias-analysis.h.

27  {
28  // The same SSA value always references the same object.
29  if (a == b) return kMustAlias;
30 
31  if (a->IsAllocate() || a->IsInnerAllocatedObject()) {
32  // Two non-identical allocations can never be aliases.
33  if (b->IsAllocate()) return kNoAlias;
34  if (b->IsInnerAllocatedObject()) return kNoAlias;
35  // An allocation can never alias a parameter or a constant.
36  if (b->IsParameter()) return kNoAlias;
37  if (b->IsConstant()) return kNoAlias;
38  }
39  if (b->IsAllocate() || b->IsInnerAllocatedObject()) {
40  // An allocation can never alias a parameter or a constant.
41  if (a->IsParameter()) return kNoAlias;
42  if (a->IsConstant()) return kNoAlias;
43  }
44 
45  // Constant objects can be distinguished statically.
46  if (a->IsConstant()) {
47  // TODO(titzer): DataEquals() is more efficient, but that's protected.
48  return a->Equals(b) ? kMustAlias : kNoAlias;
49  }
50  return kMayAlias;
51  }

References v8::internal::HValue::Equals(), v8::internal::kMayAlias, v8::internal::kMustAlias, and v8::internal::kNoAlias.

Referenced by MayAlias(), MustAlias(), and NoAlias().

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

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