History log of /llvm-project/flang/lib/Frontend/CompilerInvocation.cpp (Results 101 – 125 of 204)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# c0921586 08-Jan-2023 Kazu Hirata <kazu@google.com>

[flang] Use std::optional instead of llvm::Optional (NFC)

This patch replaces (llvm::|)Optional< with std::optional<. I'll post
a separate patch to remove #include "llvm/ADT/Optional.h".

This is p

[flang] Use std::optional instead of llvm::Optional (NFC)

This patch replaces (llvm::|)Optional< with std::optional<. I'll post
a separate patch to remove #include "llvm/ADT/Optional.h".

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

show more ...


# 4d4d4785 08-Jan-2023 Kazu Hirata <kazu@google.com>

[flang] Add #include <optional> (NFC)

This patch adds #include <optional> to those files containing
llvm::Optional<...> or Optional<...>.

I'll post a separate patch to actually replace llvm::Option

[flang] Add #include <optional> (NFC)

This patch adds #include <optional> to those files containing
llvm::Optional<...> or Optional<...>.

I'll post a separate patch to actually replace llvm::Optional with
std::optional.

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

show more ...


Revision tags: llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4
# e7b66602 19-Oct-2022 Tom Eccles <tom.eccles@arm.com>

[flang] Add -ffast-math and -Ofast

clang -cc1 accepts -Ofast. I did not add it to flang -fc1 because this
seems redundant because the compiler driver will always resolve -Ofast
into -O3 -ffast-math

[flang] Add -ffast-math and -Ofast

clang -cc1 accepts -Ofast. I did not add it to flang -fc1 because this
seems redundant because the compiler driver will always resolve -Ofast
into -O3 -ffast-math (I added a test for this).

-menable-infs is removed from the frontend-forwarding test because if
all of the fast-math component flags are present, these will be resolved
into the fast-math flag. Instead -menable-infs is tested in the
fast-math test.

Specifying -ffast-math to the compiler driver causes linker invocations
to include crtfastmath.o.

RFC: https://discourse.llvm.org/t/rfc-the-meaning-of-ofast/66554

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

show more ...


# 9a417395 03-Dec-2022 Kazu Hirata <kazu@google.com>

[flang] Use std::nullopt instead of None (NFC)

This patch mechanically replaces None with std::nullopt where the
compiler would warn if None were deprecated. The intent is to reduce
the amount of m

[flang] Use std::nullopt instead of None (NFC)

This patch mechanically replaces None with std::nullopt where the
compiler would warn if None were deprecated. The intent is to reduce
the amount of manual work required in migrating from Optional to
std::optional.

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

show more ...


# 3951a734 30-Nov-2022 Usman Nadeem <mnadeem@quicinc.com>

[Flang][Driver] Handle target CPU and features

This patch:

- Adds target-feature and target-cpu to FC1Options.
- Moves getTargetFeatures() from Clang.cpp to CommonArgs.cpp.
- Processes target cpu a

[Flang][Driver] Handle target CPU and features

This patch:

- Adds target-feature and target-cpu to FC1Options.
- Moves getTargetFeatures() from Clang.cpp to CommonArgs.cpp.
- Processes target cpu and features in the flang driver. Right now
features are only added for AArch64/x86 because I only did basic
testing on them but it should generally work for others as well.
Option handling is similar to clang.
- Adds appropriate structures in TargetOptions and passes them to
the target machine.

What's missing:

- Adding the CPU info and the features as attributes in the LLVM IR
module.
- Processing target specific flags, e.g. SVE vector bits for AArch64,
ABI etc.

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

Change-Id: Ib081a74ea98617674845518a5d2754edba596418

show more ...


# 3a1b4092 30-Nov-2022 Tom Eccles <tom.eccles@arm.com>

[flang] fix unused variables


# 6841c43f 29-Nov-2022 Tom Eccles <tom.eccles@arm.com>

[flang] Remove warnings that fast-math options are unimplemented

These are now fully implemented, see
https://reviews.llvm.org/D137390
https://reviews.llvm.org/D137391
https://reviews.llvm.org/D1374

[flang] Remove warnings that fast-math options are unimplemented

These are now fully implemented, see
https://reviews.llvm.org/D137390
https://reviews.llvm.org/D137391
https://reviews.llvm.org/D137456
https://reviews.llvm.org/D137580
https://reviews.llvm.org/D137602
https://reviews.llvm.org/D138048

These flags are still tested in
flang/test/Driver/frontend-forwarding.f90 and
flang/test/Lower/fast-math-arithmetic.f90

Differential revision: https://reviews.llvm.org/D138907

show more ...


# fa3587d6 25-Nov-2022 Valentin Clement <clementval@gmail.com>

[flang] Remove debug option

Remove debug option added by mistake in D138587


# c1b7e9c9 24-Nov-2022 Valentin Clement <clementval@gmail.com>

