Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unnecessary code generation. #366

Merged
merged 1 commit into from Sep 10, 2019

Conversation

@dvander
Copy link
Member

dvander commented Sep 10, 2019

No description provided.

@dvander dvander force-pushed the fix-358 branch from e2e0343 to bba6cd4 Sep 10, 2019
…embly.

The two-pass system in the compiler is able to roughly guess which
functions are not used, but it's a poor guess. Stocks called by other
stocks, including recursive functions, all get compiled in. We can fix
this by traversing the call graph to determine the actual live set.

Note, the assembler now skips functions with uDEFINED but not uPUBLIC.
uDEFINED is cleared by delete_symbols, so it looks like a pointless
check.

This patch shaves about 10% off some .smx files sampled from the
SourceMod tree.

Bug: issue #358
Test: manual test
@dvander dvander force-pushed the fix-358 branch from bba6cd4 to cbea7ef Sep 10, 2019
@dvander dvander merged commit 5735aa6 into master Sep 10, 2019
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@dvander dvander deleted the fix-358 branch Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.