36 if (in_worklist_.
Contains(current->
id()))
return;
37 worklist_.Add(current, zone());
38 in_worklist_.
Add(current->
id());
46 int phi_count = phi_list->length();
48 for (
int i = 0; i < phi_count; ++i) {
49 phi_list->
at(i)->InitRealUses(i);
51 connected_set->
Add(i);
52 connected_phis.
Add(connected_set, zone());
63 for (
int i = phi_count - 1; i >= 0; --i) {
64 HPhi* phi = phi_list->
at(i);
65 for (HUseIterator it(phi->uses()); !it.Done(); it.Advance()) {
68 int id = HPhi::cast(use)->phi_id();
69 if (connected_phis[i]->UnionIsChanged(*connected_phis[
id]))
81 for (
int i = 0; i < phi_count; ++i) {
85 bool all_uses_everywhere_truncating_int32 =
true;
86 bool all_uses_everywhere_truncating_smi =
true;
87 for (BitVector::Iterator it(connected_phis[i]);
90 int index = it.Current();
91 all_uses_everywhere_truncating_int32 &=
93 all_uses_everywhere_truncating_smi &=
98 if (!all_uses_everywhere_truncating_int32) {
100 for (BitVector::Iterator it(connected_phis[i]);
103 int index = it.Current();
107 if (!all_uses_everywhere_truncating_smi) {
109 for (BitVector::Iterator it(connected_phis[i]);
112 int index = it.Current();
121 for (
int i = 0; i < phi_count; ++i) {
122 phi_list->
at(i)->SimplifyConstantInputs();
127 for (
int i = 0; i < phi_count; ++i) {
128 HPhi* phi = phi_list->
at(i);
129 for (BitVector::Iterator it(connected_phis[i]);
132 int index = it.Current();
133 HPhi* it_use = phi_list->
at(index);
134 if (index != i) phi->AddNonPhiUsesFrom(it_use);
139 for (
int i = 0; i <
graph()->blocks()->length(); ++i) {
140 HBasicBlock* block =
graph()->blocks()->at(i);
142 for (
int j = 0; j < phis->length(); ++j) {
146 for (HInstructionIterator it(block); !it.Done(); it.Advance()) {
153 while (!worklist_.is_empty()) {
154 HValue* current = worklist_.RemoveLast();
161 for (
int i = 0; i <
graph()->blocks()->length(); ++i) {
162 HBasicBlock* block =
graph()->blocks()->at(i);
164 for (
int j = 0; j < phis->length(); ++j) {
165 HPhi* phi = phis->
at(j);
166 if (phi->representation().IsNone()) {
170 for (HInstructionIterator it(block); !it.Done(); it.Advance()) {
virtual void InferRepresentation(HInferRepresentationPhase *h_infer)
static Representation Double()
Representation representation() const
bool Contains(int i) const
void ChangeRepresentation(Representation r)
bool CheckFlag(Flag f) const
void AddToWorklist(HValue *current)
void Add(const T &element, AllocationPolicy allocator=AllocationPolicy())
static Representation Tagged()