- Feb 24, 2023
-
-
Mehdi Amini authored
-
Fangrui Song authored
Conflicting module flags leads to a proper error for regular LTO but a crash (report_fatal_error) for ThinLTO. Switch to createStringError to fix the crash and match regular LTO.
-
Chia-hung Duan authored
It is preferable to use `std::shared_mutex` style mutex. Will switch to using it when it's available. Differential Revision: https://reviews.llvm.org/D144691
-
Ben Shi authored
This is in accordance with avr-gcc, even '-mno-relax' is specified to avr-gcc, this flag will also be added to the output relocatables. With this flag set, the GNU ld will perform long call -> short call optimization for AVR, otherwise not. Fixes https://github.com/llvm/llvm-project/issues/54508 Reviewed By: MaskRay, jacquesguan, aykevl Differential Revision: https://reviews.llvm.org/D144617
-
Siva Chandra Reddy authored
Reviewed By: jhuber6 Differential Revision: https://reviews.llvm.org/D143139
-
Michael Liao authored
- The current implementation checks them for 24-bit inegers but the document says 23-bit one effectively by listing the range as [1,2^23). - Minor error message correction. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D144685
-
Siva Chandra Reddy authored
The target "check-libc" now runs all enabled tests which, depending on the build mode, includes the unit tests, the integration tests and the api test. Reviewed By: jhuber6 Differential Revision: https://reviews.llvm.org/D144663
-
Julian Lettner authored
This reverts commit ebd8eee6.
-
Noah Goldstein authored
There are extra patterns that have for these three logic operations that aren't covered in `SimplifyDemandedUseBits`. To avoid duplicating the code, just use `analyzeKnownBitsFromAndXorOr` in `SimplifyDemandedUseBits` to get full coverage. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D142429
-
Noah Goldstein authored
Any case of logicop + add/sub(Odd) we can prove the low bit is either zero/non-zero. Alive2 Links: xor: sub x, C: https://alive2.llvm.org/ce/z/aaABdS sub C, x: https://alive2.llvm.org/ce/z/2W-ZJ7 add C, x: https://alive2.llvm.org/ce/z/pzDkte or: sub x, C: https://alive2.llvm.org/ce/z/xd-bcP sub C, x: https://alive2.llvm.org/ce/z/p8hXJF add C, x: https://alive2.llvm.org/ce/z/osmkB6 and: sub x, C: https://alive2.llvm.org/ce/z/D_NNxR sub C, x: https://alive2.llvm.org/ce/z/N_5C62 add C, x: https://alive2.llvm.org/ce/z/4cy7a4 Differential Revision: https://reviews.llvm.org/D142427 -
Noah Goldstein authored
This change just factors out the existing logic for and/xor/or and puts them in a publicly available helper. functionality is the same. Differential Revision: https://reviews.llvm.org/D142849
-
Noah Goldstein authored
Differential Revision: https://reviews.llvm.org/D142426
-
Min-Yih Hsu authored
Using d0 for exception pointer and d1 for selector, as suggested by GCC.
-
Kadir Cetinkaya authored
This reverts commit 7c9b15fb. Breakage was in downstream code.
-
Shilei Tian authored
This patch fixes the wrong use of `fopen`. Fix https://github.com/llvm/llvm-project/issues/60934 Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D144601
-
Qiongsi Wu authored
`instrprof` currently does not set `__llvm_prf_vnds`'s alignment after creating it. The consequence is that the alignment is set to 16 later (https://github.com/llvm/llvm-project/blob/c0f3ac1d0015fd051144a987ff500b888a32be86/llvm/lib/IR/DataLayout.cpp#L1019). This can lead to undefined behaviour when we calculate `NumVNodes` in `lprofGetLoadModuleSignature` (https://github.com/llvm/llvm-project/blob/c0f3ac1d0015fd051144a987ff500b888a32be86/compiler-rt/lib/profile/InstrProfilingMerge.c#L32). The reason is that when the `__llvm_prf_vnds` array is 16 byte aligned, `__llvm_profile_end_vnodes() - __llvm_profile_begin_vnodes()` may not be a multiple of the size of ValueProfNode (which is 24, 20 on 32 bit targets). This patch sets `__llvm_prf_vnds`'s alignment to its ABI alignment, which always divides its size. Then `__llvm_profile_end_vnodes() - __llvm_profile_begin_vnodes()` will be a multiple of `sizeof(ValueProfNode)`. Reviewed By: w2yehia, MaskRay Differential Revision: https://reviews.llvm.org/D144302
-
Alex Lorenz authored
This fixes the llvm docs build bot.
-
Markus Böck authored
-
Manolis Tsamis authored
The vendor-defined XTHeadFMemIdx (no comparable standard extension exists at the time of writing) extension adds indexed load/store instructions for floating-point registers. It is supported by the C9xx cores (e.g., found in the wild in the Allwinner D1) by Alibaba T-Head. The current (as of this commit) public documentation for this extension is available at: https://github.com/T-head-Semi/thead-extension-spec/releases/download/2.2.2/xthead-2023-01-30-2.2.2.pdf Support for these instructions has already landed in GNU Binutils: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=f511f80fa3fcaf6bcbe727fb902b8bd5ec8f9c20 Depends on D144249 Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D144647
-
Chia-hung Duan authored
When all the blocks in the group are known to be used, we should just mark the pages in the range as all counted instead of visiting each of them. This will reduce the time of marking free blocks especially for smaller size class. Reviewed By: cferris Differential Revision: https://reviews.llvm.org/D141958
-
Caroline Tice authored
This reverts commit cbcb3eef. Causing many clangd test breakages, similar to: error: no matching constructor for initialization of 'llvm::SmallVector<clang::tooling::stdlib::Header>' : llvm::SmallVector<clang::tooling::stdlib::Header>( ^
-
Manolis Tsamis authored
The vendor-defined XTHeadMemIdx (no comparable standard extension exists at the time of writing) extension adds indexed load/store instructions as well as load/store and update register instructions. It is supported by the C9xx cores (e.g., found in the wild in the Allwinner D1) by Alibaba T-Head. The current (as of this commit) public documentation for this extension is available at: https://github.com/T-head-Semi/thead-extension-spec/releases/download/2.2.2/xthead-2023-01-30-2.2.2.pdf Support for these instructions has already landed in GNU Binutils: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=27cfd142d0a7e378d19aa9a1278e2137f849b71b Depends on D144002 Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D144249
-
Ben Shi authored
Reviewed By: MaskRay, aykevl Fixes https://github.com/llvm/llvm-project/issues/54508 Differential Revision: https://reviews.llvm.org/D144620
-
Leonard Chan authored
This way, C++ relative-vtables can also participate in GlobalDCE. This depends on some TypeMetadataUtils.cpp bits in D134320, but that dependency can be removed and included here if necessary. Differential Revision: https://reviews.llvm.org/D135928
-
Fangrui Song authored
D33259 switched the default linker to ld.lld which supports LLVM LTO. We can support LTO compile/link in one command and drop the `unable to pass LLVM bit-code files to linker` error. Fix https://github.com/llvm/llvm-project/issues/52807
-
Ziqing Luo authored
Let generate fix-its to make assignments' left-hand side of the form `dre[e]` safe if `e` is known to be non-negative. Commit on behalf of jkorous (Jan Korous) Reviewed by: NoQ (Artem Dergachev) Differential revision: https://reviews.llvm.org/D142794
-
Alex Lorenz authored
Allow the user to specify a concrete USR in the external_source_symbol attribute. That will let Clang's indexer to use Swift USRs for Swift declarations that are represented with C++ declarations. This new clause is used by Swift when generating a C++ header representation of a Swift module: https://github.com/apple/swift/pull/63002 Differential Revision: https://reviews.llvm.org/D141324
-
Krzysztof Drewniak authored
Some calls to GEPOperator::accumulateConstantOffset(APInt) passed the pointer bitwidth as the width of the APInt, while the function asserts that the width of its argument is equal to the index width of the GEP pointer input. These values are almost always the same, so mixing up which call to use doesn't usually cause issues. However, when dealing with data layouts where these values are different, the passes tested here can crash. This will be fixed in D143437 . Differential Revision: https://reviews.llvm.org/D144673
-
Ziqing Luo authored
`-Wunsafe-buffer-usage` diagnostics shall not emit fix-its if fix-its are globally disabled. Commit on behalf of jkorous (Jan Korous) Reviewed by: NoQ (Artem Dergachev) Differential revision: https://reviews.llvm.org/D143697
-
Quentin Colombet authored
This patch adds patterns to convert `linalg.conv_2d_xxx` operations into `linalg.generic` (for img2col packing) and `linalg.matmul`. The meat of the patch comes straight from IREE (https://github.com/iree-org/iree). (To the original authors are you okay with that?) What this patch adds is proper plumbing of the im2col patterns into the transform dialect. PS: Feel free to add more reviewers. I wanted to cover the original contributors of im2col in IREE but I'm not sure I got all of them. Reviewed By: nicolasvasilache, ThomasRaoux Differential Revision: https://reviews.llvm.org/D144108
-
Leonard Chan authored
Prior to this patch, WPD was not acting on relative-vtables in C++. This involves teaching WPD about these things: - llvm.load.relative which is how relative-vtables are indexed (instead of GEP) - dso_local_equivalent which is used in the vtable itself when taking the offset between a virtual function and vtable - Update llvm/test/ThinLTO/X86/devirt.ll to use opaque pointers and add equivalent tests for RV Differential Revision: https://reviews.llvm.org/D134320
-
Leonard Chan authored
This should fix builders like https://lab.llvm.org/buildbot/#/builders/139/builds/36522
-
Leonard Chan authored
This introduces R_RISCV_PLT32, a PC-relative data relocation that takes the 32-bit relative offset to a function or its PLT entry. This is needed to support relative vtables on RISCV. Github PR: https://github.com/riscv-non-isa/riscv-elf-psabi-doc/pull/363 D143226 has the llvm parts. Differential Revision: https://reviews.llvm.org/D143115
-
Teresa Johnson authored
Follow on to D144209 to support single implementation devirtualization for Regular LTO when the vtable holds a function alias. For now I have prevented other optimizations performed in regular LTO that need to analyze the contents of the function target when the vtable holds an alias, as I'm not sure they are always correct to perform in that case. Differential Revision: https://reviews.llvm.org/D144270
-
Kirill Stoimenov authored
Reviewed By: hctim Differential Revision: https://reviews.llvm.org/D144669
-
Nikolas Klauser authored
It's not pretty, but it makes the test run a lot faster. Reviewed By: #libc, philnik Spies: DavidSpickett, libcxx-commits Differential Revision: https://reviews.llvm.org/D144640
-
Sanjay Patel authored
issue #60906
-
Jez Ng authored
Reviewed By: serge-sans-paille Differential Revision: https://reviews.llvm.org/D144662
-
Björn Svensson authored
Remove mention of a variable that is not used in the example for checker: cppcoreguidelines-avoid-non-const-global-variables Differential Revision: https://reviews.llvm.org/D143996
-
Leonard Chan authored
Passes in general shouldn't replace an alias with the aliasee (see https://reviews.llvm.org/D66606). This can lead to situations where a linkonce_odr symbol (which could be interposable if lowered to weak linkage) can be replaced with a local aliasee which won't be interposable. SVEC does this when the function is invoked by FunctionPass Manager -> Loop Pass Manager -> Induction Variable Users in the codegen pipeline. This was found in hwasan instrumented code where a linonce_odr alias was replaced with its private aliasee. This fixes the bug descriped at https://github.com/llvm/llvm-project/issues/60668. Differential Revision: https://reviews.llvm.org/D144035
-