Skip to content

Commit 877f5b8

Browse files
tarunprabhuLukacma
authored andcommitted
[flang][docs] Replace references to f18 in the docs with flang (Part 1)
In addition to the replacement, some light editing of the text was also carried out. These edits primarily address issues of grammar and style. The remaining references to "f18" will be replaced in a later commit.
1 parent a4b4b97 commit 877f5b8

File tree

11 files changed

+81
-80
lines changed

11 files changed

+81
-80
lines changed

flang/docs/AssumedRank.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ Assumed-rank dummies are also represented in the
101101
represent assumed-rank in procedure characteristics.
102102

103103
### Runtime Representation of Assumed-Ranks
104-
Assumed-ranks are implemented as CFI_cdesc_t (18.5.3) with the addition of an
105-
f18 specific addendum when required for the type. This is the usual f18
106-
descriptor, and no changes is required to represent assumed-ranks in this data
104+
Assumed-ranks are implemented as CFI_cdesc_t (18.5.3) with the addition of a
105+
Flang specific addendum when required for the type. This is the usual Flang
106+
descriptor, and no changes are required to represent assumed-ranks in this data
107107
structure. In fact, there is no difference between the runtime descriptor
108108
created for an assumed shape and the runtime descriptor created when the
109109
corresponding entity is passed as an assumed-rank.

flang/docs/C++17.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
77
-->
88

9-
# C++14/17 features used in f18
9+
# C++14/17 features used in Flang
1010

1111
```{contents}
1212
---
@@ -27,7 +27,7 @@ out the details of how our C++ code should look and gives
2727
guidance about feature usage.
2828

2929
We have chosen to use some features of the recent C++17
30-
language standard in f18.
30+
language standard in Flang.
3131
The most important of these are:
3232
* sum types (discriminated unions) in the form of `std::variant`
3333
* `using` template parameter packs
@@ -41,7 +41,7 @@ in this list because it's not particularly well known.)
4141
## Sum types
4242

4343
First, some background information to explain the need for sum types
44-
in f18.
44+
in Flang.
4545

4646
Fortran is notoriously problematic to lex and parse, as tokenization
4747
depends on the state of the partial parse;
@@ -57,7 +57,7 @@ a unified lexer/parser.
5757
We have chosen to do so because it is simpler and should reduce
5858
both initial bugs and long-term maintenance.
5959

60-
Specifically, f18's parser uses the technique of recursive descent with
60+
Specifically, Flang's parser uses the technique of recursive descent with
6161
backtracking.
6262
It is constructed as the incremental composition of pure parsing functions
6363
that each, when given a context (location in the input stream plus some state),
@@ -73,7 +73,7 @@ of Fortran.
7373

7474
The specification of Fortran uses a form of BNF with alternatives,
7575
optional elements, sequences, and lists. Each of these constructs
76-
in the Fortran grammar maps directly in the f18 parser to both
76+
in the Fortran grammar maps directly in Flang's parser to both
7777
the means of combining other parsers as alternatives, &c., and to
7878
the declarations of the parse tree data structures that represent
7979
the results of successful parses.
@@ -87,10 +87,10 @@ The bounded polymorphism supplied by the C++17 `std::variant` fits
8787
those needs exactly.
8888
For example, production R502 in Fortran defines the top-level
8989
program unit of Fortran as being a function, subroutine, module, &c.
90-
The `struct ProgramUnit` in the f18 parse tree header file
90+
`struct ProgramUnit` in the Flang parse tree header file
9191
represents each program unit with a member that is a `std::variant`
9292
over the six possibilities.
93-
Similarly, the parser for that type in the f18 grammar has six alternatives,
93+
Similarly, the parser for that type in Flang's grammar has six alternatives,
9494
each of which constructs an instance of `ProgramUnit` upon the result of
9595
parsing a `Module`, `FunctionSubprogram`, and so on.
9696

@@ -99,7 +99,7 @@ parse is typically implemented with overloaded functions.
9999
A function instantiated on `ProgramUnit` will use `std::visit` to
100100
identify the right alternative and perform the right actions.
101101
The call to `std::visit` must pass a visitor that can handle all
102-
of the possibilities, and f18 will fail to build if one is missing.
102+
of the possibilities, and Flang will fail to build if one is missing.
103103

104104
Were we unable to use `std::variant` directly, we would likely
105105
have chosen to implement a local `SumType` replacement; in the

flang/docs/C++style.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ is clear on usage, follow it.
3030
is pretty good and comes with lots of justifications for its rules.
3131
* Reasonable exceptions to these guidelines can be made.
3232
* Be aware of some workarounds for known issues in older C++ compilers that should
33-
still be able to compile f18. They are listed at the end of this document.
33+
still be able to compile Flang. They are listed at the end of this document.
3434

3535
## In particular:
3636

@@ -261,7 +261,7 @@ move semantics, member access, and comparison for equality; suitable for use in
261261
`std::variant<>`.
262262
* `std::unique_ptr<>`: A nullable pointer with ownership, null by default,
263263
not copyable, reassignable.
264-
F18 has a helpful `Deleter<>` class template that makes `unique_ptr<>`
264+
Flang has a helpful `Deleter<>` class template that makes `unique_ptr<>`
265265
easier to use with forward-referenced data types.
266266
* `std::shared_ptr<>`: A nullable pointer with shared ownership via reference
267267
counting, null by default, shallowly copyable, reassignable, and slow.
@@ -312,9 +312,9 @@ Consistency is one of many aspects in the pursuit of clarity,
312312
but not an end in itself.
313313

314314
## C++ compiler bug workarounds
315-
Below is a list of workarounds for C++ compiler bugs met with f18 that, even
316-
if the bugs are fixed in latest C++ compiler versions, need to be applied so
317-
that all desired tool-chains can compile f18.
315+
Below is a list of workarounds for C++ compiler bugs encountered when building
316+
Flang. Even if the bugs are fixed in latest C++ compiler versions, these need to
317+
be applied so that all desired tool-chains can compile Flang.
318318

319319
### Explicitly move noncopyable local variable into optional results
320320

@@ -338,7 +338,7 @@ std::optional<CantBeCopied> fooOK() {
338338
}
339339
```
340340
The underlying bug is actually not specific to `std::optional` but this is the most common
341-
case in f18 where the issue may occur. The actual bug can be reproduced with any class `B`
341+
case in Flang where the issue may occur. The actual bug can be reproduced with any class `B`
342342
that has a perfect forwarding constructor taking `CantBeCopied` as argument:
343343
`template<typename CantBeCopied> B(CantBeCopied&& x) x_{std::forward<CantBeCopied>(x)} {}`.
344344
In such scenarios, Ubuntu 18.04 g++ fails to instantiate the move constructor

flang/docs/Calls.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ PGI passes host instance links in descriptors in additional arguments
529529
that are not always successfully forwarded across implicit interfaces,
530530
sometimes leading to crashes when they turn out to be needed.
531531

532-
F18 will manage a pool of trampolines in its runtime support library
532+
Flang will manage a pool of trampolines in its runtime support library
533533
that can be used to pass internal procedures as effective arguments
534534
to F77ish procedures, so that
535535
a bare code address can serve to represent the effective argument.
@@ -569,14 +569,14 @@ Fortran 2018 explicitly enables us to do this with a correction to Fortran
569569
2003 in 4.3.4(5).
570570

571571
Last, there must be reasonably permanent naming conventions used
572-
by the F18 runtime library for those unrestricted specific intrinsic
572+
by Flang's runtime library for those unrestricted specific intrinsic
573573
functions (table 16.2 in 16.8) and extensions that can be passed as
574574
arguments.
575575

576576
In these cases where external naming is at the discretion
577577
of the implementation, we should use names that are not in the C language
578578
user namespace, begin with something that identifies
579-
the current incompatible version of F18, the module, the submodule, and
579+
the current incompatible version of Flang, the module, the submodule, and
580580
elemental SIMD width, and are followed by the external name.
581581
The parts of the external name can be separated by some character that
582582
is acceptable for use in LLVM IR and assembly language but not in user

flang/docs/Character.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
77
-->
88

9-
# Implementation of `CHARACTER` types in f18
9+
# Implementation of `CHARACTER` types in Flang
1010

1111
```{contents}
1212
---
@@ -16,7 +16,7 @@ local:
1616

1717
## Kinds and Character Sets
1818

19-
The f18 compiler and runtime support three kinds of the intrinsic
19+
The Flang compiler and runtime support three kinds of the intrinsic
2020
`CHARACTER` type of Fortran 2018.
2121
The default (`CHARACTER(KIND=1)`) holds 8-bit character codes;
2222
`CHARACTER(KIND=2)` holds 16-bit character codes;
@@ -108,12 +108,12 @@ The result of `//` may be used
108108
* as the value of a specifier of an I/O statement,
109109
* or as the value of a statement function.
110110

111-
The f18 compiler has a general (but slow) means of implementing concatenation
111+
The Flang compiler has a general (but slow) means of implementing concatenation
112112
and a specialized (fast) option to optimize the most common case.
113113

114114
### General concatenation
115115

116-
In the most general case, the f18 compiler's generated code and
116+
In the most general case, Flang's generated code and
117117
runtime support library represent the result as a deferred-length allocatable
118118
`CHARACTER` temporary scalar or array variable that is initialized
119119
as a zero-length array by `AllocatableInitCharacter()`

flang/docs/DoConcurrent.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,8 @@ Specifically, an easy means is required that stipulates that localization
280280
should apply at most only to the obvious cases of local non-pointer
281281
non-allocatable scalars.
282282

283-
In the LLVM Fortran compiler project (a/k/a "flang", "f18") we considered
283+
In the LLVM Fortran compiler project (now known as "flang", previously also
284+
known as "f18") we considered
284285
several solutions to this problem.
285286
1. Add syntax (e.g., `DO PARALLEL` or `DO CONCURRENT() DEFAULT(PARALLEL)`)
286287
by which one can inform the compiler that it should localize only

flang/docs/Extensions.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ end
8484
be "local identifiers" and should be distinct in the "inclusive
8585
scope" -- i.e., not scoped by `BLOCK` constructs.
8686
As most (but not all) compilers implement `BLOCK` scoping of construct
87-
names, so does f18, with a portability warning.
87+
names, so does Flang, with a portability warning.
8888
* 15.6.4 paragraph 2 prohibits an implicitly typed statement function
8989
from sharing the same name as a symbol in its scope's host, if it
9090
has one.
@@ -153,7 +153,7 @@ end
153153
that a call to intrinsic module procedure `ieee_support_halting` with
154154
a constant argument has a compile time constant result in `constant
155155
expression` and `specification expression` contexts. In compilations
156-
where this information is not known at compile time, f18 generates code
156+
where this information is not known at compile time, Flang generates code
157157
to determine the absence or presence of this capability at runtime.
158158
A call to `ieee_support_halting` in contexts that the standard requires
159159
to be constant will generate a compilation error. `ieee_support_standard`
@@ -366,7 +366,7 @@ end
366366
* The legacy extension intrinsic functions `IZEXT` and `JZEXT`
367367
are supported; `ZEXT` has different behavior with various older
368368
compilers, so it is not supported.
369-
* f18 doesn't impose a limit on the number of continuation lines
369+
* Flang doesn't impose a limit on the number of continuation lines
370370
allowed for a single statement.
371371
* When a type-bound procedure declaration statement has neither interface
372372
nor attributes, the "::" before the bindings is optional, even
@@ -553,7 +553,7 @@ end
553553
* Fortran explicitly ignores type declaration statements when they
554554
attempt to type the name of a generic intrinsic function (8.2 p3).
555555
One can declare `CHARACTER::COS` and still get a real result
556-
from `COS(3.14159)`, for example. f18 will complain when a
556+
from `COS(3.14159)`, for example. Flang will complain when a
557557
generic intrinsic function's inferred result type does not
558558
match an explicit declaration. This message is a warning.
559559

@@ -570,7 +570,7 @@ end
570570

571571
## Standard features that might as well not be
572572

573-
* f18 supports designators with constant expressions, properly
573+
* Flang supports designators with constant expressions, properly
574574
constrained, as initial data targets for data pointers in
575575
initializers of variable and component declarations and in
576576
`DATA` statements; e.g., `REAL, POINTER :: P => T(1:10:2)`.
@@ -587,8 +587,8 @@ end
587587
* The standard doesn't explicitly require that a named constant that
588588
appears as part of a complex-literal-constant be a scalar, but
589589
most compilers emit an error when an array appears.
590-
f18 supports them with a portability warning.
591-
* f18 does not enforce a blanket prohibition against generic
590+
Flang supports them with a portability warning.
591+
* Flang does not enforce a blanket prohibition against generic
592592
interfaces containing a mixture of functions and subroutines.
593593
We allow both to appear, unlike several other Fortran compilers.
594594
This is especially desirable when two generics of the same
@@ -655,7 +655,7 @@ end
655655
treat them as references to implicitly typed local variables, and
656656
load uninitialized values.
657657

658-
In f18, we chose to emit an error message for this case since the standard
658+
In Flang, we chose to emit an error message for this case since the standard
659659
is unclear, the usage is not portable, and the issue can be easily resolved
660660
by adding a declaration.
661661

@@ -686,7 +686,7 @@ end
686686

687687
* When a `DATA` statement in a `BLOCK` construct could be construed as
688688
either initializing a host-associated object or declaring a new local
689-
initialized object, f18 interprets the standard's classification of
689+
initialized object, Flang interprets the standard's classification of
690690
a `DATA` statement as being a "declaration" rather than a "specification"
691691
construct, and notes that the `BLOCK` construct is defined as localizing
692692
names that have specifications in the `BLOCK` construct.
@@ -703,7 +703,7 @@ end subroutine
703703
Other Fortran compilers disagree with each other in their interpretations
704704
of this example.
705705
The precedent among the most commonly used compilers
706-
agrees with f18's interpretation: a `DATA` statement without any other
706+
agrees with Flang's interpretation: a `DATA` statement without any other
707707
specification of the name refers to the host-associated object.
708708

