mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-11-23 10:09:54 +00:00
commit
a48476a296
@ -112,6 +112,14 @@ void CombinedPassVisitor::VisitGraph()
|
||||
for (auto useIt = uses.begin(); useIt != uses.end(); useIt++) {
|
||||
PushChangedGate(*useIt);
|
||||
}
|
||||
std::vector<GateRef> gateList;
|
||||
circuit_->GetAllGates(gateList);
|
||||
for (auto gate : gateList) {
|
||||
if (acc_.GetOpCode(gate) == OpCode::LOOP_BEGIN) {
|
||||
PushChangedGate(gate);
|
||||
}
|
||||
}
|
||||
|
||||
while (true) {
|
||||
if (!workList_.empty()) {
|
||||
Edge& current = workList_.back();
|
||||
|
@ -498,13 +498,13 @@ TypeInfo NumberSpeculativeRetype::GetOuputForPhi(GateRef gate, bool ignoreConsta
|
||||
for (size_t i = 0; i < valueNum; ++i) {
|
||||
GateRef input = acc_.GetValueIn(gate, i);
|
||||
TypeInfo inputInfo = GetOutputTypeInfo(input);
|
||||
if (inputInfo == TypeInfo::NONE) {
|
||||
continue;
|
||||
}
|
||||
if (ignoreConstant && acc_.IsConstantNumber(input)) {
|
||||
hasConstantInput = true;
|
||||
continue;
|
||||
}
|
||||
if (inputInfo == TypeInfo::NONE) {
|
||||
continue;
|
||||
}
|
||||
// use less general input as phi output
|
||||
if (tempType == TypeInfo::NONE) {
|
||||
tempType = inputInfo;
|
||||
@ -1570,8 +1570,10 @@ GateRef NumberSpeculativeRetype::VisitTypeConvert(GateRef gate)
|
||||
if (IsRetype()) {
|
||||
if (inputInfo == TypeInfo::TAGGED) {
|
||||
if (acc_.IsConstantNumber(input)) {
|
||||
TypeInfo oldType = GetOutputTypeInfo(gate);
|
||||
acc_.SetGateType(gate, acc_.GetGateType(input));
|
||||
return Circuit::NullGate();
|
||||
SetOutputTypeInfo(gate, inputInfo);
|
||||
return oldType == inputInfo ? Circuit::NullGate() : gate;
|
||||
}
|
||||
ASSERT(paramType.HasNumberType());
|
||||
return SetOutputType(gate, paramType);
|
||||
|
Loading…
Reference in New Issue
Block a user