-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Codegen difference: Local vs IL Stack #75206
Copy link
Copy link
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 SuperPMIhelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributors
Milestone
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 SuperPMIhelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributors
Type
Fields
Give feedbackNo fields configured for issues without a type.
Sharplab
According to @SingleAccretion, this is because Roslyn prefers to use the IL stack for locals instead of parameters.
So an optimization would make sense for this.
I would argue that there is a real-world case, as I have seen code where no new variable was created but the parameter was modified directly.