diff --git a/experimental/lib/Analysis/GSAAnalysis.cpp b/experimental/lib/Analysis/GSAAnalysis.cpp index 5e9cda5ee..e1fdc88f6 100644 --- a/experimental/lib/Analysis/GSAAnalysis.cpp +++ b/experimental/lib/Analysis/GSAAnalysis.cpp @@ -413,8 +413,9 @@ void experimental::gsa::GSAAnalysis::convertPhiToGamma( mlir::DominanceInfo domInfo; mlir::CFGLoopInfo loopInfo(domInfo.getDomTree(®ion)); + auto gatesSnapshot = gatesPerBlock; // For each block - for (auto const &[phiBlock, phis] : gatesPerBlock) { + for (auto const &[phiBlock, phis] : gatesSnapshot) { // For each phi for (Gate *phi : phis) {