709709
* Many Fortran compilers allow a non-generic procedure to be `USE`-associated
@@ -729,7 +729,7 @@ module m2
729729
end module
730730
```
731731

732-
This case elicits a warning from f18, as it should not be treated
732+
This case elicits a warning from Flang, as it should not be treated
733733
any differently than the same case with the non-generic procedure of
734734
the same name being defined in the same scope rather than being
735735
`USE`-associated into it, which is explicitly non-conforming in the
@@ -747,7 +747,7 @@ end module
747747
symbols, much less appear in specification inquiries, and there are
748748
application codes that expect exterior symbols whose names match
749749
components to be visible in a derived-type definition's default initialization
750-
expressions, and so f18 follows that precedent.
750+
expressions, and so Flang follows that precedent.
751751

752752
* 19.3.1p1 "Within its scope, a local identifier of an entity of class (1)
753753
or class (4) shall not be the same as a global identifier used in that scope..."
@@ -769,17 +769,17 @@ end module
769769
left-hand side for a pointer assignment statement, and we emit a
770770
portability warning when it is not.
771771

772-
* F18 allows a `USE` statement to reference a module that is defined later
772+
* Flang allows a `USE` statement to reference a module that is defined later
773773
in the same compilation unit, so long as mutual dependencies do not form
774774
a cycle.
775775
This feature forestalls any risk of such a `USE` statement reading an
776776
obsolete module file from a previous compilation and then overwriting
777777
that file later.
778778

779-
* F18 allows `OPTIONAL` dummy arguments to interoperable procedures
779+
* Flang allows `OPTIONAL` dummy arguments to interoperable procedures
780780
unless they are `VALUE` (C865).
781781

782-
* F18 processes the `NAMELIST` group declarations in a scope after it
782+
* Flang processes the `NAMELIST` group declarations in a scope after it
783783
has resolved all of the names in that scope. This means that names
784784
that appear before their local declarations do not resolve to host
785785
associated objects and do not elicit errors about improper redeclarations
@@ -862,11 +862,11 @@ print *, [(j,j=1,10)]
862862

863863
* The Fortran standard doesn't mention integer overflow explicitly. In many cases,
864864
however, integer overflow makes programs non-conforming.
865-
F18 follows other widely-used Fortran compilers. Specifically, f18 assumes
865+
Flang follows other widely-used Fortran compilers. Specifically, Flang assumes
866866
integer overflow never occurs in address calculations and increment of
867867
do-variable unless the option `-fwrapv` is enabled.
868868

869-
* Two new ieee_round_type values were added in f18 beyond the four values
869+
* Two new ieee_round_type values were added in Flang beyond the four values
870870
defined in f03 and f08: ieee_away and ieee_other. Contemporary hardware
871871
typically does not have support for these rounding modes;
872872
ieee_support_rounding calls for these values return false.

flang/docs/FortranForCProgrammers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ Preprocessing behavior varies across implementations and one should not depend o
304304
much portability.
305305
Preprocessing is typically requested by the use of a capitalized filename
306306
suffix (e.g., "foo.F90") or a compiler command line option.
307-
(Since the F18 compiler always runs its built-in preprocessing stage,
307+
(Since Flang always runs its built-in preprocessing stage,
308308
no special option or filename suffix is required.)
309309

310310
## "Object Oriented" Programming

flang/docs/FortranIR.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ FIR is intentionally similar to SIL from the statement level up to the level of
171171
Program, procedure, region, and basic block all leverage code from LLVM, in much the same way as SIL. These data structures have significant investment and engineering behind their use in compilers, and it makes sense to leverage that work.
172172

173173
* Pro: Uses LLVM data structures, pervasive in compiler projects such as LLVM, SIL, etc.
174-
* Pro: Get used to seeing and using LLVM, as f18 aims to be an LLVM project
174+
* Pro: Get used to seeing and using LLVM, as Flang aims to be an LLVM project
175175
* Con: Uses LLVM data structures, which the project has been avoiding
176176

177177
#### Alternative: C++ Standard Template Library

flang/docs/GettingInvolved.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Contributions to Flang are done using GitHub Pull Requests and follow the
4141
### Flang Slack Workspace
4242

4343
- There is a Slack workspace dedicated to Flang.
44-
- There are a number of topic-oriented channels available (e.g., #driver, #f18-semantics, #fir).
44+
- There are a number of topic-oriented channels available (e.g., #driver, #fir).
4545
- Add yourself via the *[invitation link](https://join.slack.com/t/flang-compiler/shared_invite/zt-2pcn51lh-VrRQL_YUOkxA_1CEfMGQhw "title")*
4646

4747
## Calls

0 commit comments

Comments
 (0)