#
48e96e97 |
| 15-Dec-2023 |
Andrzej Warzyński <andrzej.warzynski@arm.com> |
[flang][driver][nfc] Rename one variable (res -> invoc) (#75535)
The new name better reflects what the variable represents.
|
#
e59e8488 |
| 06-Dec-2023 |
jeanPerier <jperier@nvidia.com> |
[flang] Updating drivers to create data layout before semantics (#73301)
Preliminary patch to change lowering/code generation to use
llvm::DataLayout information instead of generating "sizeof" GEP
[flang] Updating drivers to create data layout before semantics (#73301)
Preliminary patch to change lowering/code generation to use
llvm::DataLayout information instead of generating "sizeof" GEP (see
https://github.com/llvm/llvm-project/issues/71507).
Fortran Semantic analysis needs to know about the target type size and
alignment to deal with common blocks, and intrinsics like
C_SIZEOF/TRANSFER. This information should be obtained from the
llvm::DataLayout so that it is consistent during the whole compilation
flow.
This change is changing flang-new and bbc drivers to:
1. Create the llvm::TargetMachine so that the data layout of the target
can be obtained before semantics.
2. Sharing bbc/flang-new set-up of the
SemanticConstext.targetCharateristics from the llvm::TargetMachine. For
now, the actual part that set-up the Fortran type size and alignment
from the llvm::DataLayout is left TODO so that this change is mostly an
NFC impacting the drivers.
3. Let the lowering bridge set-up the mlir::Module datalayout attributes
since it is doing it for the target attribute, and that allows the llvm
data layout information to be available during lowering.
For flang-new, the changes are code shuffling: the `llvm::TargetMachine`
instance is moved to `CompilerInvocation` class so that it can be used
to set-up the semantic contexts. `setMLIRDataLayout` is moved to
`flang/Optimizer/Support/DataLayout.h` (it will need to be used from
codegen pass for fir-opt target independent testing.)), and the code
setting-up semantics targetCharacteristics is moved to
`Tools/TargetSetup.h` so that it can be shared with bbc.
As a consequence, LLVM targets must be registered when running
semantics, and it is not possible to run semantics for a target that is
not registered with the -triple option (hence the power pc specific
modules can only be built if the PowerPC target is available.
show more ...
|
#
6b8d6590 |
| 05-Dec-2023 |
Tom Eccles <tom.eccles@arm.com> |
[flang] remove -f[no-]alias-analysis (#74343)
Now that tbaa tags pass is enabled by default, I would like to remove
these flags. `-fno-alias-analysis` was originally intended to be useful
for debu
[flang] remove -f[no-]alias-analysis (#74343)
Now that tbaa tags pass is enabled by default, I would like to remove
these flags. `-fno-alias-analysis` was originally intended to be useful
for debugging, but as it also disables tbaa tag generation in codegen,
it turned out to be too noisy.
@banach-space expressed that these flags felt too non-standard.
The tbaa tags pass can be toggled using `-mllvm
-disable-fir-alias-tags=0`
show more ...
|
#
8dc474c6 |
| 04-Dec-2023 |
madanial0 <118996571+madanial0@users.noreply.github.com> |
[flang] Pass Argv0 to getIntriniscDir and getOpenMPHeadersDir (#73254)
The `llvm::sys::fs::getMainExecutable(nullptr, nullptr)` is not able to
obtain the correct executable path on AIX without Argv
[flang] Pass Argv0 to getIntriniscDir and getOpenMPHeadersDir (#73254)
The `llvm::sys::fs::getMainExecutable(nullptr, nullptr)` is not able to
obtain the correct executable path on AIX without Argv0 due to the lack
of a current process on AIX's `proc` filesystem. This causes a build
failure on AIX as intrinsic module directory is missing.
---------
Co-authored-by: Mark Danial <mak.danial@ibm.com>
show more ...
|
#
374e8288 |
| 04-Dec-2023 |
Tom Eccles <tom.eccles@arm.com> |
[flang] (Re-)Enable alias tags pass by default (#74250)
Enable by default for optimization levels higher than 0 (same behavior
as clang).
For simplicity, only forward the flag to the frontend dr
[flang] (Re-)Enable alias tags pass by default (#74250)
Enable by default for optimization levels higher than 0 (same behavior
as clang).
For simplicity, only forward the flag to the frontend driver when it
contradicts what is implied by the optimization level.
This was first landed in
https://github.com/llvm/llvm-project/pull/73111 but was later reverted
due to a performance regression. That regression was fixed by
https://github.com/llvm/llvm-project/pull/74065.
show more ...
|
#
ae4d7ac9 |
| 29-Nov-2023 |
Andrzej Warzyński <andrzej.warzynski@arm.com> |
[flang][driver][nfc] Move the definition of SemanticsContext (#73669)
Moves the defintion of `SemanticsContext` within the Flang driver.
Rather than in `CompilerInvocation`, semantic context fits
[flang][driver][nfc] Move the definition of SemanticsContext (#73669)
Moves the defintion of `SemanticsContext` within the Flang driver.
Rather than in `CompilerInvocation`, semantic context fits better within
`CompilerInstance` that encapsulates the objects that are required to
run the
frontend. `CompilerInvocation` is better suited for objects
encapsulating compiler configuration (e.g. set-up resulting from user
input or host set-up).
show more ...
|
#
5ce5ea37 |
| 29-Nov-2023 |
Tom Eccles <tom.eccles@arm.com> |
Revert "[flang] Enable alias tags pass by default (#73111)" (#73821)
This reverts commit caba0314cf631a3ba3e982cbcdc455224046c7a8.
Serious performance regressions were reported by @vzakhari
http
Revert "[flang] Enable alias tags pass by default (#73111)" (#73821)
This reverts commit caba0314cf631a3ba3e982cbcdc455224046c7a8.
Serious performance regressions were reported by @vzakhari
https://github.com/llvm/llvm-project/issues/58303#issuecomment-1830754173
Fixing this doesn't look quick so I will revert for now.
show more ...
|
#
95943d2f |
| 28-Nov-2023 |
Dominik Adamski <dominik.adamski@amd.com> |
[Flang] Add code-object-version option (#72638)
Information about code object version can be configured by the user for AMD GPU target and it needs to be placed in LLVM IR generated by Flang.
Infor
[Flang] Add code-object-version option (#72638)
Information about code object version can be configured by the user for AMD GPU target and it needs to be placed in LLVM IR generated by Flang.
Information about code object version in MLIR generated by the parser can be reused by other tools. There is no need to specify extra flags if we want to invoke MLIR tools (like fir-opt) separately.
Changes in comparison to a8ac93: * added information about required targets for test flang/test/Driver/driver-help.f90
show more ...
|
#
f00ffcdb |
| 28-Nov-2023 |
Dominik Adamski <dominik.adamski@amd.com> |
Revert "[Flang] Add code-object-version option (#72638)"
This commit causes test errors on buildbots.
This reverts commit a8ac930b99d93b2a539ada7e566993d148899144.
|
#
a8ac930b |
| 28-Nov-2023 |
Dominik Adamski <dominik.adamski@amd.com> |
[Flang] Add code-object-version option (#72638)
Information about code object version can be configured by the user for
AMD GPU target and it needs to be placed in LLVM IR generated by Flang.
In
[Flang] Add code-object-version option (#72638)
Information about code object version can be configured by the user for
AMD GPU target and it needs to be placed in LLVM IR generated by Flang.
Information about code object version in MLIR generated by the parser
can be reused by other tools. There is no need to specify extra flags if
we want to invoke MLIR tools (like fir-opt) separately.
show more ...
|
Revision tags: llvmorg-17.0.6 |
|
#
caba0314 |
| 27-Nov-2023 |
Tom Eccles <tom.eccles@arm.com> |
[flang] Enable alias tags pass by default (#73111)
Enable by default for optimization levels higher than 0 (same behavior
as clang).
For simplicity, only forward the flag to the frontend driver
[flang] Enable alias tags pass by default (#73111)
Enable by default for optimization levels higher than 0 (same behavior
as clang).
For simplicity, only forward the flag to the frontend driver when it
contradicts what is implied by the optimization level.
Since https://github.com/llvm/llvm-project/pull/72903 there are now no
known performance regressions.
show more ...
|
#
77ecb9a4 |
| 15-Nov-2023 |
David Truby <david.truby@arm.com> |
[flang] Add dependent-lib option to flang -fc1 on Windows (#72121)
This patch adds a --dependent-lib option to flang -fc1 on Windows to
embed library link options into the object file. This is need
[flang] Add dependent-lib option to flang -fc1 on Windows (#72121)
This patch adds a --dependent-lib option to flang -fc1 on Windows to
embed library link options into the object file. This is needed to
properly select the Windows CRT to link against.
show more ...
|
Revision tags: llvmorg-17.0.5 |
|
#
a207e630 |
| 13-Nov-2023 |
Tom Eccles <tom.eccles@arm.com> |
[flang] add fveclib flag (#71734)
-fveclib= allows users to choose a vectorized libm so that loops
containing math functions are vectorized.
This is implemented as much as possible in the same w
[flang] add fveclib flag (#71734)
-fveclib= allows users to choose a vectorized libm so that loops
containing math functions are vectorized.
This is implemented as much as possible in the same way as in clang. The
driver test in veclib.f90 is copied from the clang test.
show more ...
|
#
9f265c38 |
| 10-Nov-2023 |
jeanPerier <jperier@nvidia.com> |
[flang][driver] add -flang-deprecated-no-hlfir hidden option (#71820)
Patch 1/3 of the transition to use the HLFIR step by default in lowering
as described in
https://discourse.llvm.org/t/rfc-enab
[flang][driver] add -flang-deprecated-no-hlfir hidden option (#71820)
Patch 1/3 of the transition to use the HLFIR step by default in lowering
as described in
https://discourse.llvm.org/t/rfc-enabling-the-hlfir-lowering-by-default/72778/7
This option will allow to lower code without the HLFIR step during a
grace period as described in the RFC. It is not meant to be a long term
switch for flang.
show more ...
|
Revision tags: llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0 |
|
#
ac0015fe |
| 14-Sep-2023 |
Tom Eccles <tom.eccles@arm.com> |
[flang][driver] add command line arguments for alias tags pass
The ultimate intention is to have this pass enabled by default whenever we are optimizing for speed. But for now, just add the argument
[flang][driver] add command line arguments for alias tags pass
The ultimate intention is to have this pass enabled by default whenever we are optimizing for speed. But for now, just add the arguments so this can be more easily tested.
PR: https://github.com/llvm/llvm-project/pull/68595
show more ...
|
#
11e68c7e |
| 02-Oct-2023 |
Mats Petersson <mats.petersson@arm.com> |
[flang]Add vscale argument parsing (#67676)
Support for vector scale range arguments, for AArch64 scalable vector
extension (SVE) support.
Adds -msve-vector-bits to the flang frontend, and for f
[flang]Add vscale argument parsing (#67676)
Support for vector scale range arguments, for AArch64 scalable vector
extension (SVE) support.
Adds -msve-vector-bits to the flang frontend, and for flang fc1 the
options are -mvscale-min and -mvscale-max (optional). These match the
clang and clang cc1 options for the same purposes.
A further patch will actually USE these arguments.
show more ...
|
#
0a1aa6cd |
| 14-Sep-2023 |
Arthur Eubanks <aeubanks@google.com> |
[NFC][CodeGen] Change CodeGenOpt::Level/CodeGenFileType into enum classes (#66295)
This will make it easy for callers to see issues with and fix up calls
to createTargetMachine after a future chang
[NFC][CodeGen] Change CodeGenOpt::Level/CodeGenFileType into enum classes (#66295)
This will make it easy for callers to see issues with and fix up calls
to createTargetMachine after a future change to the params of
TargetMachine.
This matches other nearby enums.
For downstream users, this should be a fairly straightforward
replacement,
e.g. s/CodeGenOpt::Aggressive/CodeGenOptLevel::Aggressive
or s/CGFT_/CodeGenFileType::
show more ...
|
#
6ffea74f |
| 08-Sep-2023 |
jeanPerier <jperier@nvidia.com> |
[flang] Use BIND name, if any, when consolidating common blocks (#65613)
This patch changes how common blocks are aggregated and named in
lowering in order to:
* fix one obvious issue where BIND
[flang] Use BIND name, if any, when consolidating common blocks (#65613)
This patch changes how common blocks are aggregated and named in
lowering in order to:
* fix one obvious issue where BIND(C) and non BIND(C) with the same
Fortran name were "merged"
* go further and deal with a derivative where the BIND(C) C name matches
the assembly name of a Fortran common block. This is a bit unspecified
IMHO, but gfortran, ifort, and nvfortran "merge" the common block
without complaints as a linker would have done. This required getting
rid of all the common block mangling early in FIR (\_QC) instead of
leaving that to the phase that emits LLVM from FIR because BIND(C)
common blocks did not have mangled names. Care has to be taken to deal
with the underscoring option of flang-new.
See added flang/test/Lower/HLFIR/common-block-bindc-conflicts.f90 for an
illustration.
show more ...
|
Revision tags: llvmorg-17.0.0-rc4 |
|
#
12da8ef0 |
| 30-Aug-2023 |
Victor Kingi <victor.kingi@arm.com> |
[Flang][Driver] Add location and remark option printing to R_Group Diagnostics
For each R_Group diagnostic produced, this patch gives more information about it by printing the absolute file path, th
[Flang][Driver] Add location and remark option printing to R_Group Diagnostics
For each R_Group diagnostic produced, this patch gives more information about it by printing the absolute file path, the line and column number the pass was applied to and finally the remark option that was used.
Clang does the same with the exception of printing the relative path rather than absolute path.
Depends on D159260. That patch adds support for backend passes while this patch adds remark options to the backend test cases.
Reviewed By: awarzynski
Differential Revision: https://reviews.llvm.org/D159258
show more ...
|
Revision tags: llvmorg-17.0.0-rc3 |
|
#
8e315c6c |
| 21-Aug-2023 |
Victor Kingi <victor.kingi@arm.com> |
[Flang][Driver] Add regex support for R_Group options
Add regex handling for all variations of OPT_R_Joined, i.e. `-Rpass`, `-Rpass-analysis`, `-Rpass-missed`.
Depends on D158174. That patch implem
[Flang][Driver] Add regex support for R_Group options
Add regex handling for all variations of OPT_R_Joined, i.e. `-Rpass`, `-Rpass-analysis`, `-Rpass-missed`.
Depends on D158174. That patch implements backend support for R_Group options.
Reviewed By: awarzynski
Differential Revision: https://reviews.llvm.org/D158436
show more ...
|
#
91989c67 |
| 17-Aug-2023 |
Victor Kingi <victor.kingi@arm.com> |
[Flang][Driver] Implement OPT_R_Joined options
Add a BackendRemarkConsumer class, responsible for handling diagnostics received from LLVM. The diagnostics being information on middle and backend pas
[Flang][Driver] Implement OPT_R_Joined options
Add a BackendRemarkConsumer class, responsible for handling diagnostics received from LLVM. The diagnostics being information on middle and backend passes used or not used.
Clang by default has all remarks ignored but manually sets the severity of `R_Group` to visible(`clang::diag::clang::Severity::Remark`). This patch does the same for Flang.
Depends on D157410. That patch adds the R family of options to `FlangOption` and `FC1Option` in `clang/include/clang/Driver/Options.td`
Reviewed By: awarzynski
Differential Revision: https://reviews.llvm.org/D158174
show more ...
|
Revision tags: llvmorg-17.0.0-rc2 |
|
#
9478f661 |
| 02-Aug-2023 |
Justin Bogner <mail@justinbogner.com> |
[Driver] Refactor to use llvm Option's new Visibility flags
This is a big refactor of the clang driver's option handling to use the Visibility flags introduced in https://reviews.llvm.org/D157149. T
[Driver] Refactor to use llvm Option's new Visibility flags
This is a big refactor of the clang driver's option handling to use the Visibility flags introduced in https://reviews.llvm.org/D157149. There are a few distinct parts, but they can't really be split into separate commits and still be made to compile.
1. We split out some of the flags in ClangFlags to ClangVisibility. Note that this does not include any subtractive flags.
2. We update the Flag definitions and OptIn/OptOut constructs in Options.td by hand.
3. We introduce and use a script, update_options_td_flags, to ease migration of flag definitions in Options.td, and we run that on Options.td. I intend to remove this later, but I'm committing it so that downstream forks can use the script to simplify merging.
4. We update calls to OptTable in the clang driver, cc1as, flang, and clangd to use the visibility APIs instead of Include/Exclude flags.
5. We deprecate the Include/Exclude APIs and add a release note.
*if you are running into conflicts with this change:*
Note that https://reviews.llvm.org/D157150 may also be the culprit and if so it should be handled first.
The script in `clang/utils/update_options_td_flags.py` can help. Take the downstream side of all conflicts and then run the following:
``` % cd clang/include/clang/Driver % ../../../utils/update_options_td_flags.py Options.td > Options.td.new % mv Options.td.new Options.td ```
This will hopefully be sufficient, please take a look at the diff.
Differential Revision: https://reviews.llvm.org/D157151
show more ...
|
Revision tags: llvmorg-17.0.0-rc1 |
|
#
00769d69 |
| 26-Jul-2023 |
Kelvin Li <kli@ca.ibm.com> |
[flang] Add -fppc-native-vector-element-order option to control the element order in PowerPC vector types
This patch also adds a LIT test for the vec_cvf intrinsic that can be affected by the option
[flang] Add -fppc-native-vector-element-order option to control the element order in PowerPC vector types
This patch also adds a LIT test for the vec_cvf intrinsic that can be affected by the option.
Co-authored-by: Mark Danial <Mark.Danial@ibm.com> Co-authored-by: Daniel Chen <cdchen@ca.ibm.com>
Differential Revision: https://reviews.llvm.org/D155852
show more ...
|
#
f04ccadf |
| 27-Jul-2023 |
Victor Kingi <victor.kingi@arm.com> |
[Flang] Add support for fsave-optimization-record
Add support for generating and saving the optimization record. Optimization record lists the optimizations performed by LLVM.
This patch enables th
[Flang] Add support for fsave-optimization-record
Add support for generating and saving the optimization record. Optimization record lists the optimizations performed by LLVM.
This patch enables the flag in Flang. Clang handles this functionality using the BackendConsumer which Flang doesn't have, hence, was implemented in CodeGenAction::executeAction
FlangOption added to all variants of fsave-optimization-record in clang/include/clang/Driver/Options.td . Clang handles it the same way.
opt_record_file, opt_record_passes and opt_record_format flags in Options.td were moved out of the group [CC1Option, NoDriverOption] to allow flang -fc1 support.
The renderRemarksOptions and willEmitRemarks functions in clang/lib/Driver/ToolChains/Flang.cpp follow same syntax as clang. In flang/lib/Frontend/CompilerInvocation.cpp we update the field OptRecordFile with the provided optimization file value. Clang doesn't do this as it processes the Options.td, mapping the OptRecordFile earlier on.
Reviewed By: awarzynski, tblah
Differential Revision: https://reviews.llvm.org/D155452
show more ...
|
Revision tags: llvmorg-18-init |
|
#
ebc2c71d |
| 21-Jul-2023 |
Andrzej Warzynski <andrzej.warzynski@arm.com> |
[flang][nfc] Clarify the usage of llvmArgs and mlirArgs
Differential Revision: https://reviews.llvm.org/D155931
|