Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

95 lines
1.9 KiB
Markdown
Raw Normal View History

# Welcome to Flang's documentation
Flang is LLVM's Fortran frontend that can be found
[here](https://github.com/llvm/llvm-project/tree/main/flang). It is often
referred to as "LLVM Flang" to differentiate itself from ["Classic
Flang"](https://github.com/flang-compiler/flang) - these are two separate and
independent Fortran compilers. LLVM Flang is under active development. While it
is capable of generating executables for a number of examples, some
functionality is still missing. See [Getting Involved](GettingInvolved) for tips
on how to get in touch with us and to learn more about the current status.
```{eval-rst}
.. toctree::
:titlesonly:
ReleaseNotes
```
# Contributing to Flang
```{eval-rst}
.. toctree::
:titlesonly:
C++17
C++style
DesignGuideline
FortranForCProgrammers
GettingInvolved
GettingStarted
ImplementingASemanticCheck
PullRequestChecklist
```
# Design Documents
```{eval-rst}
.. toctree::
:titlesonly:
Aliasing
AliasingAnalysisFIR
ArrayComposition
AssumedRank
BijectiveInternalNameUniquing
Calls
Character
ComplexOperations
ControlFlowGraph
Directives
DoConcurrent
Extensions
F202X
FIRArrayOperations
FIRLangRef
FlangCommandLineReference
FlangDriver
FortranFeatureHistory
FortranIR
FortranLLVMTestSuite
HighLevelFIR
IORuntimeInternals
InternalProcedureTrampolines
Intrinsics
IntrinsicTypes
LabelResolution
ModFiles
OpenACC
OpenACC-descriptor-management.md
OpenMP-4.5-grammar.md
[Flang][MLIR][OpenMP] Create a deferred declare target marking process for Bridge.cpp (#78502) This patch seeks to create a process that happens on module finalization for OpenMP, in which a list of operations that had declare target directives applied to them and were not generated at the time of processing the original declare target directive are re-checked to apply the appropriate declare target semantics. This works by maintaining a vector of declare target related data inside of the FIR converter, in this case the symbol and the two relevant unsigned integers representing the enumerators. This vector is added to via a new function called from Bridge.cpp, insertDeferredDeclareTargets, which happens prior to the processing of the directive (similarly to getDeclareTargetFunctionDevice currently for requires), it effectively checks if the Operation the declare target directive is applied to currently exists, if it doesn't it appends to the vector. This is a seperate function to the processing of the declare target via the overloaded genOMP as we unfortunately do not have access to the list without passing it through every call, as the AbstractConverter we pass will not allow access to it (I've seen no other cases of casting it to a FirConverter, so I opted to not do that). The list is then processed at the end of the module in the finalizeOpenMPLowering function in Bridge by calling a new function markDelayedDeclareTargetFunctions which marks the latently generated operations. In certain cases, some still will not be generated, e.g. if an interface is defined, marked as declare target, but has no definition or usage in the module then it will not be emitted to the module, so due to these cases we must silently ignore when an operation has not been found via it's symbol. The main use-case for this (although, I imagine there is others) is for processing interfaces that have been declared in a module with a declare target directive but do not have their implementation defined in the same module. For example, inside of a seperate C++ module that will be linked in. In cases where the interface is called inside of a target region it'll be marked as used on device appropriately (although, realistically a user should explicitly mark it to match the corresponding definition), however, in cases where it's used in a non-clear manner through something like a function pointer passed to an external call we require this explicit marking, which this patch adds support for (currently will cause the compiler to crash). This patch also adds documentation on the declare target process and mechanisms within the compiler currently.
2024-03-05 17:27:16 +01:00
OpenMP-declare-target
2024-02-13 11:09:06 +00:00
OpenMP-descriptor-management
OpenMP-semantics
OptionComparison
Overview
ParameterizedDerivedTypes
ParserCombinators
Parsing
PolymorphicEntities
Preprocessing
ProcedurePointer
RuntimeDescriptor
RuntimeTypeInfo
Semantics
f2018-grammar.md
fstack-arrays
```
# Indices and tables
```{eval-rst}
* :ref:`genindex`
* :ref:`search`
```