- May 23, 2023
-
-
Sergei Barannikov authored
The lists contain differences between register numbers, not the register numbers themselves. Since a difference can also be negative, this also changes its type to signed. Changing the type to signed exposed a "bug". For AMDGPU, which has many registers, the first element of a sequence could be as big as ~45k. The value does not fit into int16_t, but fits into uint16_t. The bug didn't show up because of unsigned wrapping and truncation of the Val field in the advance() method. To fix the issue, I changed the way regunit difflists are encoded. The 4-bit 'scale' field of MCRegisterDesc::RegUnit was replaced by 12-bit number of the first regunit, and the first element of each of the lists was removed. The higher 20 bits of RegUnit field contain the initial offset into DiffLists array. AMDGPU has 1'409 regunits (2^12 = 4'096), and the biggest offset is 80'041 (2^20 = 1'048'576). That is, there is enough room. Changing the encoding method also resulted in a smaller array size, the numbers are below (I omitted targets with less than 100 elements). ``` AMDGPU | 80052 | 78741 | -1,6% RISCV | 6498 | 6297 | -3,1% ARM | 4181 | 3966 | -5,1% AArch64 | 2770 | 2592 | -6,4% PPC | 1578 | 1441 | -8,7% Hexagon | 994 | 740 | -25,6% R600 | 508 | 398 | -21,7% VE | 471 | 459 | -2,5% Sparc | 381 | 363 | -4,7% X86 | 326 | 208 | -36,2% Mips | 253 | 200 | -20,9% SystemZ | 186 | 162 | -12,9% ``` Reviewed By: foad, arsenm Differential Revision: https://reviews.llvm.org/D151036
-
Jie Fu authored
/data/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1526:11: error: comparison of integers of different signs: 'const int' and 'const unsigned long' [-Werror,-Wsign-compare] if (lhs == rhs) { ~~~ ^ ~~~ /data/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1553:12: note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<int, unsigned long>' requested here return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs); ^ /data/llvm-project/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp:303:3: note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<int, unsigned long, nullptr>' requested here ASSERT_EQ(10, num_packets); ^ /data/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:2056:32: note: expanded from macro 'ASSERT_EQ' ^ /data/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:2040:54: note: expanded from macro 'GTEST_ASSERT_EQ' ASSERT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2) ^ 1 error generated. -
LLVM GN Syncbot authored
-
LLVM GN Syncbot authored
-
Nico Weber authored
-
Michael Maitland authored
Previous reports calculated the overall report using Instrument information but did not print out per-instruction data using Instrument information. This patch fixes that. Differential Revision: https://reviews.llvm.org/D150459
-
Med Ismail Bennani authored
This patch changes the way we generate the ObjectFileJSON files containing the inlined symbols from the crash report to remove the tempfile prefix from the object file name. To do so, instead of creating a new tempfile for each module, we create a temporary directory that contains each module object file with the same name as the module. This makes the backtraces only contain the module name without the temfile prefix which makes it look like a regular stackframe. Differential Revision: https://reviews.llvm.org/D151045 Signed-off-by:
Med Ismail Bennani <ismail@bennani.ma>
-
Med Ismail Bennani authored
This patch moves the `PassthroughScriptedProcess` & `PassthroughScriptedThread` classes from the `interactive_scripted_process.py` test implementation to the `lldb.scripted_process` python module. This class is very versatile so it makes more sense to ship it with the python module to make it easier for our adopters to derive their class from it instead of copying it. During the "migration", I've also noticed some bugs in the `PassthroughScriptedThread` creation and update, so I also fixed that as part of this patch. Differential Revision: https://reviews.llvm.org/D151044 Signed-off-by:
Med Ismail Bennani <ismail@bennani.ma>
-
Med Ismail Bennani authored
This patch adds support to eStopReasonTrace to Scripted Threads. This is necessary when using a Scrited Process with a Scripted Thread Plan to report a special thread stop reason to the thread plan. rdar://109425542 Differential Revision: https://reviews.llvm.org/D151043 Signed-off-by:
Med Ismail Bennani <ismail@bennani.ma>
-
Med Ismail Bennani authored
This patch fixes the log commands by replacing the LLDB_LOG macro by the LLDB_LOGF macro. This is necessary in order to format argument with printf. Signed-off-by:Med Ismail Bennani <ismail@bennani.ma>
-
Med Ismail Bennani authored
This patch refactors the `StructuredData::Integer` class to make it templated, makes it private and adds 2 public specialization for both `int64_t` & `uint64_t` with a public type aliases, respectively `SignedInteger` & `UnsignedInteger`. It adds new getter for signed and unsigned interger values to the `StructuredData::Object` base class and changes the implementation of `StructuredData::Array::GetItemAtIndexAsInteger` and `StructuredData::Dictionary::GetValueForKeyAsInteger` to support signed and unsigned integers. This patch also adds 2 new `Get{Signed,Unsigned}IntegerValue` to the `SBStructuredData` class and marks `GetIntegerValue` as deprecated. Finally, this patch audits all the caller of `StructuredData::Integer` or `StructuredData::GetIntegerValue` to use the proper type as well the various tests that uses `SBStructuredData.GetIntegerValue`. rdar://105575764 Differential Revision: https://reviews.llvm.org/D150485 Signed-off-by:Med Ismail Bennani <ismail@bennani.ma>
-
Mircea Trofin authored
Avoids relying on `assert` for some of the validation. Differential Revision: https://reviews.llvm.org/D150827
-
Cassie Jones authored
Add initial tests for the behavior of ext_vector_type vectors for vector vs scalar ops in C++. Their behavior doesn't agree with the behavior in C and what the behavior seems like it should be, these are baseline tests before implementing those changes. Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D151059
-
Alex Langford authored
The classes relevant to DWARFDebugAbbrev do not have any unittests verifying their behavior. Seeing as there is not much error handling around these classes right now, I want to add some testing as I plan on making changes to these classes in the near future. Differential Revision: https://reviews.llvm.org/D151001
-
Siva Chandra Reddy authored
Also adjust pthread_create_test to accomodate large page sizes. Both these changes should now fix the full build builders. Reviewed By: michaelrj Differential Revision: https://reviews.llvm.org/D151158
-
Cassie Jones authored
Test that all builtin operators type check successfully with one vector operand and one scalar operand. Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D151061
-
Peter Klausler authored
#define FOO(x) ((x)+1) #define BAR FOO print *, BAR(1) should work as one would expect. Fixes https://github.com/llvm/llvm-project/issues/47162. Differential Revision: https://reviews.llvm.org/D151154
-
Yuanfang Chen authored
-
Noah Goldstein authored
Missing in header for `pthread_exit` and `exit`. Missing in spec file for `pthread_exit`. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D151143
-
Noah Goldstein authored
1) Avoid proper function calls and referencing local variables after the stack has been deallocated. A proper function call/return or local variable reference that may have spilled will cause invalid memory reads after the stack has been deallocated. 2) Mark the function as [[noreturn]] and place `__builtin_unreachable()` after the `SYS_exit` syscalls. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D151142
-
Noah Goldstein authored
Only functional for stack growsdown (same as before), but custom `stack`, `stacksize`, `guardsize`, and `detachstate` all should be working. Differential Revision: https://reviews.llvm.org/D148290
-
Alexey Bataev authored
element. Need to check at first if the SubMask element is PoisonMaskElem to avoid compiler crash.
-
Yi Kong authored
Resovled the issue that when number of tasks is fewer than cores, we end up creating as many threads as the number of cores, making the performance worse than the single thread version.
-
Craig Topper authored
The scalar divider produces 1 bit per cycle so the worst case latency is the input width plus a couple cycles. Reviewed By: michaelmaitland Differential Revision: https://reviews.llvm.org/D151139
-
Lang Hames authored
This patch introduces a skeleton JITLink ppc64 support header and ELF/ppc64 backend. No relocations are supported in this initial version, but given a program requiring no relocations (e.g. one that just returns a constant value from main) the new backend is able to construct a LinkGraph from a ppc64 ELF relocatable object, and the llvm-jitlink tool is able to execute it. This commit should also serve as a good example of how to introduce a JITLink backend for a new architecture. Reviewed By: sgraenitz, v.g.vassilev, vchuravy, nemanjai, jain98, MaskRay Differential Revision: https://reviews.llvm.org/D148192
-
Adrian Prantl authored
This reverts commit 50f0ee8f. This breaks the bots. https://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/lastFailedBuild/consoleFull#-1141050806a1ca8a51-895e-46c6-af87-ce24fa4cd561
-
Craig Topper authored
-FP compare latency was too high. -Compare instructions need to increase latency to assume no chaining to later instructions. vmv.x.s, vmv.s.x, vfmv.f.s, and vfmv.s.f aren't 8 cycles. From the the perspective of the vector pipeline they are only 4 cycles. Though vector to scalar has a much higher latency from the perspective of the scalar pipeline. Will need to adjust in the future. Reviewed By: michaelmaitland Differential Revision: https://reviews.llvm.org/D151136
-
Leandro Lupori authored
This reverts commit e26e68a4. This broke gfortran test-suite, test regression/intrinsic_pack_3.f90.
-
Marcelo Juchem authored
Fixes "dependent projects fail to build with cmake 3.25 and llvm 16-rc4". When building [latest `iovisor/bcc`](https://github.com/iovisor/bcc/commit/1ea0390725391e76256af6a4d0eb857816e6290f), `cmake` complains about a change in the behavior of operator `IN_LIST`: ```console CMake Warning (dev) at /usr/local/lib/cmake/llvm/LLVM-Config.cmake:230 (if): Policy CMP0057 is not set: Support new IN_LIST if() operator. Run "cmake --help-policy CMP0057" for policy details. Use the cmake_policy command to set the policy and suppress this warning. IN_LIST will be interpreted as an operator when the policy is set to NEW. Since the policy is not set the OLD behavior will be used. Call Stack (most recent call first): cmake/clang_libs.cmake:32 (llvm_map_components_to_libnames) src/cc/CMakeLists.txt:132 (include) This warning is for project developers. Use -Wno-dev to suppress it. CMake Error at /usr/local/lib/cmake/llvm/LLVM-Config.cmake:230 (if): if given arguments: "engine" "IN_LIST" "link_components" Unknown arguments specified Call Stack (most recent call first): cmake/clang_libs.cmake:32 (llvm_map_components_to_libnames) src/cc/CMakeLists.txt:132 (include) ``` This patch addresses this issue by setting the aforementioned policy in `LLVM-Config.cmake`. Reviewed By: mgorny, thesamesam Differential Revision: https://reviews.llvm.org/D150884 Closes: https://github.com/llvm/llvm-project/issues/61436
-
Peter Klausler authored
Fortran allows a generic procedure interface to have the same name as a derived type in the same scope or the same name as one of its specific procedures. (It can't have both since a derived type and specific procedure can't have the same name in a scope.) Some popular compilers allow generic interfaces with distinct accessible homonymous specific procedures to be merged by USE association. Thsi compiler does not, and for good reason: it leads to ambiguity in cases where a procedure name appears outside a reference, such as in a PROCEDURE declaration statement as the procedure's interface, the target of a procedure pointer assignment statement, or as an actual argument. This patch cleans up the code that handles these cases, improves some error messages, and adds more tests. Resolves https://github.com/llvm/llvm-project/issues/60228. Differential Revision: https://reviews.llvm.org/D150915
-
Peter Klausler authored
A recent fix to avoid bogus errors with the CONTIGUOUS attribute caused declaration checking to miss errors with applications of CONTIGUOUS to names that are not variables. Restore those error messages, and add tests to ensure that the original problem remains fixed while the recent regressions have been resolved. Differential Revision: https://reviews.llvm.org/D151124
-
Nick Desaulniers authored
As reported by @kees, GCC treats __builtin_object_size of structures containing flexible array members (aka arrays with incomplete type) not just as the sizeof the underlying type, but additionally the size of the members in a designated initializer list. Fixes: https://github.com/llvm/llvm-project/issues/62789 Reviewed By: erichkeane Differential Revision: https://reviews.llvm.org/D150892
-
max authored
This diff adds python bindings for `MlirTypeID`. It paves the way for returning accurately typed `Type`s from python APIs (see D150927) and then further along building type "conscious" `Value` APIs (see D150413). Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D150839
-
Artem Belevich authored
Replaces hasSMxy/hasPTXxy with hasSM<xy>/hasPTX<xy> so we can use them as needed without having to hardcode each version explicitly. Differential Revision: https://reviews.llvm.org/D150999
-
Michael Jones authored
The previous string to float tests didn't check correctness, but due to the atof differential test proving unreliable the strtofloat fuzz test has been changed to use MPFR for correctness checking. Some minor bugs have been found and fixed as well. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D150905
-
Jorge Gorbe Moya authored
After https://reviews.llvm.org/D147831, lldb-vscode doesn't send a process event after launch/attach in case of failure. I believe this is the right interpretation of the spec, because the description of the event says: > The event indicates that the debugger has begun debugging a new > process. and we haven't started debugging a process if there's no process because we failed to launch it. This is also supported by the fact that `request_launch` in vscode.py doesn't wait for the event if passed `expectFailure=True`. However, this doesn't take into account *unexpected* launch failures. In that case, `request_launch` will hang indefinitely waiting for the process event. This patch changes it so we'll only wait for these events if `request["success"]` is true, independently of whether any failure was expected or not. Differential Revision: https://reviews.llvm.org/D150470
-
Slava Zakharin authored
Reboxing of the actual argument according to the type of the dummy argument has to be aware of the potential rank mismatch, when IGNORE_TKR(R) is used. This change only adds support for the mismatching rank when the dummy argument has unlimited polymorphic type. Reviewed By: jeanPerier Differential Revision: https://reviews.llvm.org/D151016
-
Fangrui Song authored
D148573 made x86-specific -fsanitize=function available to all targets, but wasm doesn't allow placing data words before the function label, so unsupport wasm.
-
Michael Maitland authored
Add llvm-mca tests for RISCV LMUL instruments to show that llvm-mca RISCV LMUL instruments work. This commit was previously reverted in 847789d4. It is now being recommitted since the memory leak has been fixed in 4d2a1d7dd8f4. Differential Revision: https://reviews.llvm.org/D149496
-
Michael Maitland authored
There was a memory leak that presented itself once the llvm-mca tests were committed. This leak was not checked for by the pre-commit tests. This change changes the shared_ptr to a unique_ptr to avoid this problem. We will know that this fix works once committed since I don't know whether it is possible to force a lit test to use LSan. I spent the day trying to build llvm with LSan enabled without much luck. If anyone knows how to build llvm with LSan for the lit-tests, I am happy to give it another try locally. Differential Revision: https://reviews.llvm.org/D150816
-