[flang] Adapt descriptor codegen to support unlimited polymorphic entities

Code generation to create and populate the descriptor (element size and
type code) is based on the boxed result type. This

[flang] Adapt descriptor codegen to support unlimited polymorphic entities

Code generation to create and populate the descriptor (element size and
type code) is based on the boxed result type. This does not work well with
unlimited polymorphic entities since the fir type does not represent what is
actually emboxed or reboxed.
In the case of emboxing, the input type will be used to populate
the descriptor element size and type code.
When reboxing an unlimited polymorphic to a unlimited polymorphic entities, the
element size and type code is retrieve from the input box.

Reviewed By: jeanPerier

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

show more ...


# c3821b8d 10-Nov-2022 Tarun Prabhu <tarun@lanl.gov>

[flang] Add -fpass-plugin option to flang

This patch adds the -fpass-plugin option to flang which dynamically loads LLVM
passes from the shared object passed as the argument to the flag. The behavio

[flang] Add -fpass-plugin option to flang

This patch adds the -fpass-plugin option to flang which dynamically loads LLVM
passes from the shared object passed as the argument to the flag. The behavior
of the option is designed to replicate that of the same option in clang and
thus has the same capabilities and limitations.

Features:

Multiple instances of -fpass-plugin=path-to-file can be specified and each
of the files will be loaded in that order.

The flag can be passed to both flang-new and flang-new -fc1.

The flag will be listed when the -help flag is passed to both flang-new and
flang-new -fc1. It will also be listed when the --help-hidden flag is passed.

Limitations:

Dynamically loaded plugins are not supported in clang on Windows and are not
supported in flang either.

Addenda:

Some minor stylistic changes are made in the files that were modified to
enable this functionality. Those changes make the naming of functions more
consistent, but do not change any functionality that is not directly
related to enabling -fpass-plugin.

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

show more ...


# 3538ca3f 09-Nov-2022 Slava Zakharin <szakharin@nvidia.com>

[flang] Propagate more FastMath flags to lowering.

Plugged in propagation of nnan/nsz/arcp/afn/reassoc related options
to lowering/FirOpBuilder.

Reviewed By: jeanPerier, tblah, awarzynski

Differen

[flang] Propagate more FastMath flags to lowering.

Plugged in propagation of nnan/nsz/arcp/afn/reassoc related options
to lowering/FirOpBuilder.

Reviewed By: jeanPerier, tblah, awarzynski

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

show more ...


# 8c2c6228 08-Nov-2022 Fangrui Song <i@maskray.me>

[Driver] Refactor err_drv_unsupported_option_argument call sites to use llvm::opt::Arg::getSpelling

For `-foo=bar`, getSpelling return `-foo=` which is exactly what we need from
the diagnostic. Drop

[Driver] Refactor err_drv_unsupported_option_argument call sites to use llvm::opt::Arg::getSpelling

For `-foo=bar`, getSpelling return `-foo=` which is exactly what we need from
the diagnostic. Drop `-` from the err_drv_unsupported_option_argument template.
This change makes `--` long option diagnostics more convenient.

Reviewed By: lenary

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

show more ...


# 8f3f15c1 07-Nov-2022 Slava Zakharin <szakharin@nvidia.com>

[flang] Configure FirOpBuilder based on math driver options.

Added MathOptionsBase to share fastmath config between different
components. Frontend driver translates LangOptions into MathOptionsBase.

[flang] Configure FirOpBuilder based on math driver options.

Added MathOptionsBase to share fastmath config between different
components. Frontend driver translates LangOptions into MathOptionsBase.
FirConverter configures FirOpBuilder using MathOptionsBase
config passed to it via LoweringOptions.

Depends on D137390

Reviewed By: jeanPerier

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

show more ...


# d0d4b635 19-Oct-2022 Tom Eccles <tom.eccles@arm.com>

[flang] add -f[no-]reciprocal-math

Only add the option processing and store the result. No attributes are
added to FIR yet.

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


# c4dc3c02 19-Oct-2022 Tom Eccles <tom.eccles@arm.com>

[flang] Add -f[no-]associative-math and -mreassociate

Only add the option processing and store the result. No attributes are
added to FIR yet.

Clang only forwards -mreassociate
if (AssociativeMath

[flang] Add -f[no-]associative-math and -mreassociate

Only add the option processing and store the result. No attributes are
added to FIR yet.

Clang only forwards -mreassociate
if (AssociativeMath && !SignedZeros && !TrappingMath)

Flang doesn't have -f[no-]trapping-math, so this part of the condition
has been omitted. !TrappingMath is the default.

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

show more ...


# b5b8a8cf 18-Oct-2022 Tom Eccles <tom.eccles@arm.com>

[flang] Add -f[no-]signed-zeros

Only add the option processing and store the result. No attributes are
added to FIR yet.

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


# 36b37a1e 18-Oct-2022 Tom Eccles <tom.eccles@arm.com>

[flang] Add -f[no-]approx-func

Only add the option processing and store the result. No attributes are
added to FIR yet.

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


Revision tags: llvmorg-15.0.3
# b5e93e39 17-Oct-2022 Tom Eccles <tom.eccles@arm.com>

[flang] Add -f[no-]honor-nans and -menable-no-nans

Only add the option processing and store the result. No attributes are
added to FIR yet.

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


# 74d5c3c0 02-Nov-2022 Peter Steinfeld <psteinfeld@nvidia.com>

[Flang] Run clang-format on all flang files

This will make it easier for me to do reviews.

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


# 0fb763e7 17-Oct-2022 Tom Eccles <tom.eccles@arm.com>

[flang] Add -f[no-]honor-infinities and -menable-no-infs

Only add the option processing and store the result. No attributes are
added to FIR yet.

This patch follows Clang in forwarding -fno-honor-i

[flang] Add -f[no-]honor-infinities and -menable-no-infs

Only add the option processing and store the result. No attributes are
added to FIR yet.

This patch follows Clang in forwarding -fno-honor-infinities as
-menable-no-infs.

Reviewed By: kiranchandramohan awarzynski vzakhari

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

show more ...


# a784de78 31-Oct-2022 Tom Eccles <Tom.Eccles@arm.com>

[flang] Add -ffp-contract option processing

Only add the option processing and store the result. No attributes are
added to FIR yet.

Only the "off" and "fast" options are supported. "fast-honor-pra

[flang] Add -ffp-contract option processing

Only add the option processing and store the result. No attributes are
added to FIR yet.

Only the "off" and "fast" options are supported. "fast-honor-pragmas" is not applicable because we do not implement `#pragma clang fp contract()` in Fortran [1]. "on" is not supported because it is unclear how to fuse only within individual statements. gfortran also does not implement "on": treating it as an "off".

Currently the default value is "off" to preserve existing behavior. gfortran uses "fast" by default and that may be the right thing for flang-new after further discussion in the future, but that can be changed separately. gfortran's documentation is available [[ https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html | here ]].

[1] https://clang.llvm.org/docs/LanguageExtensions.html#extensions-to-specify-floating-point-flags

Reviewed By: vzakhari, awarzynski

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

show more ...


# 4515dd34 27-Oct-2022 Valentin Clement <clementval@gmail.com>

[flang] Remove debug flag added in D136824


# ea1e767a 27-Oct-2022 Valentin Clement <clementval@gmail.com>

[flang] Carry dynamic type when emboxing polymorphic pointer

In order to be passed as passed-object in the dynamic dispatch, the
polymorphic pointer entity are emboxed. In this process, the dynamic

[flang] Carry dynamic type when emboxing polymorphic pointer

In order to be passed as passed-object in the dynamic dispatch, the
polymorphic pointer entity are emboxed. In this process, the dynamic
type must be preserve and pass to fir.embox as the tdesc operand. This
patch introduce a new ExtendedValue that allow to carry over the
dynamic type when the value is unboxed.

Depends on D136820

Reviewed By: PeteSteinfeld

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

show more ...


# 1cfae76e 12-Oct-2022 Peter Steinfeld <psteinfeld@nvidia.com>

[Flang] Adjust preprocessing to build modules correctly

Several module files in .../llvm-project/flang/module check for the
existence of the macro "__x86_64__" to conditionally compile Fortran
code.

[Flang] Adjust preprocessing to build modules correctly

Several module files in .../llvm-project/flang/module check for the
existence of the macro "__x86_64__" to conditionally compile Fortran
code. Unfortunately, this macro was not being defined anywhere. This
patch fixes that for compilations targeting 64 bit x86 machines.

I made the following changes --
-- Removed the test for 32 bit X86 targets. The rest of the compiler and
runtime do not support X86 32 bits.
-- Added predefined macros to define "__x86_64__" and "__x86__64" to
be 1 when the target architecture is 64 bit x86 and the "-cpp" option
is on the command line.
-- Changed the cmake file for creating the Fortran module files to use the
"-cpp" option so that the macro "__x86_64__" will be defined when building
the module files.
-- Added a test.

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

show more ...


Revision tags: working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init
# 0ec3ac9b 19-Jul-2022 Jonathon Penix <jpenix@quicinc.com>

[Flang] Add -fconvert option to swap endianness for unformatted files.

To accomplish this, this patch creates an optional list of environment
variable default values to be set by the runtime to allo

[Flang] Add -fconvert option to swap endianness for unformatted files.

To accomplish this, this patch creates an optional list of environment
variable default values to be set by the runtime to allow directly using
the existing runtime implementation of FORT_CONVERT for I/O conversions.

show more ...


123456789