summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-05-10Revert "[RISCV][InsertVSETVLI] Avoid VL toggles for extractelement patterns"Philip Reames
This reverts commit 657d20dc75252f0c8415ada5214affccc3c98efe. A correctness problem was reported against the review and the fix warrants re-review.
2023-05-10Reland [clang] Make predefined expressions string literals under -fms-extensionsArthur Eubanks
MSVC makes these string literals [1][2]. [1] https://godbolt.org/z/6vnTzbExx [2] https://learn.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=msvc-170 Fixes #114 Initial commit didn't check if there was a function name when stepping through expressions ignoring parens. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D146764
2023-05-10fix typos to cycle botsNico Weber
2023-05-10[clang][modules] Avoid unnecessary writes of .timestamp filesJan Svoboda
Clang currently updates the mtime of .timestamp files on each load of the corresponding .pcm file. This is not necessary. In a given build session, Clang only needs to write the .timestamp file once, when we first validate the input files. This patch makes it so that we only touch the .timestamp file when it's older than the build session, alleviating some filesystem contention in clang-scan-deps. Reviewed By: benlangmuir Differential Revision: https://reviews.llvm.org/D149802
2023-05-10[RISCV] Add support for V extenstion in SiFive7Michael Maitland
Add scheduling information for vector extension in SiFive7, while using new LMUL & SEW scheduling constructs. Differential Revision: https://reviews.llvm.org/D149495
2023-05-10libclang: add missing `struct` in the declarationSaleem Abdulrasool
When building with compilers that do not support the Blocks extension, we would fail to compile due to the missing type specifier on the `typedef`. This should repair those builds. Fixes: #62640
2023-05-10[libcxx] Fix pstl __init_ identifier after 9c4717aAaron Siddhartha Mondal
Reviewed By: ldionne, #libc Differential Revision: https://reviews.llvm.org/D150201
2023-05-10[RISCV] Remove redundant F and D extension implication from V. NFCCraig Topper
We recently added implications for F and D to Zve32f and Zve64d which V implies. So these have become redundant.
2023-05-10libclang: declare blocks interfaces alwaysSaleem Abdulrasool
The implementation of these methods is not reliant on the availability of the Blocks extension in the compiler. However, when building on Windows, the interface declaration is important for the attribution of the DLL storage. Without the attribution, the method implementation is built but not made available as part of the ABI. Use a check for the blocks extension to determine how method signature is viewed rather than controlling whether it is part of the interface.
2023-05-10Revert "[SCEV] Replace IsAvailableOnEntry with block disposition"Manoj Gupta
This reverts commit 103fc0f629aa6218783f65dff0197f257137cade. Causes a clang crash in ChromeOS builds. Testcase provided at D149344.
2023-05-10[SLP][NFC] Rename a couple of variables and replace an if-else with an std::minVasileios Porpodas
- Rename `LimitForRegisterSize` to `MaxVFOnly` to make the meaning of the limit less ambiguous - Rename `OpsWidth` to `ActualVF`, which makes it clear that this is the VF we are using for vectorization. - Replace the if-else code for the initialization of OpsWidth with an std::min. Differential Revision: https://reviews.llvm.org/D150241
2023-05-10[Object] Fix handling of Elf_Nhdr with sh_addralign=8Fangrui Song
The generic ABI says: > Padding is present, if necessary, to ensure 8 or 4-byte alignment for the next note entry (depending on whether the file is a 64-bit or 32-bit object). Such padding is not included in descsz. Our parsing code currently aligns n_namesz. Fix the bug by aligning the start offset of the descriptor instead. This issue has been benign because the primary uses of sh_addralign=8 notes are `.note.gnu.property`, where `sizeof(Elf_Nhdr) + sizeof("GNU") = 16` (already aligned by 8). In practice, many 64-bit systems incorrectly use sh_addralign=4 notes. We can use sh_addralign (= p_align) to decide the descriptor padding. Treat an alignment of 0 and 1 as 4. This approach matches modern GNU readelf (since 2018). We have a few tests incorrectly using sh_addralign=0. We may make our behavior stricter after fixing these tests. Linux kernel dumped core files use `p_align=0` notes, so we need to support the case for compatibility. Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D150022
2023-05-10[gn build] Port f041b3472a87LLVM GN Syncbot
2023-05-10[libc++][PSTL] Move the remaining configuration into __configNikolas Klauser
Reviewed By: ldionne, #libc Spies: sstefan1, jplehr, arichardson, libcxx-commits, miyuki Differential Revision: https://reviews.llvm.org/D150217
2023-05-10Revert "[lli] Honor -mtriple option in -jit-kind=orc mode."Nico Weber
This reverts commit 624dcd8d53c1ffe10fbc936b186a98ec7fa1c865. Breaks check-llvm on Windows, see https://reviews.llvm.org/D149996#4332381
2023-05-10AMDGPU: Factor out GFX9.4 common features into a feature setKonstantin Zhuravlyov
Differential Revision: https://reviews.llvm.org/D149985
2023-05-10AMDGPU: Add basic gfx942 targetKonstantin Zhuravlyov
Differential Revision: https://reviews.llvm.org/D149983
2023-05-10AMDGPU: Add basic gfx941 targetKonstantin Zhuravlyov
Differential Revision: https://reviews.llvm.org/D149982
2023-05-10[mlir][openacc] Cleanup acc.kernels from old data clause operandsValentin Clement
Remove old clause operands from acc.kernels operation since the new dataOperands is now in place. private and firstprivate will receive some redesign but are not part of the new dataOperands. Depends on D150224 Reviewed By: vzakhari Differential Revision: https://reviews.llvm.org/D150225
2023-05-10[mlir][openacc] Cleanup acc.serial from old data clause operandsValentin Clement
Remove old clause operands from acc.serial operation since the new dataOperands is now in place. private and firstprivate will receive some redesign but are not part of the new dataOperands. Depends on D150207 Reviewed By: vzakhari Differential Revision: https://reviews.llvm.org/D150224
2023-05-10[flang][openacc] Preserve user order for entry data operand on compute constructValentin Clement
The order of operand in clauses that are decomposed was not preserved. This patch change how operands are handled and preserve the user ordering for the entry data operation on the acc.parallel operation. Reviewed By: vzakhari Differential Revision: https://reviews.llvm.org/D150214
2023-05-10[mlir][openacc][NFC] Add missing check lines for acc.update testsValentin Clement
D149909 was missing the check lines in the ops.mlir lit test. Reviewed By: vzakhari Differential Revision: https://reviews.llvm.org/D150232
2023-05-10[flang][openacc] Preserve user order for entry data operand on data constructValentin Clement
The order of operand in clauses that are decomposed was not preserved. This patch change how operands are handled and preserve the user ordering for the entry data operation on the acc.data operation. Reviewed By: vzakhari Differential Revision: https://reviews.llvm.org/D150213
2023-05-10[RISCV] Enable signed truncation check transforms for i8Yingwei Zheng
This patch enables signed truncation check transforms for i8 on rv32 when XVT is i64 and Zbb is enabled. It is a small improvement of D149977. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D150177
2023-05-10Revert "[clang] [test] Narrow down MSVC specific behaviours from "any ↵Nico Weber
windows" to only MSVC/clang-cl" This reverts commit 7f037e5645bd62fca6fc7c3e77962aafe2bc8b27. Breaks tests, see https://reviews.llvm.org/D149997#4331937
2023-05-10Add support of the next Ubuntu (Ubuntu 23.10 - Mantic Minotaur)Sylvestre Ledru
2023-05-10Adopt Properties to store operations inherent Attributes in the Quant dialectMehdi Amini
This is part of an on-going migration to adopt Properties inside MLIR. Differential Revision: https://reviews.llvm.org/D148900
2023-05-10Adopt Properties to store operations inherent Attributes in the PDLInterp ↵Mehdi Amini
dialect This is part of an on-going migration to adopt Properties inside MLIR. Differential Revision: https://reviews.llvm.org/D148899
2023-05-10Adopt Properties to store operations inherent Attributes in the PDL dialectMehdi Amini
This is part of an on-going migration to adopt Properties inside MLIR. Differential Revision: https://reviews.llvm.org/D148898
2023-05-10Adopt Properties to store operations inherent Attributes in the OpenMP dialectMehdi Amini
This is part of an on-going migration to adopt Properties inside MLIR. Differential Revision: https://reviews.llvm.org/D148897
2023-05-10Adopt Properties to store operations inherent Attributes in the OpenACC dialectMehdi Amini
This is part of an on-going migration to adopt Properties inside MLIR. Differential Revision: https://reviews.llvm.org/D148896
2023-05-10clang-format: [JS] support import/export typeJan Kuhle
Contributed by @jankuehle! Users can choose to only import/export the type of the symbol (not value nor namespace) by adding a `type` keyword, e.g.: ``` import type {x} from 'y'; import {type x} from 'y'; export type {x}; export {type x}; ``` Previously, this was not handled and would: - Terminate import sorting - Remove the space before the curly bracket in `export type {` With this change, both formatting and import sorting work as expected. Reviewed By: MyDeveloperDay, krasimir Differential Revision: https://reviews.llvm.org/D150116
2023-05-10Revert "[SimpleLoopUnswitch] unswitch selects"Benjamin Kramer
This reverts commit 21f226fc4591db6e98faf380137a42067c909582. Crashes on this test case: define void @test2() nounwind { entry: br label %bb.nph bb.nph: ; preds = %entry %and.i13521 = and <4 x i1> undef, undef br label %for.body for.body: ; preds = %for.body, %bb.nph %or.i = select <4 x i1> %and.i13521, <4 x i32> undef, <4 x i32> undef br i1 false, label %for.body, label %for.end for.end: ; preds = %for.body, %entry ret void }
2023-05-10[AArch64] Emit FNMADD instead of FNEG(FMADD)Matt Devereau
Emit FNMADD instead of FNEG(FMADD) for optimization levels above Oz when fast-math flags (nsz+contract) permit it. Differential Revision: https://reviews.llvm.org/D149260
2023-05-10Add -no-canonical-prefixes to test that matches the binary nameBenjamin Kramer
2023-05-10[MLIR][LLVM] Support inlining of LLVM atomic operations.Johannes de Fine Licht
These don't require any special handling, apart checking for unsupported metadata, which is already implemented. Reviewed By: gysit Differential Revision: https://reviews.llvm.org/D150255
2023-05-10[tidy] Expose getID to tidy checksKadir Cetinkaya
This also fixes a possible use-after-free in the IdentifierNamingCheck. Differential Revision: https://reviews.llvm.org/D150254
2023-05-10Reapply "[SystemZ] Bugfix in expansion of memmem operations."Jonas Paulsson
The new test case showed that the NoPHIs flag needs to be cleared. Original commit message: [SystemZ] Bugfix in expansion of memmem operations. Since NC, OC, and XC clobber CC, the EXRL_Pseudo targeting these must also be marked to do so. Original patch by uweigand. Reviewed by: uweigand Differential Revision: https://reviews.llvm.org/D150251 Fixes: https://github.com/llvm/llvm-project/issues/62572
2023-05-10[gn build] Port 62a090f958ceLLVM GN Syncbot
2023-05-10[clangd] Initialize clang-tidy modules only onceKadir Cetinkaya
This is showing up on our profiles with ~100ms contribution @95th% for buildAST latencies. The patch is unlikely to address it all, but should help with some low-hanging fruit. Differential Revision: https://reviews.llvm.org/D150257
2023-05-10[lldb][NFCI] Remove n^2 loops and simplify iterator usageFelipe de Azevedo Piovezan
The code inside Broadcaster makes usage of iterators using olden C++ coding style. Hidden in this old style is a couple of N^2 loops: we iterate over a map (sequentially), removing the first element that matches some predicate. The search is _always_ done from the start of the map, which implies that, if the map has N elements and if all matches happen on the second half of the map, then we visit the first N/2 elements exactly N/2 * N/2 times. Ideally some of the code here would benefit from `std::map`s own "erase_if", but this is only available with C++20: https://en.cppreference.com/w/cpp/container/map/erase_if We spent quite some time trying to make these loops more elegant, but it is surprisingly tricky to do so. Differential Revision: https://reviews.llvm.org/D150219
2023-05-10[NFC] [C++20] [Modules] Code cleanups when checking modules in ADLChuanqi Xu
The original code uses getTopLevelModuleName to compare if the module matches. This is an overkill. Since in one program there will only be at most one module name. So it is good enough to compare the module directly. So that we can save some string comparisons.
2023-05-10[C++20] [Modules] Don't generate unused variables in other module unitsChuanqi Xu
even if its initializer has side effects Close https://github.com/llvm/llvm-project/issues/61892 The variables whose initializer has side effects will be emitted even if it is not used. But it shouldn't be true after we introduced modules. The variables in other modules shouldn't be emitted if it is not used even if its initializer has size effects. Also this patch rename `Decl::isInCurrentModuleUnit` to `Decl::isInAnotherModuleUnit` to make it closer to the semantics.
2023-05-10[AMDGPU][MC] Clean up DPP bound_ctrl handlingDiana Picus
At the moment, we set the BC bit in DPP for both bound_ctrl:0 and bound_ctrl:1, for compatibility with sp3 (see PR35397). However, this hack is only needed for GFX8. For newer GFXs, sp3 behaves as expected, i.e. it sets the bit when bound_ctrl:1 and clears it when bound_ctrl:0. This patch updates LLVM to do the same for GFX11 or newer. We preserve the current behaviour for GFX9 and 10 so we don't break any existing code. Differential Revision: https://reviews.llvm.org/D149254
2023-05-10Revert "[SystemZ] Bugfix in expansion of memmem operations."Jonas Paulsson
Sorry - mir test fails with expensive checks on build bot. Seems to relate to the fact that there are no PHIs in the .mir input, but after they are created the verifyer reports "Found PHI instruction with NoPHIs property set". This reverts commit 00454a17f361d677d5423905c888daca1a80661a.
2023-05-10[SystemZ] Bugfix in expansion of memmem operations.Jonas Paulsson
Since NC, OC, and XC clobber CC, the EXRL_Pseudo targeting these must also be marked to do so. Original patch by uweigand. Reviewed by: uweigand Differential Revision: https://reviews.llvm.org/D150251 Fixes: https://github.com/llvm/llvm-project/issues/62572
2023-05-10[libc] Add optimized memcpy for RISCVGuillaume Chatelet
This patch adds two versions of memcpy optimized for architectures where unaligned accesses are either illegal or extremely slow. It is currently enabled for RISCV 64 and RISCV 32 but it could be used for ARM 32 architectures as well. Here is the before / after output of `libc.benchmarks.memory_functions.opt_host --benchmark_filter=BM_Memcpy` on a quad core Linux starfive RISCV 64 board running at 1.5GHz. Before: ``` Run on (4 X 1500 MHz CPU s) CPU Caches: L1 Instruction 32 KiB (x4) L1 Data 32 KiB (x4) L2 Unified 2048 KiB (x1) ------------------------------------------------------------------------ Benchmark Time CPU Iterations UserCounters... ------------------------------------------------------------------------ BM_Memcpy/0/0 474 ns 474 ns 1483776 bytes_per_cycle=0.243492/s bytes_per_second=348.318M/s items_per_second=2.11097M/s __llvm_libc::memcpy,memcpy Google A BM_Memcpy/1/0 210 ns 209 ns 3649536 bytes_per_cycle=0.233819/s bytes_per_second=334.481M/s items_per_second=4.77519M/s __llvm_libc::memcpy,memcpy Google B BM_Memcpy/2/0 1814 ns 1814 ns 396288 bytes_per_cycle=0.247899/s bytes_per_second=354.622M/s items_per_second=551.402k/s __llvm_libc::memcpy,memcpy Google D BM_Memcpy/3/0 89.3 ns 89.2 ns 7459840 bytes_per_cycle=0.217415/s bytes_per_second=311.014M/s items_per_second=11.2071M/s __llvm_libc::memcpy,memcpy Google L BM_Memcpy/4/0 134 ns 134 ns 3815424 bytes_per_cycle=0.226584/s bytes_per_second=324.131M/s items_per_second=7.44567M/s __llvm_libc::memcpy,memcpy Google M BM_Memcpy/5/0 52.8 ns 52.6 ns 11001856 bytes_per_cycle=0.194893/s bytes_per_second=278.797M/s items_per_second=19.0284M/s __llvm_libc::memcpy,memcpy Google Q BM_Memcpy/6/0 180 ns 180 ns 4101120 bytes_per_cycle=0.231884/s bytes_per_second=331.713M/s items_per_second=5.55957M/s __llvm_libc::memcpy,memcpy Google S BM_Memcpy/7/0 195 ns 195 ns 3906560 bytes_per_cycle=0.232951/s bytes_per_second=333.239M/s items_per_second=5.1217M/s __llvm_libc::memcpy,memcpy Google U BM_Memcpy/8/0 152 ns 152 ns 4789248 bytes_per_cycle=0.227507/s bytes_per_second=325.452M/s items_per_second=6.58187M/s __llvm_libc::memcpy,memcpy Google W BM_Memcpy/9/0 6036 ns 6033 ns 118784 bytes_per_cycle=0.249158/s bytes_per_second=356.423M/s items_per_second=165.75k/s __llvm_libc::memcpy,uniform 384 to 4096 ``` After: ``` BM_Memcpy/0/0 126 ns 126 ns 5770240 bytes_per_cycle=1.04707/s bytes_per_second=1.46273G/s items_per_second=7.9385M/s __llvm_libc::memcpy,memcpy Google A BM_Memcpy/1/0 75.1 ns 75.0 ns 10204160 bytes_per_cycle=0.691143/s bytes_per_second=988.687M/s items_per_second=13.3289M/s __llvm_libc::memcpy,memcpy Google B BM_Memcpy/2/0 333 ns 333 ns 2174976 bytes_per_cycle=1.39297/s bytes_per_second=1.94596G/s items_per_second=3.00002M/s __llvm_libc::memcpy,memcpy Google D BM_Memcpy/3/0 49.6 ns 49.5 ns 16092160 bytes_per_cycle=0.710161/s bytes_per_second=1015.89M/s items_per_second=20.1844M/s __llvm_libc::memcpy,memcpy Google L BM_Memcpy/4/0 57.7 ns 57.7 ns 11213824 bytes_per_cycle=0.561557/s bytes_per_second=803.314M/s items_per_second=17.3228M/s __llvm_libc::memcpy,memcpy Google M BM_Memcpy/5/0 48.0 ns 47.9 ns 16437248 bytes_per_cycle=0.346708/s bytes_per_second=495.97M/s items_per_second=20.8571M/s __llvm_libc::memcpy,memcpy Google Q BM_Memcpy/6/0 67.5 ns 67.5 ns 10616832 bytes_per_cycle=0.614173/s bytes_per_second=878.582M/s items_per_second=14.8142M/s __llvm_libc::memcpy,memcpy Google S BM_Memcpy/7/0 84.7 ns 84.6 ns 10480640 bytes_per_cycle=0.819077/s bytes_per_second=1.14424G/s items_per_second=11.8174M/s __llvm_libc::memcpy,memcpy Google U BM_Memcpy/8/0 61.7 ns 61.6 ns 11191296 bytes_per_cycle=0.550078/s bytes_per_second=786.893M/s items_per_second=16.2279M/s __llvm_libc::memcpy,memcpy Google W BM_Memcpy/9/0 981 ns 981 ns 703488 bytes_per_cycle=1.52333/s bytes_per_second=2.12807G/s items_per_second=1019.81k/s __llvm_libc::memcpy,uniform 384 to 4096 ``` It is not as good as glibc for now so there's room for improvement. I suspect a path pumping 16 bytes at once given the doubled numbers for large copies. ``` BM_Memcpy/0/1 146 ns 82.5 ns 8576000 bytes_per_cycle=1.35236/s bytes_per_second=1.88922G/s items_per_second=12.1169M/s glibc memcpy,memcpy Google A BM_Memcpy/1/1 112 ns 63.7 ns 10634240 bytes_per_cycle=0.628018/s bytes_per_second=898.387M/s items_per_second=15.702M/s glibc memcpy,memcpy Google B BM_Memcpy/2/1 315 ns 180 ns 4079616 bytes_per_cycle=2.65229/s bytes_per_second=3.7052G/s items_per_second=5.54764M/s glibc memcpy,memcpy Google D BM_Memcpy/3/1 85.3 ns 43.1 ns 15854592 bytes_per_cycle=0.774164/s bytes_per_second=1107.45M/s items_per_second=23.2249M/s glibc memcpy,memcpy Google L BM_Memcpy/4/1 105 ns 54.3 ns 13427712 bytes_per_cycle=0.7793/s bytes_per_second=1114.8M/s items_per_second=18.4109M/s glibc memcpy,memcpy Google M BM_Memcpy/5/1 77.1 ns 43.2 ns 16476160 bytes_per_cycle=0.279808/s bytes_per_second=400.269M/s items_per_second=23.1428M/s glibc memcpy,memcpy Google Q BM_Memcpy/6/1 112 ns 62.7 ns 11236352 bytes_per_cycle=0.676078/s bytes_per_second=967.137M/s items_per_second=15.9387M/s glibc memcpy,memcpy Google S BM_Memcpy/7/1 131 ns 65.5 ns 11751424 bytes_per_cycle=0.965616/s bytes_per_second=1.34895G/s items_per_second=15.2762M/s glibc memcpy,memcpy Google U BM_Memcpy/8/1 104 ns 55.0 ns 12314624 bytes_per_cycle=0.583336/s bytes_per_second=834.468M/s items_per_second=18.1937M/s glibc memcpy,memcpy Google W BM_Memcpy/9/1 932 ns 466 ns 1480704 bytes_per_cycle=3.17342/s bytes_per_second=4.43321G/s items_per_second=2.14679M/s glibc memcpy,uniform 384 to 4096 ``` Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D150202
2023-05-10[NFC] [C++20] [Modules] Refactor Sema::isModuleUnitOfCurrentTU intoChuanqi Xu
Decl::isInCurrentModuleUnit Refactor `Sema::isModuleUnitOfCurrentTU` to `Decl::isInCurrentModuleUnit` to make code simpler a little bit. Note that although this patch introduces a FIXME, this is an existing issue and this patch just tries to describe it explicitly.
2023-05-10Reland "[PowerPC] Add target feature requirement to builtins"Qiu Chaofan
This relands D143467 after fixing build failure with GCC.
2023-05-10[SimpleLoopUnswitch] unswitch selectsJoshua Cao
The old LoopUnswitch pass unswitched selects, but the changes were never ported to the new SimpleLoopUnswitch. We unswitch by turning: ``` S = select %cond, %a, %b ``` into: ``` head: br %cond, label %then, label %tail then: br label %tail tail: S = phi [ %a, %then ], [ %b, %head ] ``` Unswitch selects are always nontrivial, since the successors do not exit the loop and the loop body always needs to be cloned. Unswitch selects always need to freeze the conditional if the conditional could be poison or undef. Selects don't propagate poison/undef, and branches on poison/undef causes UB. Reviewed By: nikic, kachkov98, vitalybuka Differential Revision: https://reviews.llvm.org/D138526