R2R: Cache target of indirect cell address to optimize redundant cell address loading #38890
Labels
arch-arm64
area-CodeGen-coreclr
CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
tenet-performance
Performance related issue
Milestone
Today we don't CSE loading the target of indirect cell address because during CSE we don't have that information in the IR. It happens in later phase like lower.
Consider the following code pattern:
If we can optimize it using peephole or more some ambitious final instructions scanner phase to something like this to:
With this, we can get an improvement of 8 bytes + 1 elimination of memory access.
I wrote an analyzer asm to find out how many addresses are CSE candidates and the number is huge. From what I noticed, it would by little over 2MB of size reduction.
Processed 191816 methods. Found 29246 methods containing 259123 groups.
Details: cse-candidates.txt
category:cq
theme:cse
skill-level:expert
cost:large
impact:large
The text was updated successfully, but these errors were encountered: