| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D150799
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Leverage perf-training flow for BOLT profile collection, enabling reproducible
BOLT optimization. Remove the use of bootstrapped build for profile collection.
Test Plan:
- Regular (single-stage) build
```
$ cmake ... -C .../clang/cmake/caches/BOLT.cmake
$ ninja clang-bolt
...
[21/24] Instrumenting clang binary with BOLT
[21/24] Generating BOLT profile for Clang
[23/24] Merging BOLT fdata
Profile from 2 files merged.
[24/24] Optimizing Clang with BOLT
...
1291202496 : executed instructions (-1.1%)
27005133 : taken branches (-71.5%)
...
```
- Two stage build (ThinLTO+InstPGO)
```
$ cmake ... -C .../clang/cmake/caches/BOLT.cmake -C .../clang/cmake/caches/BOLT-PGO.cmake
$ ninja clang-bolt
$ ninja stage2-clang-bolt
...
[2756/2759] Instrumenting clang binary with BOLT
[2756/2759] Generating BOLT profile for Clang
[2758/2759] Merging BOLT fdata
[2759/2759] Optimizing Clang with BOLT
...
BOLT-INFO: 7092 out of 184104 functions in the binary (3.9%) have non-empty execution profile
756531927 : executed instructions (-0.5%)
15399400 : taken branches (-40.3%)
...
```
Reviewed By: beanz
Differential Revision: https://reviews.llvm.org/D143553
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 1fab236e6e4575d5af4f4722216df4dd6a872795.
Shipping LLDB means distributing libLLDB.so, which will need to be built
with PIC. Disabling PIC also removes the libLTO target, which is a hard
dependency of the LLDB test suite.
Reviewed By: abrachet
Differential Revision: https://reviews.llvm.org/D148577
|
|
|
|
|
|
|
| |
This is a reland of D135471, save for dropping libLTO which was
already done in a separate change.
Differential Revision: https://reviews.llvm.org/D147250
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This flag causes the toolchain distribution to be built using LLVM
CMake's multiple distribution feature. The distribution* family of CMake
targets would be replaced with the toolchain-distribution* family.
This shouldn't otherwise affect the semantics of the build, but it sets
up the ability to split out the LLDB build from the main distribution
used by Fuchsia.
Reviewed By: phosek
Differential Revision: https://reviews.llvm.org/D146665
|
|
|
|
|
|
| |
This is necessary to have a complete RISC-V toolchain for Fuchsia.
Differential Revision: https://reviews.llvm.org/D146608
|
|
|
|
|
|
|
|
|
|
| |
stage2-check-lldb should be run in a 2-stage build to test the final
LLDB artifact, so it and related targets must be exported to the stage 1
project.
Reviewed By: phosek
Differential Revision: https://reviews.llvm.org/D145818
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LLVM_ENABLE_PROJECTS is automatically forwarded from stage 1 builds to
stage 2 builds, so setting FUCHSIA_ENABLE_LLDB has no effect on
two-stage builds.
Instead, add FUCHSIA_ENABLE_LLDB to the stage one build as well.
This also disables curses and libedit by default for now in both stage1
and stage 2 builds; these should be opt-in.
Reviewed By: haowei
Differential Revision: https://reviews.llvm.org/D145449
|
|
|
|
|
|
| |
Reviewed By: phosek
Differential Revision: https://reviews.llvm.org/D145187
|
|
|
|
|
|
|
| |
This patch enables LLVM_USE_RELATIVE_PATHS_IN_FILES when building the
bootstrap toolchain for 2 stages build.
Differential Revision: https://reviews.llvm.org/D145010
|
| |
|
|
|
|
| |
Don't include llvm-driver when building for Windows
|
|
|
|
|
|
|
|
| |
The MacOS problem has been fixed. Additionally, don't enable the
driver build on Windows. We can look into enabling it later if
symlinks work better than I think on Windows.
Differential Revision: https://reviews.llvm.org/D144287
|
|
|
|
|
|
| |
This reverts commit 4eadd19cc423b860f7ce0217000276da769b7809.
Doesn't work on macos. I'll investigate more
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D144287
|
|
|
|
|
|
|
| |
This patch sets '/winsysroot' flag when building Windows runtimes so we
don't have to explicitly set Windows library search paths.
Differential Revision: https://reviews.llvm.org/D143960
|
|
|
|
|
|
|
|
|
|
| |
This CMake option builds/installs LLDB as part of the Fuchsia toolchain.
Once this is better supported, the effects of this will be inlined into
the toolchain cache file.
Reviewed By: phosek
Differential Revision: https://reviews.llvm.org/D143794
|
|
|
|
|
|
|
|
|
|
|
|
| |
Provide a way to install usable BOLT-optimized Clang
(clang + resource headers) using
`ninja clang-bolt install-distribution` with BOLT.cmake cache file
or `ninja stage2-clang-bolt stage2-install-distribution`
with BOLT-PGO.cmake cache file.
Reviewed By: phosek
Differential Revision: https://reviews.llvm.org/D140565
|
|
|
|
|
| |
This reverts commit f9ff49882a65ab26ab347f4df8f2a58368d37185.
Accidentally landed a draft patch.
|
|
|
|
|
|
|
| |
This patch provides initial support of building Clang runtimes for
Windows when using Fuchsia Clang toolchains under Linux.
Differential Revision: https://reviews.llvm.org/D141738
|
|
|
|
| |
WIP
|
|
|
|
|
|
|
| |
This patch simplified the BOOTSTRAP_ flags, allowing them to be
pass through from regular flags.
Differential Revision: https://reviews.llvm.org/D143288
|
|
|
|
|
|
| |
This is now supported.
Differential Revision: https://reviews.llvm.org/D142917
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of creating an extra clang-bolt binary and clang++-bolt symlink,
replace the original clang binary with BOLT-optimized one.
This fixes the issue with installing optimized binary as `install-clang`
target now copies the new version.
Reviewed By: phosek
Differential Revision: https://reviews.llvm.org/D139454
|
|
|
|
|
|
| |
Preemptively include clang-bolt target in BOLT-PGO CMake cache file,
in preparation of https://reviews.llvm.org/D139454 to avoid breaking
bolt-x86_64-ubuntu-clang-bolt-lto-pgo buildbot.
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D142649
|
|
|
|
|
| |
This reverts commit 20bb7658f53b0b8db165ff4d404ede3f9b34862d.
It breaks Fuchsia stage2 builders.
|
|
|
|
|
|
|
| |
This patch provides initial support of building Clang runtimes for
Windows when using Fuchsia Clang toolchains under Linux.
Differential Revision: https://reviews.llvm.org/D141738
|
|
|
|
|
|
|
|
|
|
|
|
| |
D139623 replaces CMAKE_CFG_INTDIR
with '.' for multi-config builds. However, this change has
not been reflected in mlir, flang, polly, lld, and clang.
The patch updates the path to LLVMConfig.cmake for those
projects.
Reviewed By: sebastian-ne
Differential Revision: https://reviews.llvm.org/D141538
|
|
|
|
|
|
|
|
| |
dependencies too"
This reverts commit 9f3081dc6fe8447e85741865846840bc491866e5.
Broke clangd buildbots in
https://lab.llvm.org/buildbot/#/builders/131/builds/38935.
|
|
|
|
|
|
| |
This change includes llvm-ml tool in Fuchsia toolchain.
Differential Revision: https://reviews.llvm.org/D141448
|
|
|
|
|
|
| |
Fixes: https://github.com/llvm/llvm-project/issues/59844
Differential Revision: https://reviews.llvm.org/D141047
|
|
|
|
|
|
|
|
|
|
| |
Add a version to non-LLVM cmake package so that users needing an exact
version match can use the version parameter to find_package. Also adjust
the find_package(LLVM) to use an exact version match as well.
Reviewed By: arsenm, stellaraccident, mceier
Differential Revision: https://reviews.llvm.org/D138274
|
|
|
|
|
|
|
|
| |
Summary: This reverts commit ad485b71b51168ce13282ae159bd8feff48baf84.
Reviewers:
Subscribers:
|
|
|
|
|
|
|
|
|
|
| |
Add a version to non-LLVM cmake package so that users needing an exact
version match can use the version parameter to find_package. Also adjust
the find_package(LLVM) to use an exact version match as well.
Reviewed By: arsenm, stellaraccident
Differential Revision: https://reviews.llvm.org/D138274
|
|
|
|
|
|
|
|
|
| |
This reverts commit a6f621b8cacca926d809010c135be038fd05652c.
We suspect that this patch might be the culprit that is causing
every llvm executable to be sigkill'd immediately on Apple Silicon
machines. Notably, the only other cache file with CMAKE_POSITION_INDEPENDENT_CODE
is Apple's and they have it off.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
420d7ccbac0f499a6ff9595bdbfa99cd3376df22 introduced BACKEND_PACKAGE_STRING to
replace `PACKAGE_VERSION` (llvm/Config/config.h) to support standalone builds.
This is used in the output of `clang -cc1 -v`.
Since llvm-config.h is available for both standalone and non-standalone builds,
we can just use `LLVM_VERSION_STRING` from llvm-config.h.
clang/cmake/modules/AddClang.cmake uses `VERSION_STRING "${CLANG_VERSION} (${BACKEND_PACKAGE_STRING})"`.
Just simplify it to `"${CLANG_VERSION}"` so that we can remove the CMake
variable BACKEND_PACKAGE_STRING.
Reviewed By: tstellar
Differential Revision: https://reviews.llvm.org/D136660
|
|
|
|
|
|
| |
All our users have migrated to ld64.lld so we no longer need libLTO.
Differential Revision: https://reviews.llvm.org/D135471
|
|
|
|
|
| |
This reverts commit 8d89dbceeb576171efd12a5657c038a2ec2e54a5 since
this broke the compiler-rt build.
|
|
|
|
|
|
| |
All our users have migrated to ld64.lld so we no longer need libLTO.
Differential Revision: https://reviews.llvm.org/D135471
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This enables multi-stage PGO build optimized by BOLT using BOLT.cmake cache.
The issue is that `-DPGO_BUILD_CONFIGURATION` cache file is passed to both
stage2-instrumented and stage2-optimized builds (for them to be identical),
but in case of BOLT.cmake, it doesn't make sense to BOLT-instrument the
instrumented binary (it's not going to be optimized). Hence turn off
`CLANG_BOLT_INSTRUMENT` code if `LLVM_BUILD_INSTRUMENTED` is enabled.
The final workflow that enables multi-stage InstrPGO+ThinLTO+BOLT Clang build:
```
cmake <llvm-project>/llvm -GNinja -DLLVM_ENABLE_LLD=ON \
-DBOOTSTRAP_LLVM_ENABLE_LLD=ON -DBOOTSTRAP_BOOTSTRAP_LLVM_ENABLE_LLD=ON \
-DPGO_INSTRUMENT_LTO=Thin -C llvm-project/clang/cmake/caches/BOLT-PGO.cmake
ninja stage2-clang++-bolt
```
Reviewed By: rafauler
Differential Revision: https://reviews.llvm.org/D136023
|
|
|
|
|
|
| |
As pointed out by thakis in https://reviews.llvm.org/D135436#3858463,
this variable can be dropped now that the Go bindings have been
removed.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Take the library target out of `generate_protos` function so the caller
can decide where to layer the library using the source generated from
the function.
Fixes: https://github.com/llvm/llvm-project/issues/58075
Reviewed By: sammccall
Differential Revision: https://reviews.llvm.org/D135712
|
|
|
|
|
|
| |
Do not specify the execution directory in the remote execution script command line
for the compiler-rt builtin library tests. There is a single execution file tests
within the single directory. No need to pack all of them every time, just run one by one.
|
|
|
|
|
|
|
|
|
|
| |
`LLVM_DISTRIBUTION_COMPONENTS` now influences the llvm binary in the
normal cmake output directory when it is set. This allows for
distribution targets to only include tools they want in the llvm
binary. It must be done this way because only one target can be
associated with a specific output name.
Differential Revision: https://reviews.llvm.org/D131310
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D134979
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that all jobs have moved over to the new style of Lit configuration,
we can remove all traces of the legacy testing configuration system.
This includes:
- Cache settings that are not honored or useful anymore
- Several CMake options that were only useful in the context of the
legacy Lit configuration system
- A bunch of Python support code that is not used anymore
- The legacy lit.cfg.in files themselves
Differential Revision: https://reviews.llvm.org/D134650
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The HLSL support in clang is in progress and not fully functioning. As
such we don't want to install the related optional build components by
default (yet), but we do need an option to build and install them
locally for testing and for some key users.
This adds the `CLANG_ENABLE_HLSL` option which is off by default and can
be enabled to install the HLSL clang headers and the clang-dxc symlink.
Reviewed By: phosek
Differential Revision: https://reviews.llvm.org/D134693
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds `CLANG_BOLT_INSTRUMENT` option that applies BOLT instrumentation
to Clang, performs a bootstrap build with the resulting Clang, merges resulting
fdata files into a single profile file, and uses it to perform BOLT optimization
on the original Clang binary.
The projects and targets used for bootstrap/profile collection are configurable via
`CLANG_BOLT_INSTRUMENT_PROJECTS` and `CLANG_BOLT_INSTRUMENT_TARGETS`.
The defaults are "llvm" and "count" respectively, which results in a profile with
~5.3B dynamically executed instructions.
The intended use of the functionality is through BOLT CMake cache file, similar
to PGO 2-stage build:
```
cmake <llvm-project>/llvm -C <llvm-project>/clang/cmake/caches/BOLT.cmake
ninja clang++-bolt # pulls clang-bolt
```
Stats with a recent checkout (clang-16), pre-built BOLT and Clang, 72vCPU/224G
| CMake configure with host Clang + BOLT.cmake | 1m6.592s
| Instrumenting Clang with BOLT | 2m50.508s
| CMake configure `llvm` with instrumented Clang | 5m46.364s (~5x slowdown)
| CMake build `not` with instrumented Clang |0m6.456s
| Merging fdata files | 0m9.439s
| Optimizing Clang with BOLT | 0m39.201s
Building Clang:
```cmake ../llvm-project/llvm -DCMAKE_C_COMPILER=... -DCMAKE_CXX_COMPILER=...
-DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS=clang
-DLLVM_TARGETS_TO_BUILD=Native -GNinja```
| | Release | BOLT-optimized
| cmake | 0m24.016s | 0m22.333s
| ninja clang | 5m55.692s | 4m35.122s
I know it's not rigorous, but shows a ballpark figure.
Reviewed By: phosek
Differential Revision: https://reviews.llvm.org/D132975
|