We present a new pointer and escape analysis. Instead of
analyzing the whole program, the algorithm incrementally analyzes only
those parts of the program that may deliver useful results. An
analysis policy monitors the analysis results to direct the
incremental investment of analysis resources to those parts of the
program that offer the highest expected optimization return.
Our experimental results show that almost all of the objects are
allocated at a small number of allocation sites and that an
incremental analysis of a small region of the program surrounding each
site can deliver almost all of the benefit of a whole-program
analysis. Our analysis policy is usually able to deliver this benefit
at a fraction of the whole-program analysis cost.