[flang-commits] [flang] [flang][openacc] Allow open acc routines from other modules. (PR #136012)
Valentin Clement バレンタイン クレメン via flang-commits
flang-commits at lists.llvm.org
Mon Apr 28 08:48:16 PDT 2025
================
@@ -465,12 +458,24 @@ class FirConverter : public Fortran::lower::AbstractConverter {
Fortran::common::LanguageFeature::CUDA));
});
- finalizeOpenACCLowering();
finalizeOpenMPLowering(globalOmpRequiresSymbol);
}
/// Declare a function.
void declareFunction(Fortran::lower::pft::FunctionLikeUnit &funit) {
+ // Since this is a recursive function, we only need to create a new builder
+ // for each top-level declaration. It would be simpler to have a single
+ // builder for the entire translation unit, but that requires a lot of
+ // changes to the code.
+ // FIXME: Once createGlobalOutsideOfFunctionLowering is fixed, we can
+ // remove this code and share the module builder.
+ bool newBuilder = false;
+ if (!builder) {
+ newBuilder = true;
+ builder = new fir::FirOpBuilder(bridge.getModule(), bridge.getKindMap(),
----------------
clementval wrote:
Why do you need a new builder here?
https://github.com/llvm/llvm-project/pull/136012
More information about the flang-commits
mailing list