diff --git a/flang/include/flang/Lower/LoweringOptions.def b/flang/include/flang/Lower/LoweringOptions.def index 7fb75f79bfc1..503acdac869c 100644 --- a/flang/include/flang/Lower/LoweringOptions.def +++ b/flang/include/flang/Lower/LoweringOptions.def @@ -27,14 +27,14 @@ ENUM_LOWERINGOPT(OptimizeTranspose, unsigned, 1, 1) /// If true, enable polymorphic type lowering feature. Off by default. ENUM_LOWERINGOPT(PolymorphicTypeImpl, unsigned, 1, 0) -/// If true, lower to High level FIR before lowering to FIR. -/// Off by default until fully ready. -ENUM_LOWERINGOPT(LowerToHighLevelFIR, unsigned, 1, 0) +/// If true, lower to High level FIR before lowering to FIR. On by default. +ENUM_LOWERINGOPT(LowerToHighLevelFIR, unsigned, 1, 1) /// If true, reverse PowerPC native vector element order. ENUM_LOWERINGOPT(NoPPCNativeVecElemOrder, unsigned, 1, 0) -/// If true, assume external names will be suffixed with an underscore. On by default. +/// If true, assume external names will be suffixed with an underscore. +/// On by default. ENUM_LOWERINGOPT(Underscoring, unsigned, 1, 1) #undef LOWERINGOPT diff --git a/flang/test/HLFIR/hlfir-flags.f90 b/flang/test/HLFIR/hlfir-flags.f90 index 8ba9b21562a6..b383a79d12c2 100644 --- a/flang/test/HLFIR/hlfir-flags.f90 +++ b/flang/test/HLFIR/hlfir-flags.f90 @@ -1,20 +1,22 @@ -! Test -flang-experimental-hlfir (flang-new), -hlfir (bbc), -emit-hlfir, -emit-fir flags +! Test -flang-deprecated-hlfir, -flang-experimental-hlfir (flang-new), and +! -hlfir (bbc), -emit-hlfir, -emit-fir flags ! RUN: %flang_fc1 -emit-hlfir -o - %s | FileCheck --check-prefix HLFIR --check-prefix ALL %s ! RUN: bbc -emit-hlfir -o - %s | FileCheck --check-prefix HLFIR --check-prefix ALL %s -! RUN: %flang_fc1 -emit-hlfir -flang-experimental-hlfir -o - %s | FileCheck --check-prefix HLFIR --check-prefix ALL %s +! RUN: %flang_fc1 -emit-hlfir -o - %s | FileCheck --check-prefix HLFIR --check-prefix ALL %s ! RUN: bbc -emit-hlfir -hlfir -o - %s | FileCheck --check-prefix HLFIR --check-prefix ALL %s -! RUN: %flang_fc1 -emit-fir -o - %s | FileCheck %s --check-prefix NO-HLFIR --check-prefix ALL +! RUN: %flang_fc1 -emit-fir -o - %s | FileCheck --check-prefix FIR --check-prefix ALL %s ! RUN: %flang_fc1 -emit-fir -flang-deprecated-no-hlfir -o - %s | FileCheck %s --check-prefix NO-HLFIR --check-prefix ALL -! RUN: bbc -emit-fir -o - %s | FileCheck %s --check-prefix NO-HLFIR --check-prefix ALL -! RUN: %flang_fc1 -emit-fir -flang-experimental-hlfir -o - %s | FileCheck --check-prefix FIR --check-prefix ALL %s -! RUN: bbc -emit-fir -hlfir -o - %s | FileCheck --check-prefix FIR --check-prefix ALL %s +! RUN: %flang_fc1 -emit-fir -flang-experimental-hlfir -o - %s | FileCheck %s --check-prefix FIR --check-prefix ALL +! RUN: bbc -emit-fir -o - %s | FileCheck --check-prefix FIR --check-prefix ALL %s +! RUN: bbc -emit-fir -hlfir=false -o - %s | FileCheck %s --check-prefix NO-HLFIR --check-prefix ALL -! | Action | -flang-experimental-hlfir / -hlfir? | Result | -! | =========== | =================================== | =============================== | -! | -emit-hlfir | N | Outputs HLFIR | -! | -emit-hlfir | Y | Outputs HLFIR | -! | -emit-fir | N | Outputs FIR, using old lowering | -! | -emit-fir | Y | Outputs FIR, lowering via HLFIR | +! | Action | -flang-deprecated-no-hlfir | Result | +! | | / -hlfir=false? | | +! | =========== | =========================== | =============================== | +! | -emit-hlfir | N | Outputs HLFIR | +! | -emit-hlfir | Y | Outputs HLFIR | +! | -emit-fir | N | Outputs FIR, lowering via HLFIR | +! | -emit-fir | Y | Outputs FIR, using old lowering | subroutine test(a, res) real :: a(:), res diff --git a/flang/tools/bbc/bbc.cpp b/flang/tools/bbc/bbc.cpp index 8374532571fd..0c35d5c8438c 100644 --- a/flang/tools/bbc/bbc.cpp +++ b/flang/tools/bbc/bbc.cpp @@ -193,7 +193,7 @@ static llvm::cl::opt enableNoPPCNativeVecElemOrder( static llvm::cl::opt useHLFIR("hlfir", llvm::cl::desc("Lower to high level FIR"), - llvm::cl::init(false)); + llvm::cl::init(true)); static llvm::cl::opt enableCUDA("fcuda", llvm::cl::desc("enable CUDA Fortran"),