Huffman Benchmark has opportunities to fold addressing modes #6858
Labels
area-CodeGen-coreclr
CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
enhancement
Product code improvement that does NOT require public API changes/additions
optimization
tenet-performance
Performance related issue
Milestone
Huffman benchmark uses an array of structs
For e.g. the innermost triply nested while loop
CSE recognizes bounds checked &hufftree[i] as CSE candidate and replaces with a LclVar.
bounds check on hufftree[i]
tmp = LEA(&hufftree[i])
Now field accesses will turn into [reg+fieldoffset]. If we could fold tmp into field access, it will turn into
[huffTree + indexReg*scale + (16+fieldoffset)]. This avoids the need for a reg to tmp. In fact, for tmp there were no callee saved regs available and its gets spilled and reloaded across the call.
There are many such opportunities in Huffman benchmark to fold addr modes as it heavily accesses array of structs.
category:cq
theme:addressing-modes
skill-level:intermediate
cost:medium
The text was updated successfully, but these errors were encountered: