History log of /llvm-project/clang/lib/Frontend/CompilerInvocation.cpp (Results 226 – 250 of 1971)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# e5ccd668 21-Feb-2022 Timm Bäder <tbaeder@redhat.com>

[clang][sema] Enable first-class bool support for C2x

Implement N2395 for C2x.

This also covers adding "bool", which is part of N2394.

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


# 5048a58a 22-Feb-2022 Kristóf Umann <dkszelethus@gmail.com>

[analyzer] Don't crash if the analyzer-constraint is set to Z3, but llvm is not built with it

Exactly what it says on the tin! We had a nasty crash with the following incovation:

$ clang --analyze

[analyzer] Don't crash if the analyzer-constraint is set to Z3, but llvm is not built with it

Exactly what it says on the tin! We had a nasty crash with the following incovation:

$ clang --analyze -Xclang -analyzer-constraints=z3 test.c
fatal error: error in backend: LLVM was not compiled with Z3 support, rebuild with -DLLVM_ENABLE_Z3_SOLVER=ON
... <stack trace> ...

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

show more ...


# 2370977b 15-Feb-2022 iains <iain@sandoe.co.uk>

[clang] Remove a duplicate action kind table entry.

We have two entries for OPT_emit_codegen_only in the frontend action kind
table, delete one.

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

[clang] Remove a duplicate action kind table entry.

We have two entries for OPT_emit_codegen_only in the frontend action kind
table, delete one.

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

show more ...


# 3e19ba36 14-Feb-2022 Phoebe Wang <phoebe.wang@intel.com>

[X86][MS] Add 80bit long double support for Windows

MSVC currently doesn't support 80 bits long double. But ICC does support
it on Windows. Besides, there're also some users asked for this feature.

[X86][MS] Add 80bit long double support for Windows

MSVC currently doesn't support 80 bits long double. But ICC does support
it on Windows. Besides, there're also some users asked for this feature.
We can find the discussions from stackoverflow, msdn etc.

Given Clang has already support `-mlong-double-80`, extending it to
support for Windows seems worthwhile.

Reviewed By: rnk, erichkeane

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

show more ...


# 034adaf5 03-Feb-2022 Joseph Huber <jhuber6@vols.utk.edu>

[OpenMP] Completely remove old device runtime

This patch completely removes the old OpenMP device runtime. Previously,
the old runtime had the prefix `libomptarget-new-` and the old runtime
was simp

[OpenMP] Completely remove old device runtime

This patch completely removes the old OpenMP device runtime. Previously,
the old runtime had the prefix `libomptarget-new-` and the old runtime
was simply called `libomptarget-`. This patch makes the formerly new
runtime the only runtime available. The entire project has been deleted,
and all references to the `libomptarget-new` runtime has been replaced
with `libomptarget-`.

Reviewed By: JonChesterfield

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

show more ...


# 116c1bea 02-Feb-2022 Alex Lorenz <arphaman@gmail.com>

[clang][macho] add clang frontend support for emitting macho files with two build version load commands

This patch extends clang frontend to add metadata that can be used to emit macho files with tw

[clang][macho] add clang frontend support for emitting macho files with two build version load commands

This patch extends clang frontend to add metadata that can be used to emit macho files with two build version load commands.
It utilizes "darwin.target_variant.triple" and "darwin.target_variant.SDK Version" metadata names for that.

MachO uses two build version load commands to represent an object file / binary that is targeting both the macOS target,
and the Mac Catalyst target. At runtime, a dynamic library that supports both targets can be loaded from either a native
macOS or a Mac Catalyst app on a macOS system. We want to add support to this to upstream to LLVM to be able to build
compiler-rt for both targets, to finish the complete support for the Mac Catalyst platform, which is right now targetable
by upstream clang, but the compiler-rt bits aren't supported because of the lack of this multiple build version support.

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

show more ...


# 27712337 18-Jan-2022 David Blaikie <dblaikie@gmail.com>

GCC ABI Compatibility: Preserve alignment of non-pod members in packed structs

This matches GCC: https://godbolt.org/z/sM5q95PGY

I realize this is an API break for clang+clang - so I'm totally open

GCC ABI Compatibility: Preserve alignment of non-pod members in packed structs

This matches GCC: https://godbolt.org/z/sM5q95PGY

I realize this is an API break for clang+clang - so I'm totally open to
discussing how we should deal with that. If Apple wants to keep the
Clang layout indefinitely, if we want to put a flag on this so non-Apple
folks can opt out of this fix/new behavior.

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

show more ...


# b1d946cb 20-Jan-2022 Zixu Wang <zixu_wang@apple.com>

[clang] Add an extract-api driver option

This is the initial commit for the clang-extract-api RFC
<https://lists.llvm.org/pipermail/cfe-dev/2021-September/068768.html>
Add a new driver option `-extr

[clang] Add an extract-api driver option

This is the initial commit for the clang-extract-api RFC
<https://lists.llvm.org/pipermail/cfe-dev/2021-September/068768.html>
Add a new driver option `-extract-api` and associate it with a dummy
(for now) frontend action to set up the initial structure for
incremental works.

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

show more ...


# 82af9502 21-Jan-2022 Joao Moreira <joao.moreira@intel.com>

[X86] Enable ibt-seal optimization when LTO is used in Kernel

Intel's CET/IBT requires every indirect branch target to be an ENDBR instruction. Because of that, the compiler needs to correctly emit

[X86] Enable ibt-seal optimization when LTO is used in Kernel

Intel's CET/IBT requires every indirect branch target to be an ENDBR instruction. Because of that, the compiler needs to correctly emit these instruction on function's prologues. Because this is a security feature, it is desirable that only actual indirect-branch-targeted functions are emitted with ENDBRs. While it is possible to identify address-taken functions through LTO, minimizing these ENDBR instructions remains a hard task for user-space binaries because exported functions may end being reachable through PLT entries, that will use an indirect branch for such. Because this cannot be determined during compilation-time, the compiler currently emits ENDBRs to every non-local-linkage function.

Despite the challenge presented for user-space, the kernel landscape is different as no PLTs are used. With the intent of providing the most fit ENDBR emission for the kernel, kernel developers proposed an optimization named "ibt-seal" which replaces the ENDBRs for NOPs directly in the binary. The discussion of this feature can be seen in [1].

This diff brings the enablement of the flag -mibt-seal, which in combination with LTO enforces a different policy for ENDBR placement in when the code-model is set to "kernel". In this scenario, the compiler will only emit ENDBRs to address taken functions, ignoring non-address taken functions that are don't have local linkage.

A comparison between an LTO-compiled kernel binaries without and with the -mibt-seal feature enabled shows that when -mibt-seal was used, the number of ENDBRs in the vmlinux.o binary patched by objtool decreased from 44383 to 33192, and that the number of superfluous ENDBR instructions nopped-out decreased from 11730 to 540.

The 540 missed superfluous ENDBRs need to be investigated further, but hypotheses are: assembly code not being taken care of by the compiler, kernel exported symbols mechanisms creating bogus address taken situations or even these being removed due to other binary optimizations like kernel's static_calls. For now, I assume that the large drop in the number of ENDBR instructions already justifies the feature being merged.

[1] - https://lkml.org/lkml/2021/11/22/591

Reviewed By: xiangzhangllvm

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

show more ...


# e6e7bdd6 28-Dec-2021 Kazu Hirata <kazu@google.com>

Drop unnecessary const from return types (NFC)

Identified with readability-const-return-type.


# d26520f6 21-Dec-2021 Alexandre Ganea <alexandre.ganea@legionlabs.com>

[Clang] Own the CommandLineArgs in CodeGenOptions

Fixes PR52704 : https://github.com/llvm/llvm-project/issues/52704

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


# 4e310d89 18-Dec-2021 Kazu Hirata <kazu@google.com>

[clang] Strip redundant lambda (NFC)


# 0cf6f7b1 09-Dec-2021 Logan Smith <logan.r.smith0@gmail.com>

[NFC][clang] Return underlying strings directly instead of OS.str()

This avoids an unnecessary copy required by 'return OS.str()', allowing
instead for NRVO or implicit move. The .str() call (which

[NFC][clang] Return underlying strings directly instead of OS.str()

This avoids an unnecessary copy required by 'return OS.str()', allowing
instead for NRVO or implicit move. The .str() call (which flushes the
stream) is no longer required since 65b13610a5226b84889b923bae884ba395ad084d,
which made raw_string_ostream unbuffered by default.

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

show more ...


# 698584f8 07-Dec-2021 Cullen Rhodes <cullen.rhodes@arm.com>

[IR] Remove unbounded as possible value for vscale_range minimum

The default for min is changed to 1. The behaviour of -mvscale-{min,max}
in Clang is also changed such that 16 is the max vscale when

[IR] Remove unbounded as possible value for vscale_range minimum

The default for min is changed to 1. The behaviour of -mvscale-{min,max}
in Clang is also changed such that 16 is the max vscale when targeting
SVE and no max is specified.

Reviewed By: sdesmalen, paulwalker-arm

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

show more ...


# 3950e1be 17-Nov-2021 Nico Weber <thakis@chromium.org>

[clang] Remove CLANG_ROUND_TRIP_CC1_ARGS and always roundtrip in +assert builds

This removes the ability to disable roundtripping in assert builds.
(Roundtripping happens by default in assert builds

[clang] Remove CLANG_ROUND_TRIP_CC1_ARGS and always roundtrip in +assert builds

This removes the ability to disable roundtripping in assert builds.
(Roundtripping happens by default in assert builds both before and after
this patch.)

The CLANG_ROUND_TRIP_CC1_ARGS was added as an escape hatch 9 months ago
in https://reviews.llvm.org/D97462, with a FIXME to remove it eventually.
It's probably time to remove it.

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

show more ...


# 36873fb7 17-Nov-2021 Nico Weber <thakis@chromium.org>

[clang] Try to fix test more after ae98182cf7341181e

We need to use the td-based marshalling instead of doing this manually,
else the setting gets lost on the way to codegen in most build configs.


# ae98182c 11-Nov-2021 Nico Weber <thakis@chromium.org>

[clang] Make -masm=intel affect inline asm style

With this,

void f() { __asm__("mov eax, ebx"); }

now compiles with clang with -masm=intel.

This matches gcc.

The flag is not accepted in clang

[clang] Make -masm=intel affect inline asm style

With this,

void f() { __asm__("mov eax, ebx"); }

now compiles with clang with -masm=intel.

This matches gcc.

The flag is not accepted in clang-cl mode. It has no effect on
MSVC-style `__asm {}` blocks, which are unconditionally in intel
mode both before and after this change.

One difference to gcc is that in clang, inline asm strings are
"local" while they're "global" in gcc. Building the following with
-masm=intel works with clang, but not with gcc where the ".att_syntax"
from the 2nd __asm__() is in effect until file end (or until a
".intel_syntax" somewhere later in the file):

__asm__("mov eax, ebx");
__asm__(".att_syntax\nmovl %ebx, %eax");
__asm__("mov eax, ebx");

This also updates clang's intrinsic headers to work both in
-masm=att (the default) and -masm=intel modes.
The official solution for this according to "Multiple assembler dialects in asm
templates" in gcc docs->Extensions->Inline Assembly->Extended Asm
is to write every inline asm snippet twice:

bt{l %[Offset],%[Base] | %[Base],%[Offset]}

This works in LLVM after D113932 and D113894, so use that.

(Just putting `.att_syntax` at the start of the snippet works in some but not
all cases: When LLVM interpolates in parameters like `%0`, it uses at&t or
intel syntax according to the inline asm snippet's flavor, so the `.att_syntax`
within the snippet happens to late: The interpolated-in parameter is already
in intel style, and then won't parse in the switched `.att_syntax`.)

It might be nice to invent a `#pragma clang asm_dialect push "att"` /
`#pragma clang asm_dialect pop` to be able to force asm style per snippet,
so that the inline asm string doesn't contain the same code in two variants,
but let's leave that for a follow-up.

Fixes PR21401 and PR20241.

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

show more ...


# cf68e1b2 19-Oct-2021 Kazu Hirata <kazu@google.com>

[Driver, Frontend] Use StringRef::contains (NFC)


# ab41a1c5 18-Oct-2021 Arthur Eubanks <aeubanks@google.com>

[clang] Disable -clear-ast-before-backend with -print-stats

We still need access to various things in the ASTContext when printing stats.

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


# e567f37d 14-Oct-2021 Kazu Hirata <kazu@google.com>

[clang] Use llvm::is_contained (NFC)


# 9efdca87 07-Oct-2021 Joseph Huber <jhuber6@vols.utk.edu>

[OpenMP] Introduce new flags to assert thread and team usage in the runtime

This patch adds two flags to be supported for the new runtime. The flags
are `-fopenmp-assume-threads-oversubscription` an

[OpenMP] Introduce new flags to assert thread and team usage in the runtime

This patch adds two flags to be supported for the new runtime. The flags
are `-fopenmp-assume-threads-oversubscription` and
-fopenmp-assume-teams-oversubscription`. These add global values that
can be checked by the work sharing runtime functions to make better
judgements about how to distribute work between the threads.

Reviewed By: jdoerfert

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

show more ...


# 76902079 29-Sep-2021 Arthur Eubanks <aeubanks@google.com>

[clang] Don't modify OptRemark if the argument is not relevant

A followup to D110201.

For example, we'd set OptimizationRemarkMissed's Regex to '.*' when
encountering -Rpass. Normally this doesn't

[clang] Don't modify OptRemark if the argument is not relevant

A followup to D110201.

For example, we'd set OptimizationRemarkMissed's Regex to '.*' when
encountering -Rpass. Normally this doesn't actually affect remarks we
emit because in clang::ProcessWarningOptions() we'll separately look at
all -R arguments and turn on/off corresponding diagnostic groups.
However, this is reproducible with -round-trip-args.

Reviewed By: JamesNagurne

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

show more ...


# 8ec7d9b8 24-Sep-2021 David Blaikie <dblaikie@gmail.com>

DebugInfo: Move the '=' version of -gsimple-template-names to the frontend

Based on feedback from Paul Robinson on 38c09ea that the 'mangled' mode
is only useful as an LLVM-developer-internal tool i

DebugInfo: Move the '=' version of -gsimple-template-names to the frontend

Based on feedback from Paul Robinson on 38c09ea that the 'mangled' mode
is only useful as an LLVM-developer-internal tool in combination with
llvm-dwarfdump --verify, so demote that to a frontend-only (not driver)
option. The driver support is simply -g{no-,}simple-template-names to
switch on simple template names, without the option to use the mangled
template name scheme there.

show more ...


# 747b1a67 22-Sep-2021 Shilei Tian <tianshilei1992@gmail.com>

[NFC] Remove trailing spaces from some files


# 38c09ea2 22-Sep-2021 David Blaikie <dblaikie@gmail.com>

DebugInfo: Add (initially no-op) -gsimple-template-names={simple,mangled}

This is to build the foundation of a new debug info feature to use only
the base name of template as its debug info name (eg

DebugInfo: Add (initially no-op) -gsimple-template-names={simple,mangled}

This is to build the foundation of a new debug info feature to use only
the base name of template as its debug info name (eg: "t1" instead of
the full "t1<int>"). The intent being that a consumer can still retrieve
all that information from the DW_TAG_template_*_parameters.

So gno-simple-template-names is business as usual/previously ("t1<int>")
=simple is the simplified name ("t1")
=mangled is a special mode to communicate the full information, but
also indicate that the name should be able to be simplified. The data
is encoded as "_STNt1|<int>" which will be matched with an
llvm-dwarfdump --verify feature to deconstruct this name, rebuild the
original name, and then try to rebuild the simple name via the DWARF
tags - then compare the latter and the former to ensure that all the
data necessary to fully rebuild the name is present.

show more ...


12345678910>>...79