Skip to content

Support loop cloning of class member arrays #77071

@BruceForstall

Description

@BruceForstall

Currently, if the array being iterated is a class member (and not a function local), we can't analyze the access (e.g., can't determine if the array object is loop-invariant).

e.g.,

public class Program
{
    int[] array = new int[1000003];

    public int Sum()
    {
        int sum = 0;
        for (int i = 0; i < array.Length; i++)
            sum += array[i];
        return sum;
    }
}

category:cq
theme:loop-opt
skill-level:expert
cost:large
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

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions