llvm-project
a28d89be - [RDF] Fix DenseMap reference invalidation in computePhiInfo (#182144)

Commit
4 days ago
[RDF] Fix DenseMap reference invalidation in computePhiInfo (#182144) In Liveness::computePhiInfo, the reference `RefMap &RUM = RealUseMap[PA.Id]` can be invalidated when the inner loop inserts into RealUseMap via `RealUseMap[P.first][SS.Id]`. If `P.first` is a new key, the DenseMap may rehash, invalidating the RUM reference and any iterators into it. Fix by making a copy of the map value instead of holding a reference. This is detected by _GLIBCXX_DEBUG (enabled via EXPENSIVE_CHECKS) which tracks iterator validity on std::unordered_map (RefMap).
Author
Parents
Loading