Hello.
I see that similar to SimpleCaptureInfo, we have EarliestEscapeInfo available in AliasAnalysis which has some flow-sensitive functionalities. But I can only see its being used in DSE and no other places. Is there any reason why we do not use it anywhere else? The function isNotCapturedBeforeOrAt can help us in situations like the following simple snippet:
define void @caller_a(ptr %indirect_a0) {
%escape_alloca_a0 = alloca double
%loaded_a0 = load ptr, ptr %indirect_a0
call void @callee(ptr %escape_alloca_a0)
}
Alias Analysis still returns MayAlias for the pair %escape_alloca_a0 and %loaded_a0 even though %escape_alloca_a0 is escaped after the load (please correct me if I’m wrong). As far as I understand, other passes like LICM, GVN, AA, Store forwarding, etc to name a few can benefit from this.