Memory Dependence Analysis was limited to return only local dependencies
for invariant.group handling. Now it returns NonLocal when it finds it
and then by asking getNonLocalPointerDependency we get found dep.
Thanks to this we are able to devirtualize loops!
void indirect(A &a, int n) { for (int i = 0 ; i < n; i++) a.foo(); } void test(int n) { A a; indirect(a); }
After inlining a.foo() will be changed to direct call, even if it is
external (but only if vtable definition will be available).
I have hard time parsing this comment, I think you can remove the so then part or remove it altogether.