================ @@ -77,9 +78,15 @@ class MapInfoFinalizationPass /// | | std::map<mlir::Operation *, mlir::Value> localBoxAllocas; - // List of deferrable descriptors to process at the end of - // the pass. - llvm::SmallVector<mlir::Operation *> deferrableDesc; + /// List of deferrable descriptors to process at the end of + /// the pass and their associated attach map if it exists. + llvm::SmallVector<std::pair<mlir::Operation *, mlir::Operation *>> + deferrableDesc; + + /// List of base addresses already expanded from their + /// descriptors within a parent, currently used to + /// prevent incorrect member index generation. + std::map<mlir::Operation *, llvm::SmallVector<uint64_t>> expandedBaseAddr; ---------------- agozillon wrote:
First iteration and I'm unfamiliar with the llvm::Dense series, so keeping it simple seemed best to make sure it all fundamentally works, it also aligns with the other container usage in the file :-) It's also a little rare to be dealing with significant numbers of maps in any of the containers at once as they're cleared on a function by function case, it is possible to have large functions with a lot of maps though (some SPEC benchmarks being an example). However, if you think it's more optimal, I'm happy to make the swap. https://github.com/llvm/llvm-project/pull/177715 _______________________________________________ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
