Пример #1
0
SSATmp* TraceBuilder::cseLookup(IRInstruction* inst,
                                const folly::Optional<IdomVector>& idoms) {
  auto tmp = cseHashTable(inst)->lookup(inst);
  if (tmp && idoms) {
    // During a reoptimize pass, we need to make sure that any values
    // we want to reuse for CSE are only reused in blocks dominated by
    // the block that defines it.
    if (!dominates(tmp->inst()->block(), inst->block(), *idoms)) {
      return nullptr;
    }
  }
  return tmp;
}
Пример #2
0
void TraceBuilder::cseKill(SSATmp* src) {
  if (src->inst()->canCSE()) {
    cseHashTable(src->inst())->erase(src);
  }
}
Пример #3
0
void FrameState::cseKill(SSATmp* src) {
  if (src->inst()->canCSE()) {
    cseHashTable(src->inst())->erase(src);
  }
}
Пример #4
0
void TraceBuilder::cseInsert(IRInstruction* inst) {
  cseHashTable(inst)->insert(inst->dst());
}
Пример #5
0
void FrameState::cseInsert(const IRInstruction* inst) {
  cseHashTable(inst)->insert(inst->dst());
}