Optimize stlod ldloc #614

Merged
merged 1 commit into from Dec 12, 2016

Conversation

Projects
None yet
3 participants
@StephaneDelcroix
Member

StephaneDelcroix commented Dec 6, 2016

Description of Change

replace (2 to 6B)

ldloc x
stloc x

by (1 to 4B)

dup
stloc x

this gain is quite small (~1%)

require #611 and #612

The current tests are covering this already

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Rebased on top of master at time of PR
  • Changes adhere to coding standard
  • Consolidate commits as makes sense

@dnfclas dnfclas added the cla-required label Dec 6, 2016

@StephaneDelcroix StephaneDelcroix referenced this pull request Dec 7, 2016

Merged

[Xamlc] remove unused locals #620

3 of 4 tasks complete
+ if (l < int.MinValue || l > int.MaxValue)
+ continue;
+ ExpandMacro(instruction, OpCodes.Ldc_I4, unchecked((int)l));
+ self.Instructions.Insert(++i, Instruction.Create(OpCodes.Conv_I8));

This comment has been minimized.

@samhouts

samhouts Dec 12, 2016

Member

You're only going to iterate through every other instruction if you do ++i here. Is that intentional?

@samhouts

samhouts Dec 12, 2016

Member

You're only going to iterate through every other instruction if you do ++i here. Is that intentional?

This comment has been minimized.

@StephaneDelcroix

StephaneDelcroix Dec 12, 2016

Member

btw, this was part of a preview PR, and was only moved in this

@StephaneDelcroix

StephaneDelcroix Dec 12, 2016

Member

btw, this was part of a preview PR, and was only moved in this

@StephaneDelcroix

This comment has been minimized.

Show comment
Hide comment
@StephaneDelcroix

StephaneDelcroix Dec 12, 2016

Member
Member

StephaneDelcroix commented Dec 12, 2016

@StephaneDelcroix StephaneDelcroix merged commit 354e27c into master Dec 12, 2016

1 of 2 checks passed

OSX-Debug-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Cycle 8 :: OSX Debug : Snapshot dependency failed to start: ... Windows Debug
Details
Windows-Debug-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Cycle 8 :: Windows Debug : Tests passed: 3685, ignored: 10
Details

@StephaneDelcroix StephaneDelcroix deleted the optimizeStlod_Ldloc branch Dec 12, 2016

@samhouts samhouts added this to the 2.3.4 milestone Jun 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment