|
Revision tags: 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, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0 |
|
| #
83902c40 |
| 25-Aug-2022 |
Ben Langmuir <blangmuir@apple.com> |
Reapply "[clang][deps] Split translation units into individual -cc1 or other commands"
Attempt to fix the test failures observed in CI: * Add Option dependency, which caused BUILD_SHARED_LIBS builds
Reapply "[clang][deps] Split translation units into individual -cc1 or other commands"
Attempt to fix the test failures observed in CI: * Add Option dependency, which caused BUILD_SHARED_LIBS builds to fail * Adapt tests that accidentally depended on the host platform: platforms that don't use an integrated assembler (e.g. AIX) get a different set of commands from the driver. Most dependency scanner tests can use -fsyntax-only or -E instead of -c to avoid this, and in the rare case we want to check -c specifically, set an explicit target so the behaviour is independent of the host.
Original commit message follows.
---
Instead of trying to "fix" the original driver invocation by appending arguments to it, split it into multiple commands, and for each -cc1 command use a CompilerInvocation to give precise control over the invocation.
This change should make it easier to (in the future) canonicalize the command-line (e.g. to improve hits in something like ccache), apply optimizations, or start supporting multi-arch builds, which would require different modules for each arch.
In the long run it may make sense to treat the TU commands as a dependency graph, each with their own dependencies on modules or earlier TU commands, but for now they are simply a list that is executed in order, and the dependencies are simply duplicated. Since we currently only support single-arch builds, there is no parallelism available in the execution.
Differential Revision: https://reviews.llvm.org/D132405
show more ...
|
| #
1877d76a |
| 30-Aug-2022 |
Ben Langmuir <blangmuir@apple.com> |
Revert "[clang][deps] Split translation units into individual -cc1 or other commands"
Failing on some bots, reverting until I can fix it.
This reverts commit f80a0ea760728e70f70debf744277bc3aa59bc1
Revert "[clang][deps] Split translation units into individual -cc1 or other commands"
Failing on some bots, reverting until I can fix it.
This reverts commit f80a0ea760728e70f70debf744277bc3aa59bc17.
show more ...
|
| #
f80a0ea7 |
| 25-Aug-2022 |
Ben Langmuir <blangmuir@apple.com> |
[clang][deps] Split translation units into individual -cc1 or other commands
Instead of trying to "fix" the original driver invocation by appending arguments to it, split it into multiple commands,
[clang][deps] Split translation units into individual -cc1 or other commands
Instead of trying to "fix" the original driver invocation by appending arguments to it, split it into multiple commands, and for each -cc1 command use a CompilerInvocation to give precise control over the invocation.
This change should make it easier to (in the future) canonicalize the command-line (e.g. to improve hits in something like ccache), apply optimizations, or start supporting multi-arch builds, which would require different modules for each arch.
In the long run it may make sense to treat the TU commands as a dependency graph, each with their own dependencies on modules or earlier TU commands, but for now they are simply a list that is executed in order, and the dependencies are simply duplicated. Since we currently only support single-arch builds, there is no parallelism available in the execution.
Differential Revision: https://reviews.llvm.org/D132405
show more ...
|
|
Revision tags: llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init |
|
| #
02871701 |
| 15-Jul-2022 |
Ben Langmuir <blangmuir@apple.com> |
[clang][deps] Include canonical invocation in ContextHash
The "strict context hash" is insufficient to identify module dependencies during scanning, leading to different module build commands being
[clang][deps] Include canonical invocation in ContextHash
The "strict context hash" is insufficient to identify module dependencies during scanning, leading to different module build commands being produced for a single module, and non-deterministically choosing between them. This commit switches to hashing the canonicalized `CompilerInvocation` of the module. By hashing the invocation we are converting these from correctness issues to performance issues, and we can then incrementally improve our ability to canonicalize command-lines.
This change can cause a regression in the number of modules needed. Of the 4 projects I tested, 3 had no regression, but 1, which was clang+llvm itself, had a 66% regression in number of modules (4% regression in total invocations). This is almost entirely due to differences between -W options across targets. Of this, 25% of the additional modules are system modules, which we could avoid if we canonicalized -W options when -Wsystem-headers is not present -- unfortunately this is non-trivial due to some warnings being enabled in system headers by default. The rest of the additional modules are mostly real differences in potential warnings, reflecting incorrect behaviour in the current scanner.
There were also a couple of differences due to `-DFOO` `-fmodule-ignore-macro=FOO`, which I fixed here.
Since the output paths for the module depend on its context hash, we hash the invocation before filling in outputs, and rely on the build system to always return the same output paths for a given module.
Note: since the scanner itself uses an implicit modules build, there can still be non-determinism, but it will now present as different module+hashes rather than different command-lines for the same module+hash.
Differential Revision: https://reviews.llvm.org/D129884
show more ...
|