- Nov 01, 2023
-
-
Sander de Smalen authored
We made the assumption that the registers were always physical registers, which doesn't have to be true.
-
Nikita Popov authored
We're working on a ConstantInt here, so constant folding will always succeed. Just avoid using the ConstantExpr API.
-
Michael Buch authored
Replaces the old idiom (of swapping the container to shrink it) with the newer STL alternative. Similar transition in LLDB was done in: https://reviews.llvm.org/D47492
-
Mitch Phillips authored
Looks like there's code out there that, instead of using '__attribute__((constructor(x)))' to add constructor functions, they just declare a global function pointer and use '__attribute__((section('.ctors')))' instead. Problem is, with memtag-globals, we pad the global function pointer to be 16 bytes large. This of course means we have an 8-byte real function pointer, then 8 bytes of zero padding, and this trips up the loader when it processes this section. Fixes #69939 -
Nikita Popov authored
Use IRBuilder or ConstantFolding instead.
-
David Spickett authored
SME2 is documented as part of the main SME supplement: https://developer.arm.com/documentation/ddi0616/latest/ The one change for debug is this new ZT0 register. This register contains data to be used with new table lookup instructions. It's size is always 512 bits (not scalable) and can be interpreted in many different ways depending on the instructions that use it. The kernel has implemented this as a new register set containing this single register. It always returns register data (with no header, unlike ZA which does have a header). https://docs.kernel.org/arch/arm64/sme.html ZT0 is only active when ZA is active (when SVCR.ZA is 1). In the inactive state the kernel returns 0s for its contents. Therefore lldb doesn't need to create 0s like it does for ZA. However, we will skip restoring the value of ZT0 if we know that ZA is inactive. As writing to an inactive ZT0 sets SVCR.ZA to 1, which is not desireable as it would activate ZA also. Whether SVCR.ZA is set will be determined only by the ZA data we restore. Due to this, I've added a new save/restore kind SME2. This is easier than accounting for the variable length ZA in the SME data. We'll only save an SME2 data block if ZA is active. If it's not we can get fresh 0s back from the kernel for ZT0 anyway so there's nothing for us to restore. This new register will only show up if the system has SME2 therefore the SME set presented to the user may change, and I've had to account for that in in a few places. I've referred to it internally as simply "ZT" as the kernel does in NT_ARM_ZT, but the architecture refers to the specific register as "ZT0" so that's what you'll see in lldb. ``` (lldb) register read -s 6 Scalable Matrix Extension Registers: svcr = 0x0000000000000000 svg = 0x0000000000000004 za = {0x00 <...> 0x00} zt0 = {0x00 <...> 0x00} ```
-
Vlad Serebrennikov authored
This patch moves `ObjCMethodDecl::ImplementationControl` to a DeclBase.h so that it's complete at the point where corresponsing bit-field is declared. This patch also converts it to a scoped enum `clang::ObjCImplementationControl`.
-
Simon Pilgrim authored
truncateVectorWithPACK handling of sub-128-bit result types was improved some time ago, so remove the old 64-bit limit Fixes #68466
-
Exile authored
[clang][ASTImporter] Fix crash when template class static member imported to other translation unit. (#68774) Fixes: #68769 Co-authored-by:miaozhiyuan <miaozhiyuan@feysh.com>
-
Nikita Popov authored
Use ConstantFoldIntegerCast() instead, to remove the reliance on constant expressions.
-
Nikita Popov authored
This always works on a constant integer or integer splat, so the constant fold here should always succeed.
-
Nikita Popov authored
This is intended as the replacement for ConstantExpr::getIntegerCast(), which does not require availability of the corresponding constant expressions. It just forwards to ConstantFoldCastOperand with the correct opcode.
-
Simon Pilgrim authored
-
Simon Pilgrim authored
Adds additional test coverage for Issue #68466
-
Kai Sasaki authored
Progressive support of fastmath flag in the conversion of log type ops. See more detail https://discourse.llvm.org/t/rfc-fastmath-flags-support-in-complex-dialect/71981
-
Ramkumar Ramachandra authored
This reverts commit 5bfd89bd. It was causing build failures on ffmpeg on i686.
-
Ella Ma authored
[analyzer] Fix uninitialized base class with initializer list when ctor is not declared in the base class Fixes #70464 When ctor is not declared in the base class, initializing the base class with the initializer list will not trigger a proper assignment of the base region, as a CXXConstructExpr doing that is not available in the AST. This patch checks whether the init expr is an InitListExpr under a base initializer, and adds a binding if so.
-
Nikita Popov authored
This adds a writable attribute, which in conjunction with dereferenceable(N) states that a spurious store of N bytes is introduced on function entry. This implies that this many bytes are writable without trapping or introducing data races. See https://llvm.org/docs/Atomics.html#optimization-outside-atomic for why the second point is important. This attribute can be added to sret arguments. I believe Rust will also be able to use it for by-value (moved) arguments. Rust likely won't be able to use it for &mut arguments (tree borrows does not appear to allow spurious stores). In this patch the new attribute is only used by LICM scalar promotion. However, the actual motivation for this is to fix a correctness issue in call slot optimization, which needs this attribute to avoid optimization regressions. Followup to the discussion on D157499. Differential Revision: https://reviews.llvm.org/D158081
-
Vlad Serebrennikov authored
This patch moves `OMPDeclareReductionDecl::InitKind` to DeclBase.h, so that it's complete at the point where corresponding bit-field is declared. This patch also converts it to scoped enum named `OMPDeclareReductionInitKind`
-
Nicolas Vasilache authored
-
Yingwei Zheng authored
This patch adds missing dependencies required by the new unittest introduced by #68406.
-
Christian Ulmann authored
This commit removes the support for lowering GPU to ROCDL dialect with typed pointers. Typed pointers have been deprecated for a while now and it's planned to soon remove them from the LLVM dialect. Related PSA: https://discourse.llvm.org/t/psa-removal-of-typed-pointers-from-the-llvm-dialect/74502
-
Vlad Serebrennikov authored
This patch moves `RecordDecl::ArgPassingKind` to DeclBase.h to namespace scope, so that it's complete at the time bit-field is declared.
-
Brad Smith authored
Same as 12b87f6e and the addition to Gnu.
-
Serge Pavlov authored
Recent versions of GNU binutils starting from 2.39 support symbol+offset lookup in addition to the usual numeric address lookup. This change adds symbol lookup to llvm-symbolize and llvm-addr2line. Now llvm-symbolize behaves closer to GNU addr2line, - if the value specified as address in command line or input stream is not a number, it is treated as a symbol name. For example: llvm-symbolize --obj=abc.so func_22 llvm-symbolize --obj=abc.so "CODE func_22" This lookup is now supported only for functions. Specification with offset is not supported yet. This is a recommit of 2b279487, reverted in 39fec545 because the test llvm/test/Support/interrupts.test started failing on Windows. The test was changed in 18f036d0 and is also updated in this commit. Differential Revision: https://reviews.llvm.org/D149759 -
Christian Ulmann authored
This commit removes the typed pointer support from the LaunchFunc's lowering to Vukan dialect. Typed pointers have been deprecated for a while now and it's planned to soon remove them from the LLVM dialect. Related PSA: https://discourse.llvm.org/t/psa-removal-of-typed-pointers-from-the-llvm-dialect/74502
-
Christian Ulmann authored
This commit removes the support for lowering GPU to NVVM dialect with typed pointers. Typed pointers have been deprecated for a while now and it's planned to soon remove them from the LLVM dialect. Related PSA: https://discourse.llvm.org/t/psa-removal-of-typed-pointers-from-the-llvm-dialect/74502
-
Cullen Rhodes authored
-
Craig Topper authored
-
Craig Topper authored
-
Natschz authored
Escape LLVM_TARGETS_TO_BUILD while checking against LLVM_ALL_TARGETS and LLVM_EXPERIMENTAL_TARGETS_TO_BUILD (#70885) Targeting X86 while building LLVM with the Android NDK, currently fails with "The target `X86' is not a core tier target. It may be experimental, if so it must be passed via LLVM_EXPERIMENTAL_TARGETS_TO_BUILD." This is happening because the Android NDK defines a variable named X86, which will lead to a "fun" CMake feature. For further details reference [this post](https://discourse.llvm.org/t/the-target-x86-is-not-a-core-tier-target/73784). To fix this, the LLVM_TARGETS_TO_BUILD need to be escaped while checking agains LLVM_ALL_TARGETS and LLVM_EXPERIMENTAL_TARGETS_TO_BUILD.
-
Craig Topper authored
Remove redundancy from RV32 by not using sXLen in the legalization rules. Make s64 conditional on XLen==64 instead. Preparation for making s64 legal on RV32+D.
-
Wenju He authored
If function return value's type is pointer, we can try to collect flat address expression from it. This PR also fixes noop_ptrint_pair_ce2 in noop-ptrint-pair.ll in #70611
-
Serge Pavlov authored
C language standard defined library functions `iszero`, `issignaling` and `issubnormal`, which did not have counterparts among clang builtin functions. This change adds new functions: __builtin_iszero __builtin_issubnormal __builtin_issignaling They provide builtin implementation for the missing standard functions. Pull request: https://github.com/llvm/llvm-project/pull/69041 -
Davide Italiano authored
The discriminator can only pack 16 bits, so anything exceeding that value will cause the packing code to crash. Emit a diagnostic and skip the optimization instead.
-
Mehdi Amini authored
-
Mehdi Amini authored
-
Mehdi Amini authored
The IR is valid, but UB: there is an out-of-bound index for the position to insert inside the vector. We should just ignore this in the folder. Fixes #70884
-
Mehdi Amini authored
-
Mehdi Amini authored
This make sure that an invalid negative dimension is ignored and stays dynamic instead of crashing the compiler. Fixes #70887
-