#include <hydrogen-canonicalize.h>
Definition at line 14 of file hydrogen-canonicalize.h.
◆ HCanonicalizePhase()
v8::internal::HCanonicalizePhase::HCanonicalizePhase |
( |
HGraph * |
graph | ) |
|
|
inlineexplicit |
◆ DISALLOW_COPY_AND_ASSIGN()
◆ Run()
void v8::internal::HCanonicalizePhase::Run |
( |
| ) |
|
Definition at line 11 of file hydrogen-canonicalize.cc.
12 const ZoneList<HBasicBlock*>* blocks(
graph()->blocks());
16 for (
int i = 0;
i < blocks->length(); ++
i) {
17 for (HInstructionIterator it(blocks->at(
i)); !it.Done(); it.Advance()) {
18 HInstruction* instr = it.Current();
19 if (instr->IsArithmeticBinaryOperation()) {
20 if (instr->representation().IsInteger32()) {
21 if (instr->HasAtLeastOneUseWithFlagAndNoneWithout(
25 }
else if (instr->representation().IsSmi()) {
26 if (instr->HasAtLeastOneUseWithFlagAndNoneWithout(
29 }
else if (instr->HasAtLeastOneUseWithFlagAndNoneWithout(
40 HRedundantPhiEliminationPhase redundant_phi_eliminator(
graph());
41 for (
int i = 0;
i < blocks->length(); ++
i) {
45 redundant_phi_eliminator.ProcessBlock(blocks->at(
i));
47 for (HInstructionIterator it(blocks->at(
i)); !it.Done(); it.Advance()) {
48 HInstruction* instr = it.Current();
49 HValue* value = instr->Canonicalize();
50 if (value != instr) instr->DeleteAndReplaceWith(value);
@ kAllUsesTruncatingToSmi
@ kAllUsesTruncatingToInt32
References v8::internal::List< T, AllocationPolicy >::at(), v8::internal::HValue::Canonicalize(), v8::internal::HValue::DeleteAndReplaceWith(), v8::internal::HPhase::graph(), v8::internal::HValue::HasAtLeastOneUseWithFlagAndNoneWithout(), v8::internal::Representation::IsInteger32(), v8::internal::Representation::IsSmi(), v8::internal::HValue::kAllUsesTruncatingToInt32, v8::internal::HValue::kAllUsesTruncatingToSmi, v8::internal::HValue::kTruncatingToInt32, v8::internal::HValue::kTruncatingToSmi, v8::internal::HRedundantPhiEliminationPhase::ProcessBlock(), v8::internal::HValue::representation(), and v8::internal::HValue::SetFlag().
The documentation for this class was generated from the following files: