aboutsummaryrefslogtreecommitdiff
path: root/mlir/lib
diff options
context:
space:
mode:
authorTom Eccles <tom.eccles@arm.com>2024-03-20 10:03:26 +0000
committerGitHub <noreply@github.com>2024-03-20 10:03:26 +0000
commit27534d69e275eeb6669296c038bf29d8a9b163e5 (patch)
tree7e1d6c0a39738a5005b5b708991970fc5fc6f4ae /mlir/lib
parent0f46e31cfbf415fcd3d3ce121bef94e92c6ccfc8 (diff)
downloadllvm-27534d69e275eeb6669296c038bf29d8a9b163e5.zip
llvm-27534d69e275eeb6669296c038bf29d8a9b163e5.tar.gz
llvm-27534d69e275eeb6669296c038bf29d8a9b163e5.tar.bz2
[mlir][LLVM] erase call mappings in forgetMapping() (#84955)
It looks like the mappings for call instructions were forgotten here. This fixes a bug in OpenMP when in-lining a region containing call operations multiple times. OpenMP array reductions 4/6 Previous PR: https://github.com/llvm/llvm-project/pull/84954 Next PR: https://github.com/llvm/llvm-project/pull/84957
Diffstat (limited to 'mlir/lib')
-rw-r--r--mlir/lib/Target/LLVMIR/ModuleTranslation.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp b/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
index c00628a..9955442 100644
--- a/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
+++ b/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
@@ -716,6 +716,8 @@ void ModuleTranslation::forgetMapping(Region &region) {
branchMapping.erase(&op);
if (isa<LLVM::GlobalOp>(op))
globalsMapping.erase(&op);
+ if (isa<LLVM::CallOp>(op))
+ callMapping.erase(&op);
llvm::append_range(
toProcess,
llvm::map_range(op.getRegions(), [](Region &r) { return &r; }));