Repository navigation
JIT: Use logical local definitions in more places - #137727
Conversation
Generalize code that looks for local definitions to use `VisitLogicalLocalDefs` instead of only recognizing local store nodes: - `gtHasRef`, `gtMayHaveStoreInterference`, `gtHasLocalsWithAddrOp` and `gtHasAddressExposedLocals` consider all logical local definitions. - Local morph's `LoopDefinitions` records all logical local definitions. - `optRemoveRedundantZeroInits` counts definitions made by other nodes. - Mask conversion candidates defined by other nodes are invalidated. - Object allocation connects locals defined by unmodelled nodes to the unknown source and marks them as escaping. `VisitLogicalLocalDefs` now skips nodes without `GTF_ASG`, and `fgDebugCheckFlagsAndTypes` verifies that nodes defining locals have `GTF_ASG`, using the new `VisitLogicalLocalDefsInternal`. Co-authored-by: Copilot <[email protected]> Copilot-Session: 36da9052-8682-4d23-95c8-e0be241095bc
|
Azure Pipelines: Successfully started running 5 pipeline(s). 10 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
|
cc @dotnet/jit-contrib PTAL @AndyAyersMS
|
…oInits` Definitions made through `GT_LCL_ADDR` nodes with `GTF_VAR_DEF` are counted via `VisitLogicalLocalDefs` for the defining node, so skip them when counting local references and definitions. Co-authored-by: Copilot <[email protected]> Copilot-Session: 36da9052-8682-4d23-95c8-e0be241095bc
|
Ping @AndyAyersMS, this modifies a few more places to automatically handle |
AndyAyersMS
left a comment
There was a problem hiding this comment.
LGTM
Should we deprecate the DoLclVarsOnly feature, seems like it is now increasingly easy to misuse this...?
We could also make |
|
/ba-g Deadletter |
Generalize code that looks for local definitions to use
VisitLogicalLocalDefsinstead of only recognizing local store nodes:gtHasRef,gtMayHaveStoreInterference,gtHasLocalsWithAddrOpandgtHasAddressExposedLocalsconsider all logical local definitions.LoopDefinitionsrecords all logical local definitions.optRemoveRedundantZeroInitscounts definitions made by other nodes.VisitLogicalLocalDefsnow skips nodes withoutGTF_ASG, andfgDebugCheckFlagsAndTypesverifies that nodes defining locals haveGTF_ASG, using the newVisitLogicalLocalDefsInternal.