Skip to content

Commit f8ff727

Browse files
committed
[mlir][LLVM] erase call mappings in forgetMapping()
It looks like the mappings for call instructions were forgotten here. This fixes a bug in OpenMP when inlining a region containing call operations multiple times.
1 parent 1f63a56 commit f8ff727

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mlir/lib/Target/LLVMIR/ModuleTranslation.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -716,6 +716,8 @@ void ModuleTranslation::forgetMapping(Region &region) {
716716
branchMapping.erase(&op);
717717
if (isa<LLVM::GlobalOp>(op))
718718
globalsMapping.erase(&op);
719+
if (isa<LLVM::CallOp>(op))
720+
callMapping.erase(&op);
719721
llvm::append_range(
720722
toProcess,
721723
llvm::map_range(op.getRegions(), [](Region &r) { return &r; }));

0 commit comments

Comments
 (0)