The general term is "whole program optimizer". It what Google does to Chrome (but not Chromium IIRC), and what Proguard does to Java (e.g. Android) apps.
Define a couple entry points and use static analysis to pare down the code to that, for minification, obfuscation, and performance.
Define a couple entry points and use static analysis to pare down the code to that, for minification, obfuscation, and performance.