- Jan 19, 2024
-
-
Vitaly Buka authored
-
Daniel Thornburgh authored
These cause test build failures on Windows. This reverts the following commits: 57ca7484 d06ae33e
-
Fangrui Song authored
This ports msan https://reviews.llvm.org/D14795 to dfsan. dfsan, like msan, clears shadow for globals in a newly opened DSO in case the DSO occupies the address of a previously labeled/poisoned area. The operation should not happen on the main executable. In addition, for a DT_EXEC executable, l_addr is zero and will lead to a null pointer dereference in ForEachMappedRegion.
-
Sam Clegg authored
See lld/ELF/Config.h
-
Sam Clegg authored
-
Alex Langford authored
The lifetime of these BreakpointEventData objects is difficult to reason about. These BreakpointEventData pointers are created and passed along to `Event` which takes the raw pointer and sticks them in a shared pointer. Instead of manually managing the lifetime and memory, it would be simpler to have them be shared pointers from the start.
-
Amir Ayupov authored
Make output function addresses be delta-encoded wrt last offset in the previous function. This reduces the deltas in function start addresses. Test Plan: Reduces BAT section size to: - large binary: 12218860 bytes (0.32x original), - medium binary: 1606580 bytes (0.27x original), - small binary: 404 bytes (0.28x original), Reviewers: rafaelauler Reviewed By: rafaelauler Pull Request: https://github.com/llvm/llvm-project/pull/76904
-
Florian Hahn authored
-
Shoaib Meenai authored
32-bit x86 doesn't have an appropriate relocation type we can use to elide the RTTI proxies, so we need to emit them. This would previously cause crashes when using the relative vtable ABI for 32-bit x86.
-
Vitaly Buka authored
`new` was introduced in this patch, but I don't see `delete` to release the memory.
-
quic-akaryaki authored
In .new instructions, the upper vector of a reverse pair (e.g. V4 in V4:5) should be referenced with an odd sss value.
-
Joseph Huber authored
Summary: A recent patch in https://github.com/llvm/llvm-project/pull/72280 provided `clang` the ability to easily use scoped atomics. These are a special modifier on atomics that some backends support. They are intended for providing more fine-grained control over the affected memory of an atomic action. The default is a "system" scope, e.g. coherence with the GPU and CPU memory on a heterogeneous system. If we use "device" scope, that implies that the memory is only ordered with respect to the current GPU. These builtins are direct replacements for the GCC atomic builitins in cases where the backend doesn't do anything with the information, so these should be a drop-in. This introduces some noise, but hopefully it isn't too contentious.
-
Vitaly Buka authored
std:: usually is not a cause of the bug. We now display ``` SUMMARY: AddressSanitizer: allocation-size-too-big path/to/allocator_returns_null.cpp:92:7 in main ``` instead of ``` SUMMARY: AddressSanitizer: allocation-size-too-big /usr/lib/../include/c++/13/bits/new_allocator.h:147:27 in std::__new_allocator<char>::allocate(unsigned long, void const*) ``` `/include/c++/` matches both libc++ and libstdc++ include paths.
-
Pete Lawrence authored
For example, the following message has the severity string "error: " twice. > "error: <EXPR>:3:1: error: cannot find 'bogus' in scope This method already appends the severity string in the beginning, but with this fix, it also removes a secondary instance, if applicable. Note that this change only removes the *first* redundant substring. I considered putting the removal logic in a loop, but I decided that if something is generating more than one redundant severity substring, then that's a problem the message's source should probably fix. rdar://114203423
-
Kareem Ergawy authored
-
Vlad Serebrennikov authored
This is another follow-up to f4fbbebb and 30da0f5a
-
Usama Hameed authored
explicitly pass libLTO path. This fixes a failure in swift-ci where libLTO was being picked from the system instead which was an older version and caused issues. rdar://117474861
-
Alexandre Ganea authored
This reverts commit cb67dc19.
-
Haopeng Liu authored
Add a clang flag, "-ftrivial-auto-var-init-max-size=" so that clang skips auto-init a variable if the auto-init memset size exceeds the flag setting (in bytes). Note that this skipping doesn't apply to runtime-sized variables like VLA. Considerations: "__attribute__((uninitialized))" can be used to manually opt variables out. However, there are thousands of large variables (e.g., >=1KB, most of them are arrays and used as buffers) in big codebase. Manually opting them out one by one is not efficient.
-
Peter Klausler authored
Don't put \uXXXX escapes into the cooked character stream while prescanning; it should always be UTF-8.
-
Ricky Zhou authored
This fixes some cases of missing debuginfo caused by an interaction between: https://github.com/llvm/llvm-project/commit/f0d66559ea345db4b2116cae044aaf3399d7e829, which drops the identifier from a DICompositeType in the module containing its vtable. and https://github.com/llvm/llvm-project/commit/a61f5e379675732666744bcba25efbc9922e016a, which causes ThinLTO to import composite types as declarations when they have an identifier. If a virtual class's DICompositeType has no identifier due to the first change, and contains a nested anonymous type which does have an identifier, then the second change can cause ThinLTO to output the classes's DICompositeType as a type definition that links to a non-defining declaration for the nested type. Since the nested anonyous type does not have a name, debuggers are unable to find the definition for the declaration. Repro case: ``` cat > a.h <<EOF class A { public: A(); virtual ~A(); private: union { int val; }; }; EOF cat > a.cc <<EOF #include "a.h" A::A() { asm(""); } A::~A() {} EOF cat > main.cc <<EOF #include "a.h" int main(int argc, char **argv) { A a; return 0; } EOF clang++ -O2 -g -flto=thin -mllvm -force-import-all main.cc a.cc gdb ./a.out -batch -ex 'pt /rmt A' ``` The gdb command outputs: ``` type = class A { private: union { <incomplete type> }; } ``` and dwarfdump -i a.out shows a DW_TAG_class_type for A with an incomplete union type (note that there is also a duplicate entry with the full union type that comes after). ``` < 1><0x0000001e> DW_TAG_class_type DW_AT_containing_type <0x0000001e> DW_AT_calling_convention DW_CC_pass_by_reference DW_AT_name (indexed string: 0x00000007)A DW_AT_byte_size 0x00000010 DW_AT_decl_file 0x00000001 /path/to/./a.h DW_AT_decl_line 0x00000001 ... < 2><0x0000002f> DW_TAG_member DW_AT_type <0x00000037> DW_AT_decl_file 0x00000001 /path/to/./a.h DW_AT_decl_line 0x00000007 DW_AT_data_member_location 8 < 2><0x00000037> DW_TAG_union_type DW_AT_export_symbols yes(1) DW_AT_calling_convention DW_CC_pass_by_value DW_AT_declaration yes(1) ``` This change works around this by making ThinLTO always import full definitions for anonymous types.
-
Alexandre Ganea authored
[openmp] Revert 64874e5a since it was committed by mistake and the PR (https://github.com/llvm/llvm-project/pull/77853) wasn't approved yet.
-
Alan Zhao authored
This bug is caused by parenthesized list initialization not being implemented in `CodeGenFunction::EmitNewArrayInitializer(...)`. Parenthesized list initialization of `struct`s with `operator new` already works in Clang and is not affected by this bug. Additionally, fix the test new-delete.cpp as it incorrectly assumes that using parentheses with operator new to initialize arrays is illegal for C++ versions >= C++17. Fixes #68198
-
kyulee-com authored
This commit corrects the address computation for objc_msgSend stubs. Previously, the address computation was incidentally correct due to objc_msgSend often being the first entry in the got section, resulting in a 0 index. This commit ensures accurate address computation regardless of the objc_msgSend stub's position in the got section.
-
Dave Lee authored
Fixes `SmallString` summary provider, which was incorrectly producing the empty string. Initially I thought the strings I was debugging were empty for unknown reasons, but that was not the case.
-
Philip Reames authored
This is inspired by https://github.com/llvm/llvm-project/pull/77342#pullrequestreview-1814673242, and is split off of same with some differences in style. A select is a vmerge.vv with the additional cost of materializing the bitmask vector in a vreg. All masks fit within a single vector register (e8 + m8 is the worst case), and thus our worst case cost should be roughly 3 (2 scalar to produce the address, one vector load op). Given most shuffles are small, and the mask will be instead produced by LUI/ADDI + vmv.s.x or ADDI + vmv.s.x, using 2 as the default seems quite reasonable. At worst, we're not going to be off by much. The prior lowering scaled the cost of the bitmask with LMUL, which I don't understand. At m1 it did use the same base cost of 2. (@lukel97 You wrote the original code here, anything I'm missing here?)
-
Alex MacLean authored
-
Alexandre Ganea authored
Fixes: ``` [13/270] Building CXX object tools\lldb\unittests\Core\CMakeFiles\LLDBCoreTests.dir\DumpDataExtractorTest.cpp.obj C:\git\llvm-project\lldb\unittests\Core\DumpDataExtractorTest.cpp(140): warning C4305: 'argument': truncation from 'double' to 'const std::complex<float>::_Ty' ```
-
Alexandre Ganea authored
Fixes several of these: ``` [3370/3822] Building CXX object tools\lldb\source\Plugins\Process\U...lldbPluginProcessUtility.dir\NativeRegisterContextDBReg_x86.cpp.ob C:\git\llvm-project\lldb\source\Plugins\Process\Utility\NativeRegisterContextDBReg_x86.h(23): warning C4589: Constructor of abstract class 'lldb_private::NativeRegisterContextDBReg_x86' ignores initializer for virtual base class 'lldb_private::NativeRegisterContextRegisterInfo' C:\git\llvm-project\lldb\source\Plugins\Process\Utility\NativeRegisterContextDBReg_x86.h(23): note: virtual base classes are only initialized by the most-derived type ```
-
Alexandre Ganea authored
Fixes: ``` [3465/3822] Building CXX object tools\lldb\source\Plugins\SymbolFile\CTF\CMakeFiles\lldbPluginSymbolFileCTF.dir\SymbolFileCTF.cpp.obj C:\git\llvm-project\lldb\source\Plugins\SymbolFile\CTF\SymbolFileCTF.cpp(606) : warning C4715: 'lldb_private::SymbolFileCTF::CreateType': not all control paths return a value ```
-
Alexandre Ganea authored
Fixes: ``` C:\git\llvm-project\lldb\unittests\Core\DumpDataExtractorTest.cpp(140): warning C4305: 'argument': truncation from 'double' to 'const std::complex<float>::_Ty' ```
-
Natalie Chouinard authored
Add support for specifying the logical SPIR-V target environment in the triple as Vulkan. When compiling HLSL, this replaces the DirectX Shader Model with a Vulkan environment instead. Currently, the only supported combinations of SPIR-V version and Vulkan environment are: - Vulkan 1.2 and SPIR-V 1.5 - Vulkan 1.3 and SPIR-V 1.6 Fixes #70051
-
Mark de Wever authored
The tag name was long for an ABI tag. The name was misleading too, the tag is first introduced in LLVM 18 in 2024 and not in 2023. --------- Co-authored-by:Louis Dionne <ldionne.2@gmail.com>
-
Dominik Wójt authored
Some of the module tests now pass after picolibc update. https://github.com/llvm/llvm-project/pull/77908 The remaining tests fail and are now set to xfail on picolibc specifically.
-
Vlad Serebrennikov authored
This is a follow-up to f4fbbebb, which addresses macOS test failure.
-
Jonas Paulsson authored
Update SystemZTTI to reflect the recent change of handling i128 as a legal type in vector registers.
-
Andrei Golubev authored
The getHashValue() signature returns a value of type 'unsigned' while the hash_code could only be implicitly converted to 'size_t'. Depending on the C++ implementation, this may or may not be a narrowing conversion. On some platform/compiler combination, this becomes a warning. To avoid the warning (and better highlight the narrowing), do an explicit conversion instead. Co-authored-by:Orest Chura <orest.chura@intel.com>
-
Ben Langmuir authored
Add a HeaderOptions struct that can be used to configure commonly-used load commands LC_ID_DYLIB, LC_LOAD_DYLIB, and LC_RPATH when setupDylib creates a mach-o header.
-
Lang Hames authored
Provides a natural API for adding LC_ID_DYLIB commands, including the arbitrary install name.
-
Valentin Clement (バレンタイン クレメン) authored
This patch add support for device_type on the acc.routine operation. device_type can be specified on seq, worker, vector, gang and bind information. The support is following the same design than the one for compute operations, data operation and the loop operation.
-