[flang-commits] [flang] [flang][openmp] fix OMPFunctionFiltering pass after #87796 (PR #89776)

Dominik Adamski via flang-commits flang-commits at lists.llvm.org
Wed Apr 24 02:32:37 PDT 2024


================
@@ -66,6 +67,12 @@ class OMPFunctionFilteringPass
         SymbolTable::UseRange funcUses = *funcOp.getSymbolUses(op);
         for (SymbolTable::SymbolUse use : funcUses) {
           Operation *callOp = use.getUser();
+          if (mlir::isa<func::FuncOp>(callOp)) {
+            // Do not delete internal procedures holding the symbol of their
+            // Fortran host procedure as attribute.
+            callOp->removeAttr(fir::getHostSymbolAttrName());
----------------
DominikAdamski wrote:

Can we remove the internal linkage attribute and set the visibility to public as well? Internal linkage and private visibility cause the offload function to be deleted. LLVM-Flang was able to compile and run the test case before https://github.com/llvm/llvm-project/pull/81929 

https://github.com/llvm/llvm-project/pull/89776


More information about the flang-commits mailing list