[llvm] [mlir] [OMPIRBuilder] Don't generate DISubprogram for outlined function. (PR #138149)
Sergio Afonso via llvm-commits
llvm-commits at lists.llvm.org
Tue May 13 05:40:37 PDT 2025
================
@@ -4982,6 +4982,20 @@ static LogicalResult
convertOmpTarget(Operation &opInst, llvm::IRBuilderBase &builder,
LLVM::ModuleTranslation &moduleTranslation) {
auto targetOp = cast<omp::TargetOp>(opInst);
+ // The current debug location already has the DISubprogram for the outlined
+ // function that will be created for the target op. We save it here so that
+ // we can set it on the outlined function.
+ llvm::DebugLoc OutlinedFnLoc = builder.getCurrentDebugLocation();
+ // During the handling of target op, we will generate instructions in the
+ // parent function like call to oulined function or branch to new BasicBlock.
----------------
skatrak wrote:
```suggestion
// parent function like call to the outlined function or branch to new a BasicBlock.
```
https://github.com/llvm/llvm-project/pull/138149
More information about the llvm-commits
mailing list