[flang-commits] [flang] [OpenMP][MLIR] OMPEarlyOutliningPass removal (PR #67319)

Sergio Afonso via flang-commits flang-commits at lists.llvm.org
Mon Sep 25 09:27:10 PDT 2023


skatrak wrote:

This change seems to break function filtering in certain cases. For example:
```fortran
! File: test.f90
program main
    !$omp target
    !$omp end target
    print *, 5
end program main
```

This results in a compiler crash around `convertDeclareTargetAttr()` in OpenMPToLLVMIRTranslation. It can be reproduced as follows: `flang-new -fc1 -fopenmp -fopenmp-is-target-device -emit-llvm -o - test.f90`.

The target outlining pass allowed the function filtering pass to assume that the only MLIR operations that remain represent either device code or wrapper functions around a single `omp.target` operation. Since those assumptions are now no longer met, the function filtering is failing.

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


More information about the flang-commits mailing list