ReduceCheckMaps(HCheckMaps::cast(instr));
break;
}
- case HValue::kCheckValue: {
- ReduceCheckValue(HCheckValue::cast(instr));
- break;
- }
case HValue::kLoadNamedField: {
ReduceLoadNamedField(HLoadNamedField::cast(instr));
break;
if (entry != NULL) {
// entry found;
MapSet a = entry->maps_;
- MapSet i = instr->map_set()->Copy(phase_->zone());
+ const UniqueSet<Map>* i = instr->map_set();
if (a->IsSubset(i)) {
// The first check is more strict; the second is redundant.
if (entry->check_ != NULL) {
}
}
- void ReduceCheckValue(HCheckValue* instr) {
- // Canonicalize HCheckValues; they might have their values load-eliminated.
- HValue* value = instr->Canonicalize();
- if (value == NULL) {
- instr->DeleteAndReplaceWith(instr->value());
- INC_STAT(removed_);
- } else if (value != instr) {
- instr->DeleteAndReplaceWith(value);
- INC_STAT(redundant_);
- }
- }
-
void ReduceLoadNamedField(HLoadNamedField* instr) {
// Reduce a load of the map field when it is known to be a constant.
if (!IsMapAccess(instr->access())) {