Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Conversation

@JosephTremoulet
Copy link

Port of #11694 to release/2.0.0 branch.

These constants appear loop invariant, hence so do their dereferences
when a loop has no memory side-effects.  Add flag `GTF_ICON_INITCLASS`
similar to `GTF_FLD_INITCLASS`/`GTF_CLS_VAR_INITCLASS`, and use it to
prevent hoisting such references without also hoisting their static
init helper calls.

Resolves #11689

[cherry-pick of 66e5e7f, with trivial conflict resolved]
The code in loop hoisting visiting a comma for a static init helper call
and static field access tried to clear the childrenHoistable bit for the
field, but had an off-by-one error and was instead clearing the bit for
the helper call, which could lead to missed legal helper call hoists.
Update that code to simply assert that the flag is already set for the
field (using the correct index), which must be true since the check is
guarded by a check that childIsCctorDependent is true for it.
@JosephTremoulet JosephTremoulet merged commit 00bb10a into dotnet:release/2.0.0 May 24, 2017
@JosephTremoulet JosephTremoulet deleted the IconHoistPort branch May 24, 2017 20:54
@karelz karelz modified the milestone: 2.0.0 Aug 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants