Skip to content

Consider hoisting of class init checks for loop cloning and inversion #49102

@BruceForstall

Description

@BruceForstall

Cloning to allow for a loop with a class init check, and one where the class init check is removed, could be profitable.

AndyAyersMS writes:

I wonder if we should consider using this check as a gating condition for loop cloning... Also may factor into the do-while transformation heuristics, these try to account for the potential "savings" from hoisting the class init call check out of the loop.

So for some subset of loops we would produce a loop that knows classes are inited and does no checks, and another that will conditionally check within the loop body as above.

Related: #47901

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

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    Status

    Optimizations

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions