-
Enhancement
-
Resolution: Unresolved
-
P4
-
22
It is possible for unreached calls to exist in code that is being compiled. Such calls are typically not inlined since the call site frequency is too low. Normally the branch in which the call exists would be pruned if it is rarely taken, but we might not be able to accurately determine that a branch is untaken due to a lack of profiling. In such cases we may still have enough information to determine that the call is never reached (and by implication, all the code following it), for instance based on the profiling information attached to the individual call itself.
We could emit an uncommon trap at that point instead, pruning the call, and any (unreached) code that follows it. This can help enable other optimizations such as scalarization (objects passed to the calll no longer escape), or aid type flow analysis.
Since such a change would have a widespread impact, performance effects should be carefully investigated.
We could emit an uncommon trap at that point instead, pruning the call, and any (unreached) code that follows it. This can help enable other optimizations such as scalarization (objects passed to the calll no longer escape), or aid type flow analysis.
Since such a change would have a widespread impact, performance effects should be carefully investigated.
- relates to
-
JDK-8354509 C2: reduce compilation effort for cold compiled paths
-
- Open
-