Skip to content

Commit ccca3c6

Browse files
authored
[flang] enable assumed-rank lowering by default (#110893)
Aside from a minor TODO about polymorphic RANK(*) (https://github.com/llvm/llvm-project/blob/2b8e81ce919e8db857dc2ba20012e9020af07294/flang/lib/Lower/Bridge.cpp#L3459), the implementation for assumed-rank is ready for everyone to use.
1 parent a10f5ab commit ccca3c6

9 files changed

+12
-12
lines changed

flang/lib/Lower/ConvertVariable.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@
4646
#include "llvm/Support/Debug.h"
4747
#include <optional>
4848

49-
static llvm::cl::opt<bool> allowAssumedRank(
50-
"allow-assumed-rank",
51-
llvm::cl::desc("Enable assumed rank lowering - experimental"),
52-
llvm::cl::init(false));
49+
static llvm::cl::opt<bool>
50+
allowAssumedRank("allow-assumed-rank",
51+
llvm::cl::desc("Enable assumed rank lowering"),
52+
llvm::cl::init(true));
5353

5454
#define DEBUG_TYPE "flang-lower-variable"
5555

flang/test/Lower/HLFIR/assumed-rank-calls.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
! Test passing of assumed-ranks that require creating a
22
! a new descriptor for the dummy argument (different lower bounds,
33
! attribute, or dynamic type)
4-
! RUN: bbc -emit-hlfir -allow-assumed-rank -o - %s | FileCheck %s
4+
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s
55

66
subroutine test_alloc_to_nonalloc(x)
77
real, allocatable :: x(..)

flang/test/Lower/HLFIR/assumed-rank-entry.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
! Test assumed-rank dummy argument that is not present in
22
! all ENTRY statements.
3-
! RUN: bbc -emit-hlfir -allow-assumed-rank -o - %s | FileCheck %s
3+
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s
44

55
subroutine test_main_entry(x)
66
real :: x(..)

flang/test/Lower/HLFIR/assumed-rank-inquiries-2.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
! Test lowering of SIZE/SIZEOF inquiry intrinsics with assumed-ranks
22
! arguments.
3-
! RUN: bbc -emit-hlfir -o - %s -allow-assumed-rank | FileCheck %s
3+
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s
44

55

66
subroutine test_size_1(x)

flang/test/Lower/HLFIR/assumed-rank-inquiries-3.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
! Test shape lowering for assumed-rank
2-
! RUN: bbc -emit-hlfir -o - %s -allow-assumed-rank | FileCheck %s
2+
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s
33

44
subroutine test_shape(x)
55
real :: x(..)

flang/test/Lower/HLFIR/assumed-rank-inquiries.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
! Test lowering of inquiry intrinsics with assumed-ranks arguments.
2-
! RUN: bbc -emit-hlfir -o - %s -allow-assumed-rank | FileCheck %s
2+
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s
33

44
subroutine test_allocated(x)
55
real, allocatable :: x(..)

flang/test/Lower/HLFIR/assumed-rank-internal-proc.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
! Test assumed-rank capture inside internal procedures.
2-
! RUN: bbc -emit-hlfir -o - %s -allow-assumed-rank | FileCheck %s
2+
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s
33

44
subroutine test_assumed_rank(x)
55
real :: x(..)

flang/test/Lower/HLFIR/convert-variable-assumed-rank.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
! Test lowering of assumed-rank variables
2-
! RUN: bbc -emit-hlfir %s -allow-assumed-rank -o - | FileCheck %s
2+
! RUN: bbc -emit-hlfir %s -o - | FileCheck %s
33

44
module assumed_rank_tests
55
interface

flang/test/Lower/HLFIR/select-rank.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
! Test lowering of select rank to HLFIR
2-
! RUN: bbc -emit-hlfir -o - %s -allow-assumed-rank | FileCheck %s
2+
! RUN: bbc -emit-hlfir -o - %s | FileCheck %s
33

44
module iface_helpers
55
interface

0 commit comments

Comments
 (0)