[all-commits] [llvm/llvm-project] df3f0e: [flang] Fix invalid iterator erasure in boxed-proc...
jeanPerier via All-commits
all-commits at lists.llvm.org
Mon Jan 29 07:45:37 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: df3f0eeeacbe50a6e4b2ce7c2a12f96e7b6ce5e0
https://github.com/llvm/llvm-project/commit/df3f0eeeacbe50a6e4b2ce7c2a12f96e7b6ce5e0
Author: jeanPerier <jperier at nvidia.com>
Date: 2024-01-29 (Mon, 29 Jan 2024)
Changed paths:
M flang/lib/Optimizer/CodeGen/BoxedProcedure.cpp
M flang/test/Fir/boxproc-2.fir
Log Message:
-----------
[flang] Fix invalid iterator erasure in boxed-procedure pass (#79830)
The code in BoxedProcedureRewrite was erasing the mappings <old type,
new type> once "new type" was fully translated. This was done in an
invalid way because the map was an llvm::SmallMapVector that do not have
stable iterators, and new items were added to the map between the
creation of the iterator and its erasure.
It is anyway not needed and expensive to erase the types (see
llvm::MapVector note), the cache can be used for the whole pass, which
is very beneficial in the context of an apps using "big derived types"
(dozens of components/parents).
More information about the All-commits
mailing list