-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone
Description
Currently, we require most TYP_SIMD nodes in IR to "have" a struct handle (i. e. return something concrete from gtGetStructHandleIfPresent).
This:
- Results in confusing invariants because "most" is not "all". E. g. it is legal to have a local variable of
TYP_SIMDwithout a handle. - Makes introducing new nodes that have
TYP_SIMDharder (e. g.: Adding support for vector constants via GenTreeVecCon #68874 (comment)). - Makes using
TYP_SIMDnodes in IR internally risky, as we must either be able to find some usable handle the user code contained (what the current caching scheme attempts to do) or be very careful not to use the "handle-less" nodes in contexts where a handle might be required of them later on. - Is a canonicalization problem: is the "canonical" indirection for
TYP_SIMDanOBJor anIND? Currently, it's both, with somewhat fragile code in morph that tries to turn one into another, and for copies only.
This requirement is mostly historical, and in my opinion, the best solution to the above problems is to simply eliminate it. Things that need the precise handle (CALLs) should acquire them in other ways.
category:design
theme:structs
skill-level:expert
cost:medium
impact:small
Metadata
Metadata
Assignees
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI