Skip to content

Optimize shadow stack pass#1667

Merged
dcodeIO merged 4 commits intomasterfrom
optimize-shadowstack
Feb 22, 2021
Merged

Optimize shadow stack pass#1667
dcodeIO merged 4 commits intomasterfrom
optimize-shadowstack

Conversation

@dcodeIO
Copy link
Copy Markdown
Member

@dcodeIO dcodeIO commented Feb 4, 2021

This is an experiment to reduce overhead of the shadow stack pass. The pass is currently maintaining more stack slots than necessary (anywhere something managed naively goes to the stack) to be sure, but there is room for improvement.

The relatively simple changes in this PR reduce optimized binary size by about 10% and increase throughput by a little less than 10% (testing with the compiler). Optimizations here are risky, though, because any mistake, not only in the shadow stack pass itself but also in compiler code, for instance where an actually necessary (pre-)instrumentation is missing, can lead to unforeseen consequences that only show themselves randomly.

As such it may make sense to test with various programs and various GC configurations first to minimize the risk.

  • I've read the contributing guidelines

Loading
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