In VN we set the value of all call defs to unknown here:
|
// If the call generates any definitions, for example because it uses "return buffer", then VN the local |
|
// as well. |
|
auto visitDef = [=](const LocalDef& def) { |
|
ValueNumPair storeValue; |
|
storeValue.SetBoth(vnStore->VNForExpr(compCurBB, lvaGetDesc(def.Def->AsLclVarCommon())->TypeGet())); |
|
|
|
fgValueNumberLocalStore(call, def.Def, def.Offset, def.Size, storeValue); |
|
return GenTree::VisitResult::Continue; |
|
}; |
|
|
|
call->VisitLocalDefs(this, visitDef); |
However, in two scenarios we do know the value of AsyncResumedDef:
- If this is an always-suspending call, then the value will be
1 after
- If this is dominated by an always-suspending call (i.e.
resumed is already known to be constant 1) then the value will also be 1 after
We should be able to model this.
In VN we set the value of all call defs to unknown here:
runtime/src/coreclr/jit/valuenum.cpp
Lines 14952 to 14962 in 72dac24
However, in two scenarios we do know the value of
AsyncResumedDef:1afterresumedis already known to be constant 1) then the value will also be1afterWe should be able to model this.