Skip to content

Loop opts should not be recomputing pred lists from scratch #49030

Closed
@AndyAyersMS

Description

@AndyAyersMS

Several loop opts end up calling fgUpdateChangedFlowGraph when done, and this calls fgComputePreds, leaking previous pred lists and losing the profile weights carefully calculated earlier.

This seems wrong-headed; I think those optimizations should maintain pred lists and not rebuild them.

Removing the call to fgComputePreds shows a number of places in loop opts where pred lists are not properly updated, and more downstream failures from places unknown where BBF_JMP_TARGET is not properly set, so cleaning this up may be nontrivial.

category:cq
theme:loop-opt
skill-level:expert
cost:medium
impact:medium

Metadata

Metadata

Assignees

Labels

area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions