History log of /llvm-project/flang/lib/Frontend/CompilerInvocation.cpp (Results 76 – 100 of 204)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-16.0.6, llvmorg-16.0.5
# 40340cf9 01-Jun-2023 Sergio Afonso <safonsof@amd.com>

[MLIR][OpenMP][OMPIRBuilder] Use target triple to initialize `IsGPU` flag

This patch modifies the construction of the `OpenMPIRBuilder` in MLIR to
initialize the `IsGPU` flag using target triple inf

[MLIR][OpenMP][OMPIRBuilder] Use target triple to initialize `IsGPU` flag

This patch modifies the construction of the `OpenMPIRBuilder` in MLIR to
initialize the `IsGPU` flag using target triple information passed down from
the Flang frontend. If not present, it will default to `false`.

This replicates the behavior currently implemented in Clang, where the
`CodeGenModule::createOpenMPRuntime()` method creates a different
`CGOpenMPRuntime` instance depending on the target triple, which in turn has an
effect on the `IsGPU` flag of the `OpenMPIRBuilderConfig` object.

Differential Revision: https://reviews.llvm.org/D151903

show more ...


# fc43c4f0 18-Jul-2023 Kiran Chandramohan <kiran.chandramohan@arm.com>

[Flang] Include logical default with default-integer-8

Other compilers include the logical default also with the
default-integer-8 setting. This patch does the same for
flang.

Reviewed By: awarzyns

[Flang] Include logical default with default-integer-8

Other compilers include the logical default also with the
default-integer-8 setting. This patch does the same for
flang.

Reviewed By: awarzynski, sscalpone

Differential Revision: https://reviews.llvm.org/D155279

show more ...


# 63ca93c7 06-Jul-2023 Sergio Afonso <safonsof@amd.com>

[OpenMP][OMPIRBuilder] Rename IsEmbedded and IsTargetCodegen flags

This patch renames the `OpenMPIRBuilderConfig` flags to reduce confusion over
their meaning. `IsTargetCodegen` becomes `IsGPU`, whe

[OpenMP][OMPIRBuilder] Rename IsEmbedded and IsTargetCodegen flags

This patch renames the `OpenMPIRBuilderConfig` flags to reduce confusion over
their meaning. `IsTargetCodegen` becomes `IsGPU`, whereas `IsEmbedded` becomes
`IsTargetDevice`. The `-fopenmp-is-device` compiler option is also renamed to
`-fopenmp-is-target-device` and the `omp.is_device` MLIR attribute is renamed
to `omp.is_target_device`. Getters and setters of all these renamed properties
are also updated accordingly. Many unit tests have been updated to use the new
names, but an alias for the `-fopenmp-is-device` option is created so that
external programs do not stop working after the name change.

`IsGPU` is set when the target triple is AMDGCN or NVIDIA PTX, and it is only
valid if `IsTargetDevice` is specified as well. `IsTargetDevice` is set by the
`-fopenmp-is-target-device` compiler frontend option, which is only added to
the OpenMP device invocation for offloading-enabled programs.

Differential Revision: https://reviews.llvm.org/D154591

show more ...


# 0d6017cd 30-Jun-2023 Valentin Clement <clementval@gmail.com>

[openacc][NFC] Bump parser support number to OpenACC 3.3

Parser support reached OpenACC 3.3 specification.
Bump the numbers to reflect the latest specs.

Reviewed By: razvanlupusoru, awarzynski

Dif

[openacc][NFC] Bump parser support number to OpenACC 3.3

Parser support reached OpenACC 3.3 specification.
Bump the numbers to reflect the latest specs.

Reviewed By: razvanlupusoru, awarzynski

Differential Revision: https://reviews.llvm.org/D154249

show more ...


# b81c5070 22-Jun-2023 David Truby <david@truby.dev>

[flang] add -flang-experimental-polymorphism flag to flang-new

This flag enables Fortran 2003 polymorphism. It is marked experimental
and not included in --help.

Reviewed By: tblah, awarzynski

Dif

[flang] add -flang-experimental-polymorphism flag to flang-new

This flag enables Fortran 2003 polymorphism. It is marked experimental
and not included in --help.

Reviewed By: tblah, awarzynski

Differential Revision: https://reviews.llvm.org/D153281

show more ...


# a9e1d2e7 29-May-2023 Kelvin Li <kli@ca.ibm.com>

[flang] Add PowerPC vec_add, vec_and, vec_mul, vec_sub and vec_xor intrinsics

Differential Revision: https://reviews.llvm.org/D151857


# 4a5ac14e 22-May-2023 Dominik Adamski <dominik.adamski@amd.com>

[OpenMP][bbc][flang] Add _OPENMP macro definition

OpenMP standard (section 3.3 for OpenMP 5.2) requires that _OPENMP macro
contains release date of given OpenMP standard version.

Differential Revis

[OpenMP][bbc][flang] Add _OPENMP macro definition

OpenMP standard (section 3.3 for OpenMP 5.2) requires that _OPENMP macro
contains release date of given OpenMP standard version.

Differential Revision: https://reviews.llvm.org/D151083

Reviewed By: kiranchandramohan

show more ...


# 39ecf9d8 22-May-2023 Tom Eccles <tom.eccles@arm.com>

[flang][hlfir] Separate -emit-fir and -emit-hlfir for flang-new

In review for https://reviews.llvm.org/D146278, @vzakhari asked to
separate -emit-fir and -emit-hlfir. This will allow FIR to be easil

[flang][hlfir] Separate -emit-fir and -emit-hlfir for flang-new

In review for https://reviews.llvm.org/D146278, @vzakhari asked to
separate -emit-fir and -emit-hlfir. This will allow FIR to be easily
outputted after the HLFIR passes have been run.

The new semantics are as follows:

| Action | -flang-experimental-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 |

A patch for bbc will follow.

Differential Revision: https://reviews.llvm.org/D151088

show more ...


# 541f5c4a 01-Jun-2023 Hussain Kadhem <hmk@berkeley.edu>

Flang implementation for COMPILER_VERSION and COMPILER_OPTIONS intrinsics

This revision implements the Fortran intrinsic procedures COMPILER_VERSION and COMPILER_OPTIONS from the iso_fortran_env mod

Flang implementation for COMPILER_VERSION and COMPILER_OPTIONS intrinsics

This revision implements the Fortran intrinsic procedures COMPILER_VERSION and COMPILER_OPTIONS from the iso_fortran_env module.
To be able to set the COMPILER_OPTIONS string according to the original compiler driver invocation, a string is passed to the frontend driver using the environment variable FLANG_COMPILER_OPTIONS_STRING, for lack of a better mechanism.

Fixes #59233

Reviewed By: awarzynski

Differential Revision: https://reviews.llvm.org/D140524

show more ...


# d93bdd8b 19-May-2023 Dominik Adamski <dominik.adamski@amd.com>

[OpenMP][MLIR][Flang][bbc][Driver] Add fopenmp-version and generate corresponding MLIR attribute

This patch adds flag -fopenmp-version to the Flang frontend and bbc tool.
This flag is lowered to MLI

[OpenMP][MLIR][Flang][bbc][Driver] Add fopenmp-version and generate corresponding MLIR attribute

This patch adds flag -fopenmp-version to the Flang frontend and bbc tool.
This flag is lowered to MLIR OpenMP flag attribute.

Differential Revision: https://reviews.llvm.org/D150354

Reviewed By: kiranchandramohan

show more ...


Revision tags: llvmorg-16.0.4
# 191d4872 09-May-2023 Peter Klausler <pklausler@nvidia.com>

[flang] Finer control over warnings

Establish a set of optional usage warnings, and enable some
only in "-pedantic" mode that, in our subjective experience
with application codes, seem to issue freq

[flang] Finer control over warnings

Establish a set of optional usage warnings, and enable some
only in "-pedantic" mode that, in our subjective experience
with application codes, seem to issue frequently without
indicating usage that really needs to be corrected. By default,
with this patch the compiler should appear to be somewhat less
persnickety but not less informative.

Differential Revision: https://reviews.llvm.org/D150710

show more ...


Revision tags: llvmorg-16.0.3
# 2e634367 24-Apr-2023 Andrew Gozillon <Andrew.Gozillon@amd.com>

[Flang][OpenMP][Driver][MLIR] Port fopenmp-host-ir-file-path flag and add MLIR module attribute to proliferate to OpenMP IR lowering

This patch ports the fopenmp-host-ir-file-path flag from Clang to

[Flang][OpenMP][Driver][MLIR] Port fopenmp-host-ir-file-path flag and add MLIR module attribute to proliferate to OpenMP IR lowering

This patch ports the fopenmp-host-ir-file-path flag from Clang to Flang-new, this flag
is added by the driver to the device pass when doing two phase compilation (device + host).

This flag is then applied to the module when compiling during the OpenMP device phase.
This file can then be utilised during lowering of the OpenMP dialect to LLVM-IR, which
allows the device and host to maintain 1:1 mapping of OpenMP metadata for variables
during lowering via the OpenMPIRBuilders loadOffloadInfoMetadata facilities
(which is used for declare target and I believe target regions as well).

Reviewer: awarzynski

Differential Revision: https://reviews.llvm.org/D148038

show more ...


Revision tags: llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7
# efae695d 09-Jan-2023 Mats Petersson <mats.petersson@arm.com>

Add -f[no-]loop-versioning option

Add flags for loop-versioning pass enable/disable

Reviewed By: awarzynski, tblah

Differential Revision: https://reviews.llvm.org/D141307


# 53152f12 05-Apr-2023 Andrew Gozillon <Andrew.Gozillon@amd.com>

[OpenMP][MLIR][Flang][bbc][Driver] Add OpenMP RTL Flags to Flang and generate omp.FlagsAttr from them

This patch ports OpenMP RTL flags from the shared Clang compiler
options to Flang. As well as ad

[OpenMP][MLIR][Flang][bbc][Driver] Add OpenMP RTL Flags to Flang and generate omp.FlagsAttr from them

This patch ports OpenMP RTL flags from the shared Clang compiler
options to Flang. As well as adding a limited subset to bbc.

This patch enables the flags below (and any equals or inverse variants)
for Flang that exist in Clang:

-fopenmp-target-debug
-fopenmp-assume-threads-oversubscription
-fopenmp-assume-teams-oversubscription
-fopenmp-assume-no-nested-parallelism
-fopenmp-assume-no-thread-state

For the bbc tool it only utilises the primary variants to minimize
additional complexity in the tool.

The patch also provides FlagAttr generation from these flags. Which
will be lowered to LLVM-IR in a subsequent patch.

Reviewers: kiranchandramohan, awarzynski

Differential Revision: https://reviews.llvm.org/D147324

show more ...


# e2b7424d 27-Mar-2023 Sacha Ballantyne <Sacha.Ballantyne@arm.com>

[Flang] Add debug flag to enable current debug information pass

While a pass exists to generate basic debug information, currently there is not a corresponding flag to enable it.
This patch adds sup

[Flang] Add debug flag to enable current debug information pass

While a pass exists to generate basic debug information, currently there is not a corresponding flag to enable it.
This patch adds support for activating this pass at any debug level >= -g1, as well as emiting a warning for higher levels that the functionality is not yet fully implemented.

This patch also adds -g and -gline-tables-only to appear when `flang-new` --help is run

Depends on D142347.

Reviewed By: awarzynski

Differential Revision: https://reviews.llvm.org/D146814

show more ...


# 33be8341 14-Mar-2023 Sergio Afonso <safonsof@amd.com>

[flang][driver][openmp] Write MLIR for -save-temps

This patch adds support for producing MLIR files when using -save-temps on
flang. One MLIR file will be produced before lowering and optimization p

[flang][driver][openmp] Write MLIR for -save-temps

This patch adds support for producing MLIR files when using -save-temps on
flang. One MLIR file will be produced before lowering and optimization passes,
containing the operations produced by the PFT-to-MLIR lowering bridge, and
another at the end of the process, just before LLVM IR generation.

This is accomplished by forwarding the -save-temps flag from the driver to the
frontend, and modifying it to output MLIR files accordingly.

Differential Revision: https://reviews.llvm.org/D146075

show more ...


# acf6a322 14-Mar-2023 Tom Eccles <tom.eccles@arm.com>

[flang] add -flang-experimental-hlfir flag to flang-new

This flag instructs flang-new to use the new HLFIR lowering. It is
marked as experimental and not included in --help.

This was added to make

[flang] add -flang-experimental-hlfir flag to flang-new

This flag instructs flang-new to use the new HLFIR lowering. It is
marked as experimental and not included in --help.

This was added to make it more convenient to test the performance of
code generated by the HLFIR lowering.

Extra diffs are from running clang-format on CLOptions.inc (which was
being forced by CI).

Differential Revision: https://reviews.llvm.org/D146278

show more ...


# 0fdfb65e 01-Feb-2023 Nadeem, Usman <mnadeem@quicinc.com>

[Flang] Add support to use LTO specific pipelines

Thin and full LTO modes use different pre-link pipelines compared to
regular compilation. This patch adds support for calling those pipelines.

This

[Flang] Add support to use LTO specific pipelines

Thin and full LTO modes use different pre-link pipelines compared to
regular compilation. This patch adds support for calling those pipelines.

This patch closely mimics Clang's implementation with the exception that I
changed the codegen option name from `PrepareForLTO` to `PrepareForFullLTO`
to be more precise.

With this patch:
- Compilation for full LTO should be as we expect (except possibly
missing optimizations enabled by module summaries which we do not
produce yet).
- thinLTO uses the correct prelink pipeline but will use the postlink
backend for fullLTO due to missing metadata and summary in the llvm
module. I have added a warning regarding this: `flang-new: warning: the
option '-flto=thin' is a work in progress`.

Differential Revision: https://reviews.llvm.org/D142420

