Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

May-alias analysis/domain for Fields and Arrays to improve the escape analysis #25

Open
florian-kuebler opened this issue Jan 7, 2020 · 0 comments

Comments

@florian-kuebler
Copy link
Collaborator

Taken from Bitbucket#176:

In the current escape analysis, more than 90% of all entities are flagged with AtMost(...) (which is currently equivalent to GlobalEscape), because they were stored into arrays or fields.

Consider the following example:

static Object global = null;
void foo() {
Object o = new Object(); // may be local, iff the array arr is local and no read from the array escapes
Object[] arr = new Object[] { o }; // the array is local
Object o2 = arr[0]; // here the three-address code provides no information that o2 might be an alias of o
// global = o2; // would let o escape. if the stmt is omitted, o would not escape.
}
As a first step we would need such a field/array may alias analysis. Afterwards we would need to modify the escape analysis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant