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

JIT: refactor logic for removing box upstream side effects #13169

Merged
merged 2 commits into from
Aug 2, 2017

Conversation

AndyAyersMS
Copy link
Member

Introduce a new method gtTryRemoveBoxUpstreamEffects to capture
the logic for cleaning up after a dead value type box into a utility.
Call this from gtFoldExprSpecial and now also from the inliner when
it finds a dead box argument.

Also remove the useless fgExpandInline field and associated
fgIsInlining method, as the jit never set the field to true.

No diffs from the refactoring. The inliner case kicks in in 3 places
in the test tree.

Closes #13136.

Introduce a new method `gtTryRemoveBoxUpstreamEffects` to capture
the logic for cleaning up after a dead value type box into a utility.
Call this from `gtFoldExprSpecial` and now also from the inliner when
it finds a dead box argument.

Also remove the useless `fgExpandInline` field and associated
`fgIsInlining` method, as the jit never set the field to true.

No diffs from the refactoring. The inliner case kicks in in 3 places
in the test tree.

Closes #13136.
@AndyAyersMS
Copy link
Member Author

@JosephTremoulet PTAL
cc @dotnet/jit-contrib

Copy link

@JosephTremoulet JosephTremoulet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM w/ one minor comment.

{
JITDUMP("gtTryRemoveBoxUpstreamEffects called for [%06u]\n", dspTreeID(op));

if (!op->IsBoxedValue())

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm mildly surprised you're checking IsBoxedValue here rather than asserting it here and expecting callers to check.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, seems odd. Will update.

@AndyAyersMS AndyAyersMS merged commit f62e340 into dotnet:master Aug 2, 2017
@AndyAyersMS AndyAyersMS deleted the RefactorGtFoldExprSpecial branch August 2, 2017 22:47
@karelz karelz modified the milestone: 2.1.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.

4 participants