part-1 is a NFC refactoring patch to enable porting. Changes include
- renamed LoopAccessAnalysis.h to be LoopAccessInfo.h
- split out LoopAccessAnalysis class into new file LoopAccessAnalysis.h
- introduced LoopAccessFuncInfo class to represent function level analysis result of LoopAccess infos
- machinery to support lazy computation of LoopAccessInfo
This doesn't seem like the right design. It leads to the getInfo().getInfo() awkward pattern that IMO is only marginally less awkward spelled as getResult().getInfo().
Instead, I think this pretty clearly wants to be a Loop analysis in the new pass manager. I think that the caching and map should be the new pass manager's caching and map, rather than rolling our own in a function analysis manager.
As a consequence, I don't think you need this result type at all. I think the LoopAccessInfo is already the correct result type. I think you'll need the DenseMap and logic around it in the legacy pass manager's function analysis, and you'll want a different query path to use the LoopAnalysisManager directly in the new pass manager.
Does that make sense?