aboutsummaryrefslogtreecommitdiff
path: root/flang
diff options
context:
space:
mode:
authorKrzysztof Parzyszek <Krzysztof.Parzyszek@amd.com>2024-02-23 15:27:47 -0600
committerGitHub <noreply@github.com>2024-02-23 15:27:47 -0600
commit47aee8b56d65e2bac5c7128424ff06134e454d83 (patch)
tree5aead8a7901a15745fdf48e6dbe98a8ad81a7381 /flang
parent5c90527b436d1c7d753c187aff1b45e6c8da1af6 (diff)
downloadllvm-47aee8b56d65e2bac5c7128424ff06134e454d83.zip
llvm-47aee8b56d65e2bac5c7128424ff06134e454d83.tar.gz
llvm-47aee8b56d65e2bac5c7128424ff06134e454d83.tar.bz2
[flang][OpenMP] Set OpenMP attributes in MLIR module in bbc before lo… (#82774)
…wering Right now attributes like OpenMP version or target attributes for offload are set after lowering in bbc. The flang frontend sets them before lowering, making them available in the lowering process. This change sets them before lowering in bbc as well.
Diffstat (limited to 'flang')
-rw-r--r--flang/tools/bbc/bbc.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/flang/tools/bbc/bbc.cpp b/flang/tools/bbc/bbc.cpp
index e701fde..73d740f 100644
--- a/flang/tools/bbc/bbc.cpp
+++ b/flang/tools/bbc/bbc.cpp
@@ -360,7 +360,6 @@ static mlir::LogicalResult convertFortranSourceToMLIR(
semanticsContext.targetCharacteristics(), parsing.allCooked(),
targetTriple, kindMap, loweringOptions, envDefaults,
semanticsContext.languageFeatures(), targetMachine);
- burnside.lower(parseTree, semanticsContext);
mlir::ModuleOp mlirModule = burnside.getModule();
if (enableOpenMP) {
if (enableOpenMPGPU && !enableOpenMPDevice) {
@@ -376,6 +375,7 @@ static mlir::LogicalResult convertFortranSourceToMLIR(
setOffloadModuleInterfaceAttributes(mlirModule, offloadModuleOpts);
setOpenMPVersionAttribute(mlirModule, setOpenMPVersion);
}
+ burnside.lower(parseTree, semanticsContext);
std::error_code ec;
std::string outputName = outputFilename;
if (!outputName.size())