Commit
7f0f4cab18a9e3abf8d0583c1a87e352cd5577a6
by sivachandra[libc][NFC] Add 'struct_' prefix to type headers defining struct types.
This allows header generator to generate type inclusion boiler plate in a straightforward manner.
|
 | libc/include/llvm-libc-types/struct_tm.h |
 | libc/include/CMakeLists.txt |
 | libc/config/linux/api.td |
 | libc/include/llvm-libc-types/__sigaction.h |
 | libc/include/llvm-libc-types/struct_sigaction.h |
 | libc/include/llvm-libc-types/CMakeLists.txt |
 | libc/include/llvm-libc-types/tm.h |
Commit
e6de53b4de4aecca4ac892500a0907805896ed27
by eopxd[RISCV] Bump rvv-related extensions from 0.10 to 1.0
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D112987
|
 | llvm/lib/Support/RISCVISAInfo.cpp |
 | llvm/test/MC/RISCV/attribute-arch.s |
 | clang/test/Preprocessor/riscv-target-features.c |
 | clang/test/Driver/riscv-arch.c |
 | llvm/test/CodeGen/RISCV/attributes.ll |
Commit
a99e06aa869b44588a18a423f58e0ab30c292d8e
by ravishankarm[mlir][Linalg] Avoid generating illegal operations during elementwise fusion.
In some cases, fusion can produce illegal operations if after fusion the range of some of the loops cannot be computed from shapes of its operands. Check for this case and abort the fusion if this happens.
Differential Revision: https://reviews.llvm.org/D117602
|
 | mlir/lib/Dialect/Linalg/Transforms/ElementwiseOpFusion.cpp |
 | mlir/test/Dialect/Linalg/fusion-elementwise-ops.mlir |
Commit
05cd9a0596d8d2cc4fdb1d1dfa0957968aceaf92
by npopov[ConstantFold] Simplify type check in reinterpret load folding (NFC)
Keep a list of allowed types, but then always construct the map type the same way. We need an integer with the same width as the original type.
|
 | llvm/lib/Analysis/ConstantFolding.cpp |
Commit
6a19cb837c9b2ca14642bb0a8f1234903e4430d0
by npopov[ConstantFold] Support pointers in reinterpret load folding
Peculiarly, the necessary code to handle pointers (including the check for non-integral address spaces) is already in place, because we were already allowing vectors of pointers here, just not plain pointers.
|
 | llvm/lib/Analysis/ConstantFolding.cpp |
 | llvm/test/Transforms/InstSimplify/ConstProp/loads.ll |
Commit
7950010e4983a58d19a5d8a831f4c2467c04c56d
by simon.moll[VE][NFC] Factor out helper functions
Factor out some helper functions to cleanup VEISelLowering.
Reviewed By: kaz7
Differential Revision: https://reviews.llvm.org/D117683
|
 | llvm/lib/Target/VE/VECustomDAG.h |
 | llvm/lib/Target/VE/VEISelLowering.cpp |
 | llvm/lib/Target/VE/VECustomDAG.cpp |
Commit
3f9d1f516e19cc9548cf17ec60b73300d4ab8360
by npopov[InstSimplify] Add tests for reinterpret load of floats (NFC)
Add tests for currently unsupported float types.
|
 | llvm/test/Transforms/InstSimplify/ConstProp/loads.ll |
Commit
b4900296e4a51b0076bac69b31871c7a29efa90f
by npopov[ConstantFold] Allow all float types in reinterpret load folding
Rather than hardcoding just half, float and double, allow all floating point types.
|
 | llvm/lib/Analysis/ConstantFolding.cpp |
 | llvm/test/Transforms/InstSimplify/ConstProp/loads.ll |
Commit
99b5a8049be49563bd7541dd4ea93ad2f6516299
by tpoppMatch bazel config with cmake after f29256a64
|
 | utils/bazel/llvm_configs/llvm-config.h.cmake |
Commit
69825f369302184aecb1ee53d9224e49ba15d9ef
by clementval[fir] Add array operations documentation
This patch adds documentation on FIR array operations and their usage.
Reviewed By: schweitz
Differential Revision: https://reviews.llvm.org/D115077
|
 | flang/docs/FIRArrayOperations.md |
Commit
d03c5bc8d437e47ae424ac9611ae441cd5225526
by markus.boeck02[mlir] Fully qualify return types in OpAsmInterface.td and FunctionInterfaces.td
|
 | mlir/include/mlir/IR/OpAsmInterface.td |
 | mlir/include/mlir/IR/FunctionInterfaces.td |
Commit
a2f6921ef2a1564a52aa3ecd7e30697250ccaf2e
by sguelton[llvm] Remove unused headers in LLVMDemangle
As an hint to the impact of the cleanup, running
clang++ -E -Iinclude -I../llvm/include ../llvm/lib/Demangle/*.cpp -std=c++14 -fno-rtti -fno-exceptions | wc -l
before: 208053 lines after: 203965 lines
|
 | llvm/lib/Demangle/MicrosoftDemangleNodes.cpp |
 | llvm/include/llvm/Demangle/MicrosoftDemangle.h |
 | llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h |
 | llvm/lib/Demangle/ItaniumDemangle.cpp |
Commit
c0cf209076a29076ebf43c59dff3cc3c8400e4d7
by flo[VPlan] Add VPWidenIntOrFpInductionRecipe::isCanonical, use it (NFCI).
This patch adds VPWidenIntOrFpInductionRecipe::isCanonical to check if an induction recipe is canonical. The code is also updated to use it instead of isCanonicalID.
Reviewed By: Ayal
Differential Revision: https://reviews.llvm.org/D117551
|
 | llvm/lib/Transforms/Vectorize/LoopVectorize.cpp |
 | llvm/lib/Transforms/Vectorize/VPlanValue.h |
 | llvm/lib/Transforms/Vectorize/VPlan.h |
 | llvm/lib/Transforms/Vectorize/VPlan.cpp |
Commit
55689904d2e5afcc5309f7234d6369307ee305d0
by flo[VPlan] Move ::isCanonical outside ifdef.
This fixes a build failure with assertions disabled.
|
 | llvm/lib/Transforms/Vectorize/VPlan.cpp |
Commit
1f9e18b6565fd1bb69c4b649b9efd3467b3c7c7d
by sguelton[llvm] Remove (some) LLVMDemangle header dependencies
- Avoid using <iterator> for std::end on a plain array (using <array> instead) - Avoid using <algorithm> for std::min and std::equal (using alternate logic and std::strcmp instead)
As an hint to the impact of the cleanup, running
clang++ -E -Iinclude -I../llvm/include ../llvm/lib/Demangle/*.cpp -std=c++14 -fno-rtti -fno-exceptions | wc -l
before: 203965 lines after: 169704 lines
|
 | llvm/include/llvm/Demangle/StringView.h |
 | llvm/include/llvm/Demangle/Utility.h |
 | llvm/include/llvm/Demangle/ItaniumDemangle.h |
Commit
e7762653d3b071dfb86d4e2d3bcf7c1455683d37
by npopov[Attributor] Avoid some pointer element type accesses
|
 | llvm/lib/Transforms/IPO/AttributorAttributes.cpp |
Commit
065044c443f4041f32e0a8d6e633f9d92580fbca
by sgueltonFix 1f9e18b6565fd1bb69c4b649b9efd3467b3c7c7d
Don't assume iterator on std::array<char, ...> are char*, use .data() instead
|
 | llvm/include/llvm/Demangle/Utility.h |
Commit
329feeb938ac63602136bcb3c5ec3a64109be94c
by Lang Hames[ORC][docs] Describe removing JITDylibs, using custom program representations.
Add documentation around: * Removing JITDylib from the session * Add support for custom program representation
Reviewed By: lhames
Differential Revision: https://reviews.llvm.org/D116476
|
 | llvm/docs/ORCv2.rst |
Commit
b351ac3873db15b16c2aa6d1e0e08ff9fab44f1f
by sebastian.neubauer[AMDGPU][NFC] Regenerate InstCombine test
|
 | llvm/test/Transforms/InstCombine/AMDGPU/amdgcn-intrinsics.ll |
Commit
0530fdbbbb84ea3024a4a8f7156ff716f00ffd48
by sebastian.neubauer[AMDGPU] Fix LOD bias in A16 combine
As the codegen fix in D111754, the LOD bias needs to be converted to 16 bits. Fix this in the combine.
Differential Revision: https://reviews.llvm.org/D116038
|
 | llvm/include/llvm/IR/IntrinsicsAMDGPU.td |
 | llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp |
 | llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.h |
 | llvm/test/Transforms/InstCombine/AMDGPU/amdgcn-intrinsics.ll |
 | llvm/lib/Target/AMDGPU/MIMGInstructions.td |
 | llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp |
 | llvm/lib/Target/AMDGPU/SIISelLowering.cpp |
Commit
603d18033c510c99ad84f26b6603db1ca68a500f
by sebastian.neubauer[AMDGPU][InstCombine] Remove zero LOD bias
If the bias is zero, we can remove it from the image instruction. Also copy other image optimizations (l->lz, mip->nomip) to IR combines.
Differential Revision: https://reviews.llvm.org/D116042
|
 | llvm/lib/Target/AMDGPU/MIMGInstructions.td |
 | llvm/test/Transforms/InstCombine/AMDGPU/amdgcn-intrinsics.ll |
 | llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp |
 | llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp |
 | llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h |
Commit
ae2f9c8be89768086b9f335d60bbe8312b212f95
by sebastian.neubauer[AMDGPU] Remove lz and nomip combine from codegen
These combines have been moved into the IR combiner in D116042.
Differential Revision: https://reviews.llvm.org/D116116
|
 | llvm/lib/Target/AMDGPU/SIISelLowering.cpp |
 | llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp |
 | llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.sample.ltolz.ll |
 | llvm/test/CodeGen/AMDGPU/image_ls_mipmap_zero.ll |
 | llvm/test/CodeGen/AMDGPU/GlobalISel/image_ls_mipmap_zero.a16.ll |
 | llvm/test/CodeGen/AMDGPU/dagcombine-fma-fmad.ll |
 | llvm/test/CodeGen/AMDGPU/cluster_stores.ll |
 | llvm/test/CodeGen/AMDGPU/GlobalISel/image_ls_mipmap_zero.ll |
 | llvm/test/CodeGen/AMDGPU/skip-if-dead.ll |
 | llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp |
 | llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.sample.ltolz.a16.ll |
 | llvm/test/CodeGen/AMDGPU/llvm.amdgcn.image.sample.ltolz.ll |
Commit
f53d359816e66a107195e1e4b581e2a33bbafaa4
by sgueltonFix 1f9e18b6565fd1bb69c4b649b9efd3467b3c7c7d
Part 2
|
 | llvm/include/llvm/Demangle/Utility.h |
Commit
9c5b856dac5c0ccbe755410b826f683ef01d7f08
by npopov[CoroSplit] Avoid pointer element type accesses
Use isOpaqueOrPointeeTypeMatches() for the assertions instead.
|
 | llvm/lib/Transforms/Coroutines/CoroSplit.cpp |
Commit
0ca426d6ac65b84c70ac7fd9511628ce5115423e
by llvm-dev[llvm-mca] Improve barriers for strict region marking (PR52198)
As suggested on the bug, to help (but not completely....) stop folded instructions crossing the inline asm barriers used for llvm-mca analysis, we should recommend tagging with memory captures/attributes.
Differential Revision: https://reviews.llvm.org/D117788
|
 | llvm/docs/CommandGuide/llvm-mca.rst |
Commit
bfbdb5e43e50484e179122bfb66cff8165e4b084
by npopov[Coroutines] Avoid some pointer element type accesses
These are just verifying that pointer types are correct, which is no longer relevant under opaque pointers.
|
 | llvm/lib/Transforms/Coroutines/Coroutines.cpp |
Commit
597eae998a874a872b67d1a22a04d7c45d2ef94b
by kadircet[clangd][Background] Make index validation logs verbose
These errors are non-harmful and should be transient. They either imply: - compilation database returned stale results for TUs and it'll be fixed once it's updated to match project state. - a TUs dependencies has changed and some headers no longer exist. this should be fixed with the next indexing cycle.
In either case the user will have some stale symbols in their index until clangd restarts and the underlying issue is resolved. On the downside these logs are confusing users when there's another issue.
Differential Revision: https://reviews.llvm.org/D117792
|
 | clang-tools-extra/clangd/index/Background.cpp |
Commit
b6a41fddcfd375ce30487ef87ca2cd65a6be0bcc
by orlando.hyams[DWARF][DebugInfo] Fix off-by-one error in size of DW_TAG_base_type types
Fix PR53163 by rounding the byte size of DW_TAG_base_type types up. Without this fix we risk emitting types with a truncated size (including rounding less-than-byte-sized types' sizes down to zero).
Reviewed By: probinson
Differential Revision: https://reviews.llvm.org/D117124
|
 | llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp |
 | llvm/test/DebugInfo/X86/base-type-size.ll |
Commit
357f2d9ccf204981fd90481ba5ebb942ea46d7f9
by groverkss[mlir][LangRef] Add top-level production to the MLIR grammar
The LangRef currently lacks a top-level production, leaving the productions attribute-alias-def and type-alias-defunused. Clarify the situation by declaring what is to be parsed by an MLIR parser at the toplevel.
Reviewed By: mehdi_amini
Differential Revision: https://reviews.llvm.org/D117668
|
 | mlir/docs/LangRef.md |
Commit
4d268dc94a6bef0221c94d4b7e4c2b112e75fe1b
by fraser[RISCV] Enable CGP to sink splat operands of VP intrinsics
This patch brings better splat-matching to our VP support, by sinking splat operands of VP intrinsics back into the same block as the VP operation. The list of VP intrinsics we are interested in matches that of the regular instructions.
Some optimization is still lacking. For instance, our VL nodes aren't recognized as commutative, so splats must be on the RHS. Because of this, we limit our sinking of splats to just the RHS operand for now. Improvement in this regard can come in another patch.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D117703
|
 | llvm/lib/Target/RISCV/RISCVISelLowering.cpp |
 | llvm/test/CodeGen/RISCV/rvv/sink-splat-operands.ll |
Commit
825a3cd6b6972b6a50b80bed7d951d7ea7f90669
by kadircet[clangd] Fail inlayHints requests on content changes
This should improve the overall UX by making the labels less jumpy.
Differential Revision: https://reviews.llvm.org/D117776
|
 | clang-tools-extra/clangd/ClangdServer.cpp |
Commit
4727d29d908f9dd608dd97a58c0af1ad579fd3ca
by llvm-dev[X86] Remove __builtin_ia32_pabs intrinsics and use generic __builtin_elementwise_abs
D111986 added the generic `__builtin_elementwise_abs()` intrinsic with the same integer absolute behaviour as the SSE/AVX instructions (abs(INT_MIN) == INT_MIN)
This patch removes the `__builtin_ia32_pabs*` intrinsics and just uses `__builtin_elementwise_abs` - the existing tests see no changes: ``` __m256i test_mm256_abs_epi8(__m256i a) { // CHECK-LABEL: test_mm256_abs_epi8 // CHECK: [[ABS:%.*]] = call <32 x i8> @llvm.abs.v32i8(<32 x i8> %{{.*}}, i1 false) return _mm256_abs_epi8(a); } ``` This requires us to add a `__v64qs` explicitly signed char vector type (we already have `__v16qs` and `__v32qs`).
Differential Revision: https://reviews.llvm.org/D117791
|
 | clang/lib/Headers/avx512bwintrin.h |
 | clang/lib/CodeGen/CGBuiltin.cpp |
 | clang/include/clang/Basic/BuiltinsX86.def |
 | clang/lib/Headers/tmmintrin.h |
 | clang/test/CodeGen/builtins-x86.c |
 | clang/lib/Headers/avx2intrin.h |
 | clang/lib/Headers/avx512vlintrin.h |
 | clang/lib/Headers/avx512fintrin.h |
Commit
ced077e1ba52ec2937aab538e9b6fa5149f8c567
by Jan Svoboda[clang][deps] NFC: Simplify handling of cached FS errors
The return types of some `CachedFileSystemEntry` member function are needlessly complex.
This patch attempts to simplify the code by unwrapping cached entries that represent errors early, and then asserting `!isError()`.
Reviewed By: dexonsmith
Differential Revision: https://reviews.llvm.org/D115935
|
 | clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp |
 | clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h |
Commit
5daeada33051aa85777593d3f69eb29f26e7fb2f
by Jan Svoboda[clang][deps] Ensure filesystem cache consistency
The minimizing filesystem used by the dependency scanner isn't great when it comes to the consistency of its caches. There are two problems that can be exposed by a filesystem that changes during dependency scan: 1. In-memory cache entries for original and minimized files are distinct, populated at different times using separate stat/open syscalls. This means that when a file is read with minimization disabled, its contents might be inconsistent when the same file is read with minimization enabled at later point (and vice versa). 2. In-memory cache entries are indexed by filename. This is problematic for symlinks, where the contents of the symlink might be inconsistent with contents of the original file (for the same reason as in problem 1).
This patch ensures consistency by always stating/reading a file exactly once. The original contents are always cached and minimized contents are derived from that on demand. The cache entries are now indexed by their `UniqueID` ensuring consistency for symlinks too. Moreover, the stat/read syscalls are now issued outside of critical section.
Depends on D115935.
Reviewed By: dexonsmith
Differential Revision: https://reviews.llvm.org/D114966
|
 | clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp |
 | clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h |
 | clang/unittests/Tooling/DependencyScannerTest.cpp |
Commit
8cc2a137270462bc191377dbab97c739583814dd
by Jan Svoboda[clang][deps] Handle symlinks in minimizing FS
The minimizing and caching filesystem used by the dependency scanner can be configured to **not** minimize some files. That's necessary when scanning a TU with prebuilt inputs (i.e. PCH) that refer to the original (non-minimized) files. Minimizing such files in the dependency scanner would cause discrepancy between the current perceived state of the filesystem and the file sizes stored in the AST file. By not minimizing such files, we avoid creating the discrepancy.
The problem with the current approach is that files that should not be minimized are identified by their path. This breaks down when the prebuilt input (PCH) and the current TU refer to the same file via different paths (i.e. symlinks). This patch switches from paths to `llvm::sys::fs::UniqueID` when identifying ignored files. This is consistent with how the rest of Clang treats files.
Depends on D114966.
Reviewed By: dexonsmith, arphaman
Differential Revision: https://reviews.llvm.org/D114971
|
 | clang/test/ClangScanDeps/modules-symlink.c |
 | clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp |
 | clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h |
Commit
68db0e25df4b1edaa2c6080eb88453ab01ea01d3
by clementval[flang] Update tco tool pipline and add translation to LLVM IR
tco is a tool to test the FIR to LLVM IR pipeline of the Flang compiler.
This patch update tco pipelines and adds the translation to LLVM IR.
A simple test is added to make sure the tool is working with a simple FIR program. More tests will be upstream in follow up patch from the fir-dev branch.
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: schweitz, mehdi_amini
Differential Revision: https://reviews.llvm.org/D117781
Co-authored-by: Eric Schweitz <eschweitz@nvidia.com> Co-authored-by: Jean Perier <jperier@nvidia.com> Co-authored-by: Andrzej Warzynski <andrzej.warzynski@arm.com>
|
 | flang/test/Fir/basic-program.fir |
 | flang/include/flang/Optimizer/CodeGen/CodeGen.h |
 | flang/lib/Optimizer/CodeGen/CodeGen.cpp |
 | flang/include/flang/Tools/CLOptions.inc |
 | flang/tools/tco/CMakeLists.txt |
 | flang/tools/tco/tco.cpp |
 | flang/include/flang/Optimizer/Support/InitFIR.h |
 | flang/lib/Optimizer/Support/InitFIR.cpp |
 | flang/lib/Optimizer/Support/CMakeLists.txt |
Commit
8ee135dcf8ff060656ad481c3e980fe8763576f5
by llvm-dev[X86] Remove `__builtin_ia32_pmax/min` intrinsics and use generic `__builtin_elementwise_max/min`
D111985 added the generic `__builtin_elementwise_max` and `__builtin_elementwise_min` intrinsics with the same integer behaviour as the SSE/AVX instructions
This patch removes the `__builtin_ia32_pmax/min` intrinsics and just uses `__builtin_elementwise_max/min` - the existing tests see no changes: ``` __m256i test_mm256_max_epu32(__m256i a, __m256i b) { // CHECK-LABEL: test_mm256_max_epu32 // CHECK: call <8 x i32> @llvm.umax.v8i32(<8 x i32> %{{.*}}, <8 x i32> %{{.*}}) return _mm256_max_epu32(a, b); } ``` This requires us to add a `__v64qs` explicitly signed char vector type (we already have `__v16qs` and `__v32qs`).
Sibling patch to D117791
Differential Revision: https://reviews.llvm.org/D117798
|
 | clang/lib/Headers/avx512fintrin.h |
 | clang/include/clang/Basic/BuiltinsX86.def |
 | clang/lib/CodeGen/CGBuiltin.cpp |
 | clang/lib/Headers/avx2intrin.h |
 | clang/lib/Headers/avx512bwintrin.h |
 | clang/lib/Headers/emmintrin.h |
 | clang/lib/Headers/smmintrin.h |
 | clang/test/CodeGen/builtins-x86.c |
 | clang/lib/Headers/avx512vlintrin.h |
Commit
3ef88b31843e040c95f23ff2c3c206f1fa399c05
by llvm-devRevert rG8ee135dcf8ff060656ad481c3e980fe8763576f5 "[X86] Remove `__builtin_ia32_pmax/min` intrinsics and use generic `__builtin_elementwise_max/min`"
Some build bots are referencing the `__builtin_ia32_pmax/min` intrinsics via alternative headers
|
 | clang/lib/Headers/avx512fintrin.h |
 | clang/lib/Headers/avx512bwintrin.h |
 | clang/lib/CodeGen/CGBuiltin.cpp |
 | clang/lib/Headers/avx2intrin.h |
 | clang/lib/Headers/smmintrin.h |
 | clang/lib/Headers/avx512vlintrin.h |
 | clang/lib/Headers/emmintrin.h |
 | clang/test/CodeGen/builtins-x86.c |
 | clang/include/clang/Basic/BuiltinsX86.def |
Commit
0abaf64580921e31983e355972b91c83fd7521f2
by llvm-devRevert rG4727d29d908f9dd608dd97a58c0af1ad579fd3ca "[X86] Remove __builtin_ia32_pabs intrinsics and use generic __builtin_elementwise_abs"
Some build bots are referencing the `__builtin_ia32_pabs` intrinsics via alternative headers
|
 | clang/lib/Headers/avx512bwintrin.h |
 | clang/lib/Headers/avx2intrin.h |
 | clang/lib/Headers/avx512vlintrin.h |
 | clang/test/CodeGen/builtins-x86.c |
 | clang/lib/CodeGen/CGBuiltin.cpp |
 | clang/lib/Headers/avx512fintrin.h |
 | clang/include/clang/Basic/BuiltinsX86.def |
 | clang/lib/Headers/tmmintrin.h |
Commit
75e164f61d391979b4829bf2746a5d74b94e95f2
by sguelton[llvm] Cleanup header dependencies in ADT and Support
The cleanup was manual, but assisted by "include-what-you-use". It consists in
1. Removing unused forward declaration. No impact expected. 2. Removing unused headers in .cpp files. No impact expected. 3. Removing unused headers in .h files. This removes implicit dependencies and is generally considered a good thing, but this may break downstream builds. I've updated llvm, clang, lld, lldb and mlir deps, and included a list of the modification in the second part of the commit. 4. Replacing header inclusion by forward declaration. This has the same impact as 3.
Notable changes:
- llvm/Support/TargetParser.h no longer includes llvm/Support/AArch64TargetParser.h nor llvm/Support/ARMTargetParser.h - llvm/Support/TypeSize.h no longer includes llvm/Support/WithColor.h - llvm/Support/YAMLTraits.h no longer includes llvm/Support/Regex.h - llvm/ADT/SmallVector.h no longer includes llvm/Support/MemAlloc.h nor llvm/Support/ErrorHandling.h
You may need to add some of these headers in your compilation units, if needs be.
As an hint to the impact of the cleanup, running
clang++ -E -Iinclude -I../llvm/include ../llvm/lib/Support/*.cpp -std=c++14 -fno-rtti -fno-exceptions | wc -l
before: 8000919 lines after: 7917500 lines
Reduced dependencies also helps incremental rebuilds and is more ccache friendly, something not shown by the above metric :-)
Discourse thread on the topic: https://llvm.discourse.group/t/include-what-you-use-include-cleanup/5831
|
 | llvm/include/llvm/Support/TrigramIndex.h |
 | lldb/source/Host/common/Socket.cpp |
 | llvm/lib/Support/VirtualFileSystem.cpp |
 | clang/lib/Driver/ToolChains/Arch/ARM.h |
 | llvm/include/llvm/ADT/Optional.h |
 | llvm/lib/Support/YAMLParser.cpp |
 | llvm/lib/Support/InitLLVM.cpp |
 | llvm/include/llvm/Support/FormatVariadic.h |
 | llvm/lib/Support/ToolOutputFile.cpp |
 | llvm/include/llvm/Support/Error.h |
 | llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp |
 | llvm/include/llvm/Support/ELFAttributeParser.h |
 | llvm/lib/Support/SpecialCaseList.cpp |
 | clang/lib/Driver/SanitizerArgs.cpp |
 | mlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp |
 | llvm/include/llvm/Support/TimeProfiler.h |
 | mlir/tools/mlir-tblgen/OpFormatGen.cpp |
 | llvm/lib/Object/Object.cpp |
 | mlir/lib/TableGen/Predicate.cpp |
 | clang/lib/Basic/Targets/AArch64.h |
 | llvm/lib/Support/TargetParser.cpp |
 | llvm/lib/Support/StringMap.cpp |
 | llvm/lib/Support/TypeSize.cpp |
 | llvm/lib/Support/FileOutputBuffer.cpp |
 | llvm/lib/Support/NativeFormatting.cpp |
 | llvm/include/llvm/ADT/SmallVector.h |
 | llvm/include/llvm/Support/Timer.h |
 | llvm/lib/Support/SmallVector.cpp |
 | llvm/unittests/Support/TargetParserTest.cpp |
 | llvm/include/llvm/Support/BinaryStreamWriter.h |
 | llvm/unittests/Support/raw_ostream_test.cpp |
 | llvm/include/llvm/Support/BlockFrequency.h |
 | llvm/lib/Support/X86TargetParser.cpp |
 | llvm/lib/Target/ARM/ARMTargetMachine.cpp |
 | clang/lib/Driver/ToolChains/Arch/AArch64.cpp |
 | clang/tools/libclang/BuildSystem.cpp |
 | llvm/lib/Support/MSP430AttributeParser.cpp |
 | clang/lib/Driver/ToolChains/Arch/ARM.cpp |
 | llvm/lib/Support/JSON.cpp |
 | llvm/include/llvm/Object/ELFObjectFile.h |
 | llvm/include/llvm/Support/BinaryStreamReader.h |
 | llvm/tools/llvm-reduce/llvm-reduce.cpp |
 | llvm/include/llvm/Support/RISCVISAInfo.h |
 | llvm/include/llvm/Support/ARMAttributeParser.h |
 | llvm/include/llvm/Support/ExtensibleRTTI.h |
 | llvm/lib/Support/Signposts.cpp |
 | llvm/include/llvm/Support/YAMLTraits.h |
 | mlir/lib/TableGen/Format.cpp |
 | llvm/include/llvm/Support/ItaniumManglingCanonicalizer.h |
 | llvm/lib/Target/ARM/ARMSubtarget.cpp |
 | llvm/lib/Support/MemoryBuffer.cpp |
 | llvm/lib/Support/TimeProfiler.cpp |
 | llvm/tools/llvm-modextract/llvm-modextract.cpp |
 | llvm/tools/llvm-diff/llvm-diff.cpp |
 | llvm/include/llvm/Support/FileUtilities.h |
 | llvm/lib/Support/Signals.cpp |
 | llvm/lib/Support/ARMWinEH.cpp |
 | llvm/lib/Support/ELFAttributeParser.cpp |
 | llvm/lib/Support/Triple.cpp |
 | llvm/lib/Support/raw_ostream.cpp |
 | llvm/include/llvm/Support/TypeSize.h |
 | llvm/lib/Support/PrettyStackTrace.cpp |
 | llvm/include/llvm/Support/BranchProbability.h |
 | llvm/lib/Support/ThreadPool.cpp |
 | llvm/tools/llvm-split/llvm-split.cpp |
 | clang/lib/Basic/Targets/ARM.h |
 | llvm/include/llvm/Support/AArch64TargetParser.h |
 | llvm/include/llvm/Support/Allocator.h |
 | llvm/include/llvm/Support/TargetParser.h |
 | llvm/lib/Debuginfod/Debuginfod.cpp |
 | llvm/lib/Support/GraphWriter.cpp |
 | llvm/lib/Support/ARMAttributeParser.cpp |
 | llvm/include/llvm/Support/FileCollector.h |
 | llvm/lib/Support/SymbolRemappingReader.cpp |
 | llvm/include/llvm/Support/GraphWriter.h |
 | llvm/lib/Support/APInt.cpp |
 | llvm/lib/Support/ScopedPrinter.cpp |
 | llvm/lib/Support/FileUtilities.cpp |
 | llvm/tools/llvm-lto/llvm-lto.cpp |
 | llvm/include/llvm/Support/ConvertUTF.h |
 | llvm/include/llvm/Support/SymbolRemappingReader.h |
 | llvm/lib/Support/DataExtractor.cpp |
 | llvm/tools/llvm-stress/llvm-stress.cpp |
 | llvm/include/llvm/MC/MCStreamer.h |
 | llvm/include/llvm/Support/BinaryStreamRef.h |
 | llvm/lib/Support/SmallPtrSet.cpp |
 | llvm/lib/Support/BlockFrequency.cpp |
 | llvm/lib/Support/DAGDeltaAlgorithm.cpp |
 | llvm/lib/Support/YAMLTraits.cpp |
 | llvm/lib/Target/AArch64/AArch64Subtarget.cpp |
Commit
2b8e4c6e5fbd5ec3bf7b75fd6b1e11d66fde78a9
by sgueltonAdd missing header in Support/ConvertUTF.h
|
 | llvm/include/llvm/Support/ConvertUTF.h |
Commit
38ac4093d9d2ae28d631ca1cc5802533989165c5
by archibald.elliott[NFCI][Support] Avoid ASSERT_/EXPECT_TRUE(A <op> B)
The error messages in tests are far better when a test fails if the test is written using ASSERT_/EXPECT_<operator>(A, B) rather than ASSERT_/EXPECT_TRUE(A <operator> B).
This commit updates all of llvm/unittests/Support to use these macros where possible.
This change has not been possible in: - llvm/unittests/Support/FSUniqueIDTest.cpp - due to not overloading operators beyond ==, != and <. - llvm/unittests/Support/BranchProbabilityTest.cpp - where the unchanged tests are of the operator overloads themselves.
There are other possibilities of this conversion not being valid, which have not applied in these tests, as they do not use NULL (they use nullptr), and they do not use const char* (they use std::string or StringRef).
Reviewed By: mubashar_
Differential Revision: https://reviews.llvm.org/D117319
|
 | llvm/unittests/Support/ErrorTest.cpp |
 | llvm/unittests/Support/IndexedAccessorTest.cpp |
 | llvm/unittests/Support/JSONTest.cpp |
 | llvm/unittests/Support/ProgramTest.cpp |
 | llvm/unittests/Support/CommandLineTest.cpp |
 | llvm/unittests/Support/TargetParserTest.cpp |
 | llvm/unittests/Support/Path.cpp |
 | llvm/unittests/Support/VirtualFileSystemTest.cpp |
 | llvm/unittests/Support/TarWriterTest.cpp |
 | llvm/unittests/Support/Casting.cpp |
 | llvm/unittests/Support/FSUniqueIDTest.cpp |
 | llvm/unittests/Support/YAMLParserTest.cpp |
 | llvm/unittests/Support/MemoryBufferTest.cpp |
 | llvm/unittests/Support/YAMLIOTest.cpp |
 | llvm/unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp |
 | llvm/unittests/Support/UnicodeTest.cpp |
 | llvm/unittests/Support/raw_ostream_test.cpp |
 | llvm/unittests/Support/TimerTest.cpp |
Commit
51c53a0791cd2794365cab9917922ce1e324b379
by sgueltonAdd apple-specific missing include
|
 | llvm/lib/Support/PrettyStackTrace.cpp |
Commit
2a9e33db4f0a558572309b29a7d247185b4c21d1
by sgueltonAdd ms-specific missing header in Support/InitLLVM.cpp
|
 | llvm/lib/Support/InitLLVM.cpp |
Commit
622354a522073b0a048a88c957b161fb376a40eb
by Jan Svoboda[llvm][ADT] Implement `BitVector::{pop_,}back`
LLVM Programmer’s Manual strongly discourages the use of `std::vector<bool>` and suggests `llvm::BitVector` as a possible replacement.
Currently, some users of `std::vector<bool>` cannot switch to `llvm::BitVector` because it doesn't implement the `pop_back()` and `back()` functions.
To enable easy transition of `std::vector<bool>` users, this patch implements `llvm::BitVector::pop_back()` and `llvm::BitVector::back()`.
Reviewed By: dexonsmith
Differential Revision: https://reviews.llvm.org/D117115
|
 | clang-tools-extra/clangd/SourceCode.cpp |
 | llvm/include/llvm/ADT/SmallBitVector.h |
 | llvm/include/llvm/ADT/BitVector.h |
 | clang/lib/Format/UnwrappedLineParser.cpp |
 | llvm/unittests/ADT/BitVectorTest.cpp |
 | clang-tools-extra/clang-tidy/readability/FunctionSizeCheck.cpp |
 | clang/lib/Format/UnwrappedLineParser.h |
 | llvm/lib/MC/MCParser/MasmParser.cpp |
Commit
7e3bcae5069fdb13ba6241b726d3a3912287784e
by sgueltonAdd apple-specific missing header in Support/GraphWriter.cpp
|
 | llvm/lib/Support/GraphWriter.cpp |
Commit
d5ae039ed7b84bf767d15417a3e9bf61f982257b
by kai.nacke[SystemZ] Properly register machine passes.
Registering the passes enables use of -stop-before=/-stop-after options.
Reviewed By: uweigand
Differential Revision: https://reviews.llvm.org/D117823
|
 | llvm/lib/Target/SystemZ/SystemZShortenInst.cpp |
 | llvm/lib/Target/SystemZ/SystemZCopyPhysRegs.cpp |
 | llvm/lib/Target/SystemZ/SystemZElimCompare.cpp |
 | llvm/lib/Target/SystemZ/SystemZLongBranch.cpp |
 | llvm/lib/Target/SystemZ/SystemZTDC.cpp |
 | llvm/lib/Target/SystemZ/SystemZ.h |
 | llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp |
 | llvm/lib/Target/SystemZ/SystemZLDCleanup.cpp |
 | llvm/lib/Target/SystemZ/SystemZPostRewrite.cpp |
Commit
e9211e03937751ab75bbb34e38acc330b85fb0d8
by sgueltonRemove dependency from raw_ostream on <chrono>
The tryLockFor method from raw_fd_sotreamis the sole user of that header, and it's not referenced in the mono repo. I still chose to keep it (may be useful for downstream user) but added a transient type that's forward declared to hold the duration parameter.
Notable changes:
- "llvm/Support/Duration.h" must be included in order to use tryLockFor. - "llvm/Support/raw_ostream.h" no longer includes <chrono>
This sole change has an interesting impact on the number of processed line, as measured by:
clang++ -E -Iinclude -I../llvm/include ../llvm/lib/Support/*.cpp -std=c++14 -fno-rtti -fno-exceptions | wc -l
before: 7917500 after: 7835142
Discourse thread on the topic: https://llvm.discourse.group/t/include-what-you-use-include-cleanup/5831
|
 | llvm/include/llvm/Debuginfod/HTTPClient.h |
 | llvm/include/llvm/Support/Duration.h |
 | lldb/tools/lldb-vscode/FifoFiles.h |
 | llvm/unittests/Support/Path.cpp |
 | llvm/include/llvm/Debuginfod/Debuginfod.h |
 | llvm/lib/Support/raw_ostream.cpp |
 | llvm/include/llvm/Support/raw_ostream.h |
Commit
ad43217a046634be24174299beec3a28018ec3c0
by caroline.concatto[InstCombine] Fold for masked gather when loading the same value each time.
This patch checks in the masked gather when the first operand value is a splat and the mask is all one, because the masked gather is reloading the same value each time. This patch replaces this pattern of masked gather by a scalar load of the value and splats it in a vector.
Differential Revision: https://reviews.llvm.org/D115726
|
 | llvm/test/Transforms/InstCombine/masked_intrinsics.ll |
 | llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp |
Commit
4d82ae67b20826d97471c1ea76e8db3b054398f9
by kristof.beylsAdd security group 2021 transparency report.
Differential Revision: https://reviews.llvm.org/D117872
|
 | llvm/docs/Security.rst |
 | llvm/docs/SecurityTransparencyReports.rst |
 | llvm/docs/Reference.rst |
Commit
b8102449a72c5144cb75cfca46e78b517d7f6606
by benny.kra[clang-tidy] Avoid binding nullptr to a reference
That's undefined behavior. Found by -fsanitize=null.
|
 | clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.cpp |
Commit
e5fd3a7df9170cc69c88881e06fbd33c9cbd633d
by thakisTry to unbreak build on Windows after e9211e03937
|
 | llvm/tools/llvm-readobj/COFFDumper.cpp |
Commit
8bc66189429919d86d3ff3b4b5a3f63cfa6c35ca
by sgueltonAdd missing llvm/support/Regex.h include in polly/lib/Analysis/ScopDetection.cpp
|
 | polly/lib/Analysis/ScopDetection.cpp |
Commit
3c9e3dada916f33e8a4c62629f1954a7a5cdbf71
by thakisTry to unbreak build on Windows more after e9211e03937
|
 | llvm/tools/llvm-readobj/XCOFFDumper.cpp |
Commit
9900acacfb3ff2bc5c957aeb84225c29aa1b74fc
by vyng[libcxx][doc][nfc] Fixed typo in doc
|
 | libcxx/docs/DesignDocs/UniquePtrTrivialAbi.rst |