Change-Id: I6b94b775b5b8e93340e520c5cd4bf60834b2e209

show more ...


# e002a38b 07-Mar-2023 Andrew Gozillon <Andrew.Gozillon@amd.com>

[Flang][OpenMP][MLIR][Driver][bbc] Add -fopenmp-is-device flag to Flang -fc1 & the bbc tool, and omp.is_device attribute

Adds the -fopenmp-is-device flag to bbc and Flang's -fc1 (but not flang-new)

[Flang][OpenMP][MLIR][Driver][bbc] Add -fopenmp-is-device flag to Flang -fc1 & the bbc tool, and omp.is_device attribute

Adds the -fopenmp-is-device flag to bbc and Flang's -fc1 (but not flang-new) and in addition adds an omp.is_device attribute onto the module when fopenmp is passed, this is a boolean attribute that is set to false or true dependent on if fopenmp-is-device is specified alongside the fopenmp flag on the commandline when invoking flang or bbc.

Reviewers:
awarzynski
kiranchandramohan

Differential Revision: https://reviews.llvm.org/D144864

show more ...


# ce3a1c59 21-Feb-2023 Ethan Luis McDonough <ethanluismcdonough@gmail.com>

[flang] Handle unsupported warning flags

This PR makes flang emit a warning when the user passes an unsupported gfortran warning flag in as a CLI arg. This PR also checks each `-W` argument instead

[flang] Handle unsupported warning flags

This PR makes flang emit a warning when the user passes an unsupported gfortran warning flag in as a CLI arg. This PR also checks each `-W` argument instead of just looking at the last one passed in.

Reviewed By: awarzynski

Differential Revision: https://reviews.llvm.org/D143301

show more ...


# 1360bfb0 21-Feb-2023 Mark Danial <mark.danial@ibm.com>

[Flang] Add user option -funderscoring/-fnounderscoring to control trailing underscore added to external names

This patch adds user option -funderscoring/-fnounderscoring to control the trailing un

[Flang] Add user option -funderscoring/-fnounderscoring to control trailing underscore added to external names

This patch adds user option -funderscoring/-fnounderscoring to control the trailing underscore being appended to external names (e.g. procedure names, common block names). The option in gfortran is documented in https://gcc.gnu.org/onlinedocs/gfortran/Code-Gen-Options.html.

Reviewed By: clementval

Differential Revision: https://reviews.llvm.org/D140795

show more ...


# d768bf99 10-Feb-2023 Archibald Elliott <archibald.elliott@arm.com>

[NFC][TargetParser] Replace uses of llvm/Support/Host.h

The forwarding header is left in place because of its use in
`polly/lib/External/isl/interface/extract_interface.cc`, but I have
added a GCC w

[NFC][TargetParser] Replace uses of llvm/Support/Host.h

The forwarding header is left in place because of its use in
`polly/lib/External/isl/interface/extract_interface.cc`, but I have
added a GCC warning about the fact it is deprecated, because it is used
in `isl` from where it is included by Polly.

show more ...


# 62c7f035 07-Feb-2023 Archibald Elliott <archibald.elliott@arm.com>

[NFC][TargetParser] Remove llvm/ADT/Triple.h

I also ran `git clang-format` to get the headers in the right order for
the new location, which has changed the order of other headers in two
files.


# bf81ba37 04-Jan-2023 Tom Eccles <tom.eccles@arm.com>

[flang] add -fstack-arrays flag

The implementation of -fstack-arrays was added in
https://reviews.llvm.org/D140415

The new macro BoolOptionWithoutMarshalling in Options.td avoids
generating code to

[flang] add -fstack-arrays flag

The implementation of -fstack-arrays was added in
https://reviews.llvm.org/D140415

The new macro BoolOptionWithoutMarshalling in Options.td avoids
generating code to store the flags in clang data structures. For
example, writing something like

defm stack_arrays : BoolOption<"f", "stack-arrays",
CodeGenOpts<"StackArrays">, [...]

Would generate code referring to `clang::CodeGenOpts::StackArrays`, which
does not exist.

Differential Revision: https://reviews.llvm.org/D140972

show more ...


# 40d8c066 20-Jan-2023 Jan Sjodin <jan_sjodin@yahoo.com>

[flang][driver] Add support for -embed-offload-object flag in flang

This patch adds support for the -embed-offload-object flag to embed offloading
binaries in host code. This flag is identical to th

[flang][driver] Add support for -embed-offload-object flag in flang

This patch adds support for the -embed-offload-object flag to embed offloading
binaries in host code. This flag is identical to the clang flag with the same name.

Differential Revision: https://reviews.llvm.org/D142244

Reviewed By: awarzynski, jhuber6

show more ...


123456789