Skip to content

Commit c97dbb1

Browse files
Fix review comments
1 parent c86965c commit c97dbb1

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

flang/include/flang/Tools/CrossToolHelpers.h

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,15 @@
2323

2424
/// Configuriation for the MLIR to LLVM pass pipeline.
2525
struct MLIRToLLVMPassPipelineConfig {
26-
MLIRToLLVMPassPipelineConfig(llvm::OptimizationLevel level) {
26+
explicit MLIRToLLVMPassPipelineConfig(llvm::OptimizationLevel level) {
2727
OptLevel = level;
28-
StackArrays = false;
29-
Underscoring = true;
30-
LoopVersioning = false;
31-
DebugInfo = llvm::codegenoptions::NoDebugInfo;
3228
}
3329
llvm::OptimizationLevel OptLevel; ///< optimisation level
34-
bool StackArrays; ///< convert memory allocations to alloca.
35-
bool Underscoring; ///< add underscores to function names.
36-
bool LoopVersioning; ///< Run the version loop pass.
37-
llvm::codegenoptions::DebugInfoKind DebugInfo; ///< Debug info generation.
30+
bool StackArrays = false; ///< convert memory allocations to alloca.
31+
bool Underscoring = true; ///< add underscores to function names.
32+
bool LoopVersioning = false; ///< Run the version loop pass.
33+
llvm::codegenoptions::DebugInfoKind DebugInfo =
34+
llvm::codegenoptions::NoDebugInfo; ///< Debug info generation.
3835
};
3936

4037
struct OffloadModuleOpts {

flang/tools/bbc/bbc.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,8 @@ static mlir::LogicalResult convertFortranSourceToMLIR(
368368
pm.addPass(std::make_unique<Fortran::lower::VerifierPass>());
369369

370370
// Add O2 optimizer pass pipeline.
371-
fir::createDefaultFIROptimizerPassPipeline(pm, llvm::OptimizationLevel::O2);
371+
fir::createDefaultFIROptimizerPassPipeline(
372+
pm, MLIRToLLVMPassPipelineConfig(llvm::OptimizationLevel::O2));
372373
}
373374

374375
if (mlir::succeeded(pm.run(mlirModule))) {

0 commit comments

Comments
 (0)