Skip to content

machine: avoid binary size regression after LLVM memory intrinsics#998

Merged
deadprogram merged 1 commit intodevfrom
avoid-memcalls-regression
Mar 27, 2020
Merged

machine: avoid binary size regression after LLVM memory intrinsics#998
deadprogram merged 1 commit intodevfrom
avoid-memcalls-regression

Conversation

@aykevl
Copy link
Copy Markdown
Member

@aykevl aykevl commented Mar 27, 2020

Somehow moving to LLVM memory intrinsics for calls like memcpy made the
machine.sendUSBPacket get inlined. This is a problem because it is
called in many different functions and it is just big enough to cause a
significant file size increase.

Adding //go:noinline solves this problem and gets the examples/blinky1
program below the file size it was before this change (tested:
itsybitsy-m0, itsybitsy-m4, circuitplay-bluefruit).

This PR fixes the binary size regression seen in #995.

Somehow moving to LLVM memory intrinsics for calls like memcpy made the
machine.sendUSBPacket get inlined. This is a problem because it is
called in many different functions and it is just big enough to cause a
significant file size increase.

Adding //go:noinline solves this problem and gets the examples/blinky1
program below the file size it was before this change (tested:
itsybitsy-m0, itsybitsy-m4, circuitplay-bluefruit).
@deadprogram
Copy link
Copy Markdown
Member

Thanks @aykevl now merging.

@deadprogram deadprogram merged commit c01f811 into dev Mar 27, 2020
@deadprogram deadprogram deleted the avoid-memcalls-regression branch March 27, 2020 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants