- Aug 09, 2022
-
-
Alex Richardson authored
When calling a dso_local function, we end up creating a call against the .Lfoo$local label. This might be converted to a relocation against a section if there is such a matching one (which is a lot more likely with -ffunction-sections) and then the LSB (Thumb flag) will be lost. I originally noticed this with Morello LLVM (which uses the LSB to indicate a C64 encoding mode function). The missing LSB meant that ld.lld would insert a thunk that switches encoding mode which then resulted in errors at runtime since functions were being entered with the wrong encoding mode. Since the Morello backend is not upstream, I looked if any in-tree backends could also be affected by the missing STT_FUNC flag and noticed that Thumb is also affected (although the bug is rather difficult to trigger - it currently requires inline assembly). Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D131432
-
Alex Richardson authored
ARMAsmPrinter::emitFunctionEntryLabel() was not calling the base class function so the $local alias was not being emitted. This should not have any function effect right now since ARM does not generate different code for the $local symbols, but it could be improved in the future. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D131392
-
Alex Richardson authored
We should be emitting .Lfoo$local aliases for dso_local functions.
-
Alex Richardson authored
This is based on the RISC-V elf-preemption.ll (converted to opaque pointers) and is useful for test coverage for the patch series starting with D131392.
-
Simon Pilgrim authored
std::result_of_t is deprecated in C++17 Fixes #57023
-
Simon Pilgrim authored
Now that we've updated to C++17 MSVC gives very verbose warnings about not creating classes that inherit from std::iterator - use llvm::iterator_facade_base instead Fixes #57005
-
Tobias Hieta authored
As pointed out by @glandium here https://reviews.llvm.org/D130689#3709088 we updated the requirement of MSVC compatibility but not the flag passed when using WinMsvc.cmake as a toolchain.
-
Simon Pilgrim authored
[DAG] canCreateUndefOrPoison - add freeze(ctpop(x)) -> ctpop(freeze(x)) and freeze(parity(x)) -> parity(freeze(x)) support Both are guaranteed not to create undef/poison
-
Simon Pilgrim authored
-
Shraiysh Vaishay authored
Add `NoSideEffects` trait to omp.parallel operation. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D130657
-
Nikita Popov authored
The RelLookupTableConverter pass currently only supports 64-bit pointers. This is currently enforced using an isArch64Bit() check on the target triple. However, we consider x32 to be a 64-bit target, even though the pointers are 32-bit. (And independently of that specific example, there may be address spaces with different pointer sizes.) As such, add an additional guard for the size of the pointers that are actually part of the lookup table. Differential Revision: https://reviews.llvm.org/D131399
-
Balázs Kéri authored
ASTImporter used to crash in some cases when a function is imported with `auto` return type and the return type has references into the function. The handling of such cases is improved and crash should not occur any more but it is not fully verified, there are very many different types of cases to care for. Reviewed By: martong Differential Revision: https://reviews.llvm.org/D130705
-
Fangrui Song authored
-
Fangrui Song authored
-
gonglingqin authored
Differential Revision: https://reviews.llvm.org/D131384
-
wanglei authored
This allows a number of optimisation passes to work. E.g. BranchFolding and MachineBlockPlacement. Differential Revision: https://reviews.llvm.org/D131316
-
WANG Xuerui authored
Differential Revision: https://reviews.llvm.org/D131352
-
Jonas Devlieghere authored
Seems like at least one bot (clang-ppc64-aix) is having trouble with the C++17 deduction guide for array creation. Specify the template arguments explicitly.
-
Luo, Yuanke authored
The register operand of DBG_VALUE is not selected to a proper register bank in both AArch64 and X86. This would cause getRegClass crash after global ISel. After discussion, we think the MIR should assume all vritual register should be set proper register class after global ISel, so this patch is to fix the gap of DBG_VALUE for AArch64 and X86. Differential Revision: https://reviews.llvm.org/D129037
-
Vitaly Buka authored
Slightly helps with performance regression after D128146.
-
Jonas Devlieghere authored
My initial attempt in db008af5 resulted in "error: no viable constructor or deduction guide for deduction of template arguments of 'array'". Let's see if we can work around that by using an ArrayRef with an explicit template argument.
-
Kazu Hirata authored
MapEntryOptionalStorage is an underlying storage class for OptionalStorage<clang::DirectoryEntryRef>. This patch deprecates: OptionalStorage<clang::DirectoryEntryRef>::hasValue OptionalStorage<clang::DirectoryEntryRef>::getValue as there is no known users of these two methods. Differential Revision: https://reviews.llvm.org/D131368
-
Chen Zheng authored
-
Yuta Mukai authored
The previous code overwrites VRMap for prologue stages during Phi generation if a register spans many stages. As a result, the wrong register is used as the one coming from the prologue in Phis at later stages. (A process exists to correct this, but it does not work in all cases.) In addition, VRMap for prologue must be preserved until addBranches(). This patch fixes them by separating the map for Phis into a different variable (VRMapPhi). Reviewed By: bcahoon Differential Revision: https://reviews.llvm.org/D127840
-
Fangrui Song authored
-
Fangrui Song authored
-
Jonas Devlieghere authored
- Reduce indentation - Extract caching of the DbgShellCommand and the dsymForUUID executable (or equivalent) - Check the DBGShellCommands before falling back to /usr/local/bin/dsymForUUID - Don't check ~rc/bin/dsymForUUID - Improve error reporting - Don't cache the value of LLDB_APPLE_DSYMFORUUID_EXECUTABLE Differential revision: https://reviews.llvm.org/D131303
-
Shafik Yaghmour authored
Setting an enum without a fixed underlying type to a value which is outside the value range is undefined behavior. The initializer needs to be a constant expression and therefore this was always ill-formed we just were not diagnosing it before. See D130058 and D131307 for more details. Differential Revision: https://reviews.llvm.org/D131460
-
Vitaly Buka authored
-
Vitaly Buka authored
-
Fangrui Song authored
Driver options taking a value typically use `=` as the separator, instead of a space. Unfortunately many older driver options do not stick with the rule, but I find -Xclang used a lot and will be convenient if -Xclang= exists. For build systems using a string array instead of a string to indicate compiler options, `["-Xclang=-foo"]` is more convenient than `["-Xclang", "-foo"]`. If a tool wants to filter out -Xclang=-foo, it is trivial for the `=` form, but complex for the space separated form. Reviewed By: jhuber6 Differential Revision: https://reviews.llvm.org/D131455
-
Yuta Mukai authored
1. Missing instruction information (FTSSEL, FMSB, PFIRST and RDFFR) is added and CompleteModel is set to one. 2. Information for pseudo SVE instructions is added. Those instructions are present at the time of scheduling. 3. Resource and latency information for SVE instructions is modified to be more accurate. For example, the description for CMPEQ, which consumes one cycle each of unit FLA and PPR, is as follows. ``` Previous: def A64FXGI01 : ProcResGroup<[A64FXIPFLA, A64FXIPPR]>; def A64FXWrite_4Cyc_GI01 : SchedWriteRes<[A64FXGI01]> {... Modified: def A64FXGI0 : ProcResGroup<[A64FXIPFLA]>; def A64FXGI1 : ProcResGroup<[A64FXIPPR]>; def A64FXWrite_CMP : SchedWriteRes<[A64FXGI0, A64FXGI1]> {... ``` Reference: A64FX Microarchitecture Manual (Table 16-3) https://github.com/fujitsu/A64FX/blob/master/doc/A64FX_Microarchitecture_Manual_en_1.7.pdf Reviewed By: dmgreen, kawashima-fj Differential Revision: https://reviews.llvm.org/D131165 -
Chen Zheng authored
Map hardware loop intrinsics loop_decrement and set_loop_iteration to the new PowerPC pseudo instructions, so that the hardware loop intrinsics will be expanded to normal cmp+branch form or ctrloop form based on the CTR register usage on MIR level. Reviewed By: lkail Differential Revision: https://reviews.llvm.org/D123366
-
Thomas Raoux authored
now that `arith` dialect has maxf/minf use it instead of cmp/select. Also refactor clamp helpers to make them simlper. Reviewed By: rsuderman Differential Revision: https://reviews.llvm.org/D131426
-
Fangrui Song authored
With the recent llvm-project C++17 switch (D130689), gwp_asan/tests may fail to link with some versions of GCC (https://github.com/llvm/llvm-project/issues/56994): > backtrace.cpp:(.text+0xca6): undefined reference to `gwp_asan::AllocationMetadata::kMaxTraceLengthToCollect' I cannot reproduce this issue by myself, but notice that currently lib/gwp_asan/*.cpp get -std=c++17 while lib/gwp_asan/tests/*.cpp don't (therefore may use -std=g++14 default from Clang and older GCC). Using -std=c++17 for lib/gwp_asan/tests will ensure that backtrace.cpp uses inline variable and will assuredly avoid the possible GCC issue. In the long-term, we should add -std=c++17 to a central place like generate_compiler_rt_tests. Reviewed By: dyung Differential Revision: https://reviews.llvm.org/D131440
-
Vitaly Buka authored
-
Shafik Yaghmour authored
[Clang] Allow downgrading to a warning the diagnostic for setting a non fixed enum to a value outside the range of the enumeration values In D130058 we diagnose the undefined behavior of setting the value outside the range of the enumerations values for an enum without a fixed underlying type. Based on feedback we will provide users to the ability to downgrade this diagnostic to a waring to allow for a transition period. We expect to turn this diagnostic to an error in the next release. Differential Revision: https://reviews.llvm.org/D131307
-
Vitaly Buka authored
-
Amaury Séchet authored
-
not-jenni authored
Reviewed By: jpienaar Differential Revision: https://reviews.llvm.org/D130373
-