|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, 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, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, 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 |
|
| #
b5b6d3a4 |
| 06-Jul-2022 |
Nikola Tesic <[email protected]> |
[Debugify] Port verify-debuginfo-preserve to NewPM
Debugify in OriginalDebugInfo mode, introduced with D82545, runs only with legacy PassManager.
This patch enables this utility for the NewPM.
Dif
[Debugify] Port verify-debuginfo-preserve to NewPM
Debugify in OriginalDebugInfo mode, introduced with D82545, runs only with legacy PassManager.
This patch enables this utility for the NewPM.
Differential Revision: https://reviews.llvm.org/D115351
show more ...
|
| #
dacfa24f |
| 27-Jun-2022 |
Mitch Phillips <[email protected]> |
Delete 'llvm.asan.globals' for global metadata.
Now that we have the sanitizer metadata that is actually on the global variable, and now that we use debuginfo in order to do symbolization of globals
Delete 'llvm.asan.globals' for global metadata.
Now that we have the sanitizer metadata that is actually on the global variable, and now that we use debuginfo in order to do symbolization of globals, we can delete the 'llvm.asan.globals' IR synthesis.
This patch deletes the 'location' part of the __asan_global that's embedded in the binary as well, because it's unnecessary. This saves about ~1.7% of the optimised non-debug with-asserts clang binary.
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D127911
show more ...
|
|
Revision tags: llvmorg-14.0.6 |
|
| #
452db157 |
| 20-Jun-2022 |
Kazu Hirata <[email protected]> |
[clang] Don't use Optional::hasValue (NFC)
|
| #
d4bcb45d |
| 12-Jun-2022 |
Jez Ng <[email protected]> |
[MC][re-land] Omit DWARF unwind info if compact unwind is present where eligible
This reverts commit d941d597837d9e1405086f008c9bd6a71e7263c9.
Differential Revision: https://reviews.llvm.org/D122258
|
| #
d941d597 |
| 12-Jun-2022 |
Jez Ng <[email protected]> |
Revert "[MC] Omit DWARF unwind info if compact unwind is present where eligible"
This reverts commit ef501bf85d8c869248e51371f0e74bcec0e7b229.
|
| #
ef501bf8 |
| 12-Jun-2022 |
Jez Ng <[email protected]> |
[MC] Omit DWARF unwind info if compact unwind is present where eligible
Previously, omitting unnecessary DWARF unwinds was only done in two cases: * For Darwin + aarch64, if no DWARF unwind info is
[MC] Omit DWARF unwind info if compact unwind is present where eligible
Previously, omitting unnecessary DWARF unwinds was only done in two cases: * For Darwin + aarch64, if no DWARF unwind info is needed for all the functions in a TU, then the `__eh_frame` section would be omitted entirely. If any one function needed DWARF unwind, then MC would emit DWARF unwind entries for all the functions in the TU. * For watchOS, MC would omit DWARF unwind on a per-function basis, as long as compact unwind was available for that function.
This diff makes it so that we omit DWARF unwind on a per-function basis for Darwin + aarch64 as well. In addition, we introduce the flag `--emit-dwarf-unwind=` which can toggle between `always`, `no-compact-unwind` (only emit DWARF when CU cannot be emitted for a given function), and the target platform `default`. `no-compact-unwind` is particularly useful for newer x86_64 platforms: we don't want to omit DWARF unwind for x86_64 in general due to possible backwards compat issues, but we should make it possible for people to opt into this behavior if they are only targeting newer platforms.
**Motivation:** I'm working on adding support for `__eh_frame` to LLD, but I'm concerned that we would suffer a perf hit. Processing compact unwind is already expensive, and that's a simpler format than EH frames. Given that MC currently produces one EH frame entry for every compact unwind entry, I don't think processing them will be cheap. I tried to do something clever on LLD's end to drop the unnecessary EH frames at parse time, but this made the code significantly more complex. So I'm looking at fixing this at the MC level instead.
**Addendum:** It turns out that there was a latent bug in the X86 backend when `OmitDwarfIfHaveCompactUnwind` is naively enabled, which is not too surprising given that this combination has not been heretofore used.
For functions that have unwind info that cannot be encoded with CU, MC would end up dropping both the compact unwind entry (OK; existing behavior) as well as the DWARF entries (not OK). This diff fixes things so that we emit the DWARF entry, as well as a CU entry with encoding `UNWIND_X86_MODE_DWARF` -- this basically tells the unwinder to look for the DWARF entry. I'm not 100% sure the `UNWIND_X86_MODE_DWARF` CU entry is necessary, this was the simplest fix. ld64 seems to be able to handle both the absence and presence of this CU entry. Ultimately ld64 (and LLD) will synthesize `UNWIND_X86_MODE_DWARF` if it is absent, so there is no impact to the final binary size.
Reviewed By: davide, lhames
Differential Revision: https://reviews.llvm.org/D122258
show more ...
|
|
Revision tags: llvmorg-14.0.5 |
|
| #
afd2f7e9 |
| 01-Jun-2022 |
Joseph Huber <[email protected]> |
[Binary] Promote OffloadBinary to inherit from Binary
We use the `OffloadBinary` to create binary images of offloading files and their corresonding metadata. This patch changes this to inherit from
[Binary] Promote OffloadBinary to inherit from Binary
We use the `OffloadBinary` to create binary images of offloading files and their corresonding metadata. This patch changes this to inherit from the base `Binary` class. This allows us to create and insepect these more generically. This patch includes all the necessary glue to implement this as a new binary format, along with added the magic bytes we use to distinguish the offloading binary to the `file_magic` implementation.
Reviewed By: tra
Differential Revision: https://reviews.llvm.org/D126812
show more ...
|
|
Revision tags: llvmorg-14.0.4 |
|
| #
26eb0426 |
| 06-May-2022 |
Joseph Huber <[email protected]> |
[Clang] Introduce clang-offload-packager tool to bundle device files
In order to do offloading compilation we need to embed files into the host and create fatbainaries. Clang uses a special binary f
[Clang] Introduce clang-offload-packager tool to bundle device files
In order to do offloading compilation we need to embed files into the host and create fatbainaries. Clang uses a special binary format to bundle several files along with their metadata into a single binary image. This is currently performed using the `-fembed-offload-binary` option. However this is not very extensibile since it requires changing the command flag every time we want to add something and makes optional arguments difficult. This patch introduces a new tool called `clang-offload-packager` that behaves similarly to CUDA's `fatbinary`. This tool takes several input files with metadata and embeds it into a single image that can then be embedded in the host.
Reviewed By: tra
Differential Revision: https://reviews.llvm.org/D125165
show more ...
|
|
Revision tags: llvmorg-14.0.3 |
|
| #
0a27622a |
| 26-Apr-2022 |
Andrew Savonichev <[email protected]> |
[NVPTX] Disable DWARF .file directory for PTX
Default behavior for .file directory was changed in D105856, but ptxas (CUDA 11.5 release) refuses to parse it:
$ llc -march=nvptx64 llvm/test/Debu
[NVPTX] Disable DWARF .file directory for PTX
Default behavior for .file directory was changed in D105856, but ptxas (CUDA 11.5 release) refuses to parse it:
$ llc -march=nvptx64 llvm/test/DebugInfo/NVPTX/debug-file-loc.ll $ ptxas debug-file-loc.s ptxas debug-file-loc.s, line 42; fatal : Parsing error near '"foo.h"': syntax error
Added a new field to MCAsmInfo to control default value of UseDwarfDirectory. This value is used if -dwarf-directory command line option is not specified.
Differential Revision: https://reviews.llvm.org/D121299
show more ...
|
|
Revision tags: llvmorg-14.0.2 |
|
| #
483efc9a |
| 21-Apr-2022 |
Chuanqi Xu <[email protected]> |
[Pipelines] Remove Legacy Passes in Coroutines
The legacy passes are deprecated now and would be removed in near future. This patch tries to remove legacy passes in coroutines.
Reviewed By: aeubank
[Pipelines] Remove Legacy Passes in Coroutines
The legacy passes are deprecated now and would be removed in near future. This patch tries to remove legacy passes in coroutines.
Reviewed By: aeubanks
Differential Revision: https://reviews.llvm.org/D123918
show more ...
|
| #
8b0e7f22 |
| 20-Apr-2022 |
Fangrui Song <[email protected]> |
[CodeGen] Fix -Wswitch after D116462
|
|
Revision tags: llvmorg-14.0.1 |
|
| #
bac6cd5b |
| 01-Apr-2022 |
Paul Kirth <[email protected]> |
[misexpect] Re-implement MisExpect Diagnostics
Reimplements MisExpect diagnostics from D66324 to reconstruct its original checking methodology only using MD_prof branch_weights metadata.
New checks
[misexpect] Re-implement MisExpect Diagnostics
Reimplements MisExpect diagnostics from D66324 to reconstruct its original checking methodology only using MD_prof branch_weights metadata.
New checks rely on 2 invariants:
1) For frontend instrumentation, MD_prof branch_weights will always be populated before llvm.expect intrinsics are lowered.
2) for IR and sample profiling, llvm.expect intrinsics will always be lowered before branch_weights are populated from the IR profiles.
These invariants allow the checking to assume how the existing branch weights are populated depending on the profiling method used, and emit the correct diagnostics. If these invariants are ever invalidated, the MisExpect related checks would need to be updated, potentially by re-introducing MD_misexpect metadata, and ensuring it always will be transformed the same way as branch_weights in other optimization passes.
Frontend based profiling is now enabled without using LLVM Args, by introducing a new CodeGen option, and checking if the -Wmisexpect flag has been passed on the command line.
Reviewed By: tejohnson
Differential Revision: https://reviews.llvm.org/D115907
show more ...
|
| #
984a0dc3 |
| 25-Mar-2022 |
Joseph Huber <[email protected]> |
[OpenMP] Use new offloading binary when embedding offloading images
The previous patch introduced the offloading binary format so we can store some metada along with the binary image. This patch int
[OpenMP] Use new offloading binary when embedding offloading images
The previous patch introduced the offloading binary format so we can store some metada along with the binary image. This patch introduces using this inside the linker wrapper and Clang instead of the previous method that embedded the metadata in the section name.
Differential Revision: https://reviews.llvm.org/D122683
show more ...
|
| #
2978d026 |
| 11-Apr-2022 |
Nikita Popov <[email protected]> |
[Clang] Remove support for legacy pass manager
This removes the -flegacy-pass-manager and -fno-experimental-new-pass-manager options, and the corresponding support code in BackendUtil. The -fno-lega
[Clang] Remove support for legacy pass manager
This removes the -flegacy-pass-manager and -fno-experimental-new-pass-manager options, and the corresponding support code in BackendUtil. The -fno-legacy-pass-manager and -fexperimental-new-pass-manager options are retained as no-ops.
Differential Revision: https://reviews.llvm.org/D123609
show more ...
|
| #
b4ac8490 |
| 07-Apr-2022 |
Pavel Samolysov <[email protected]> |
[clang][NFC] Extract EmitAssemblyHelper::shouldEmitRegularLTOSummary
The code to check if the regular LTO summary should be emitted and to add the corresponding module flags was duplicated in the 'E
[clang][NFC] Extract EmitAssemblyHelper::shouldEmitRegularLTOSummary
The code to check if the regular LTO summary should be emitted and to add the corresponding module flags was duplicated in the 'EmitAssemblyHelper::EmitAssemblyWithLegacyPassManager' and 'EmitAssemblyHelper::RunOptimizationPipeline' methods.
In order to eliminate these code duplications, the 'EmitAssemblyHelper::shouldEmitRegularLTOSummary' method has been extracted. The method returns a bool value, the value is 'true' if the module summary should be emitted. The patch keeps the setting of the module flags inline.
Reviewed By: tejohnson
Differential Revision: https://reviews.llvm.org/D123026
show more ...
|
| #
87b28f50 |
| 04-Apr-2022 |
Pavel Samolysov <[email protected]> |
[clang][NFC] Extract the EmitAssemblyHelper::TargetTriple member
Few times in different methods of the EmitAssemblyHelper class the following code snippet is used to get the TargetTriple and then us
[clang][NFC] Extract the EmitAssemblyHelper::TargetTriple member
Few times in different methods of the EmitAssemblyHelper class the following code snippet is used to get the TargetTriple and then use it's single method to check some conditions:
TargetTriple(TheModule->getTargetTriple())
The parsing of a target triple string is not a trivial operation and it takes time to repeat the parsing many times in different methods of the class and even numerous times in one method just to call a getter (llvm::Triple(TheModule->getTargetTriple()).getVendor()), for example. The patch extracts the TargetTriple member of the EmitAssemblyHelper class to parse the triple only once in the class' constructor.
Reviewed By: tejohnson
Differential Revision: https://reviews.llvm.org/D122587
show more ...
|
| #
fc7573f2 |
| 31-Mar-2022 |
Jorge Gorbe Moya <[email protected]> |
Revert "[misexpect] Re-implement MisExpect Diagnostics"
This reverts commit 46774df307159444d65083c2fd82f8574f0ab1d9.
|
| #
46774df3 |
| 29-Mar-2022 |
Paul Kirth <[email protected]> |
[misexpect] Re-implement MisExpect Diagnostics
Reimplements MisExpect diagnostics from D66324 to reconstruct its original checking methodology only using MD_prof branch_weights metadata.
New checks
[misexpect] Re-implement MisExpect Diagnostics
Reimplements MisExpect diagnostics from D66324 to reconstruct its original checking methodology only using MD_prof branch_weights metadata.
New checks rely on 2 invariants:
1) For frontend instrumentation, MD_prof branch_weights will always be populated before llvm.expect intrinsics are lowered.
2) for IR and sample profiling, llvm.expect intrinsics will always be lowered before branch_weights are populated from the IR profiles.
These invariants allow the checking to assume how the existing branch weights are populated depending on the profiling method used, and emit the correct diagnostics. If these invariants are ever invalidated, the MisExpect related checks would need to be updated, potentially by re-introducing MD_misexpect metadata, and ensuring it always will be transformed the same way as branch_weights in other optimization passes.
Frontend based profiling is now enabled without using LLVM Args, by introducing a new CodeGen option, and checking if the -Wmisexpect flag has been passed on the command line.
Reviewed By: tejohnson
Differential Revision: https://reviews.llvm.org/D115907
show more ...
|
| #
dfde3549 |
| 29-Mar-2022 |
Chris Bieneman <[email protected]> |
NFC. Fixing warnings from adding DXContainer
Adds DXContainer to switch statements in Clang and LLDB to silence warnings.
|
| #
90cb325a |
| 29-Mar-2022 |
Paul Kirth <[email protected]> |
Revert "[misexpect] Re-implement MisExpect Diagnostics"
This reverts commit 2add3fbd976d7b80a3a7fc14ef0deb9b1ca6beee.
|
| #
2add3fbd |
| 19-Mar-2022 |
Paul Kirth <[email protected]> |
[misexpect] Re-implement MisExpect Diagnostics
Reimplements MisExpect diagnostics from D66324 to reconstruct its original checking methodology only using MD_prof branch_weights metadata.
New checks
[misexpect] Re-implement MisExpect Diagnostics
Reimplements MisExpect diagnostics from D66324 to reconstruct its original checking methodology only using MD_prof branch_weights metadata.
New checks rely on 2 invariants:
1) For frontend instrumentation, MD_prof branch_weights will always be populated before llvm.expect intrinsics are lowered.
2) for IR and sample profiling, llvm.expect intrinsics will always be lowered before branch_weights are populated from the IR profiles.
These invariants allow the checking to assume how the existing branch weights are populated depending on the profiling method used, and emit the correct diagnostics. If these invariants are ever invalidated, the MisExpect related checks would need to be updated, potentially by re-introducing MD_misexpect metadata, and ensuring it always will be transformed the same way as branch_weights in other optimization passes.
Frontend based profiling is now enabled without using LLVM Args, by introducing a new CodeGen option, and checking if the -Wmisexpect flag has been passed on the command line.
Reviewed By: tejohnson
Differential Revision: https://reviews.llvm.org/D115907
show more ...
|
| #
64902d33 |
| 24-Mar-2022 |
Julian Lettner <[email protected]> |
Reland "Lower `@llvm.global_dtors` using `__cxa_atexit` on MachO"
For MachO, lower `@llvm.global_dtors` into `@llvm_global_ctors` with `__cxa_atexit` calls to avoid emitting the deprecated `__mod_te
Reland "Lower `@llvm.global_dtors` using `__cxa_atexit` on MachO"
For MachO, lower `@llvm.global_dtors` into `@llvm_global_ctors` with `__cxa_atexit` calls to avoid emitting the deprecated `__mod_term_func`.
Reuse the existing `WebAssemblyLowerGlobalDtors.cpp` to accomplish this.
Enable fallback to the old behavior via Clang driver flag (`-fregister-global-dtors-with-atexit`) or llc / code generation flag (`-lower-global-dtors-via-cxa-atexit`). This escape hatch will be removed in the future.
Differential Revision: https://reviews.llvm.org/D121736
show more ...
|
| #
581dc3c7 |
| 23-Mar-2022 |
Zequan Wu <[email protected]> |
Revert "Lower `@llvm.global_dtors` using `__cxa_atexit` on MachO"
This reverts commit 22570bac694396514fff18dec926558951643fa6.
|
| #
73777b4c |
| 22-Mar-2022 |
Djordje Todorovic <[email protected]> |
[Debugify] Optimize debugify original mode
Before we start addressing the issue with having a lot of false positives when using debugify in the original mode, we have made a few patches that should
[Debugify] Optimize debugify original mode
Before we start addressing the issue with having a lot of false positives when using debugify in the original mode, we have made a few patches that should speed up the execution of the testing utility Passes.
For example, when testing a large project (let's say LLVM project itself), we can face a lot of potential DI issues. Usually, we use -verify-each-debuginfo-preserve (that is very similar to -debugify-each) -- it collects DI metadata before each Pass, and after the Pass it checks if the Pass preserved the DI metadata. However, we can speed up this process, since we don't need to collect DI metadata before each Pass -- we could use the DI metadata that are collected after the previous Pass from the pipeline as an input for the next Pass.
This patch speeds up the utility for ~2x.
Differential Revision: https://reviews.llvm.org/D115622
show more ...
|
| #
964398cc |
| 18-Mar-2022 |
Paul Kirth <[email protected]> |
Revert "Revert "Revert "[misexpect] Re-implement MisExpect Diagnostics"""
This reverts commit 6cf560d69a222bff4af4e1d092437fd77f0f981c.
|