Currently, escape analysis (EA) creates new types for unescaped objects and relies on the compiler's optimization mechanisms to propagate the new types throughout the IR nodes. However because the optimizer is using the type information to perform optimizations as the types are propagating, EA needs to be much too conservative about creating the new types in order to prevent incorrect optimizations caused by partially propagated inconsistent type information. The conservative type splitting also drastically reduces the possibility of completely eliminating the allocation of unescaped objects. A better solution would be for the EA pass to do the type propagation and graph modifications. This would significantly improve the optimizations possible because no other optimizations are being done and because EA accumulates information which improves the ability to do the type splitting.
|