[Mlir-commits] [flang] [mlir] [OpenMP][MLIR] OMPEarlyOutliningPass	removal (PR #67319)
    Akash Banerjee 
    llvmlistbot at llvm.org
       
    Wed Nov  1 06:16:31 PDT 2023
    
    
  
================
@@ -2459,6 +2459,8 @@ convertDeclareTargetAttr(Operation *op, mlir::omp::DeclareTargetAttr attribute,
       if (declareType == omp::DeclareTargetDeviceType::host) {
         llvm::Function *llvmFunc =
             moduleTranslation.lookupFunction(funcOp.getName());
+        llvmFunc->replaceAllUsesWith(
+            llvm::UndefValue::get(llvmFunc->getType()));
----------------
TIFitis wrote:
@skatrak I have add this line to replace the uses of the function that are to be removed with `undef` values. This should prevent the crash.
Let me know if this looks like an appropriate fix for the issue to you.
https://github.com/llvm/llvm-project/pull/67319
    
    
More information about the Mlir-commits
mailing list