================ @@ -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; ---------------- bhandarkar-pranav wrote:
Also, looking at how `expansionIndices` are used below, would it make more sense to use a `llvm::DenseSet` instead of a `llvm::SmallVector<uint64_t>`? If I am understanding this correctly, your complexity here is O(n x m) where n is the number of members and m is the number of expanded indices. 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
