llvm
e55c8534 - [Flang][OpenMP] Extend omp requires detection in Bridge.cpp (#188106)

Commit
19 hours ago
[Flang][OpenMP] Extend omp requires detection in Bridge.cpp (#188106) Currently, we do not check the module for requires directives, which means we'll miss these and not set them on the OpenMP module. Otherwise, due to the first come first serve method we currently check the symbols, there is certain formats that would mean the compiler would miss that a user had specified requires somewhere in the module. This is partially but not fully avoided by the Semantics layer pushing the requires on to the top most PFT symbol, as it is entirely possible to create a legal Fortran program where you could have two or more of these (e.g. module and main program in one file, standalone funcitons intermixed with modules or main program). Some examples of this are shown in the added Fortran test. This PR opts to resolve it by gathering all of the relevant symbols and processing them. Also removed gathering from BlockDataUnit as I don't think these symbols ever get the requires applied.
Author
Parents
Loading