- Dec 15, 2023
-
-
Vitaly Buka authored
-
Vitaly Buka authored
Breaks Windows https://lab.llvm.org/buildbot/#/builders/127/builds/59745 This reverts commit f3432530.
-
Vitaly Buka authored
Call dangerous code on main thread as well. And use _exit() to avoid any issues during regular process cleanup. And disable TSAN as it does not lock allocator yet.
-
Vitaly Buka authored
We don't need it anyway.
-
Florian Mayer authored
almost NFC, just that now we accept INT_MIN and INT_MAX as discussed in https://r.android.com/2831100, but I didn't add the *ValueEnd != Value check because I want to keep this change behaviour-keeping.
-
madanial0 authored
Modify ppc-vec intrinsic test cases to include support for both little and big endianness Co-authored-by:Mark Danial <mark.danial@ibm.com>
-
Jacques Pienaar authored
Tried to keep this simple while handling obvious CSE instances. For more complicated cases the expectation is still that the sorting pass would run before. While simple, this case did turn up in a real deployed instance where it had a large (>10% e2e) impact. This can of course be refined.
-
Andres Villegas authored
With this changes, new lines in the HelpText defined in OptTable have the same indentation as the first line. Before, the help output will look something like: ``` --color=<value> Whether to use color when symbolizing log markup: always, auto, never ``` With this change: ``` --color=<value> Whether to use color when symbolizing log markup: always, auto, never ``` -
Ben Langmuir authored
Embedded Darwin platforms have generalized COMPILER_RT_ENABLE_<PLATFORM> configuration settings, but currently 'osx' is always eabled on Darwin. Add ORC_ENABLE_OSX to allow explicitly *disabling* the orc runtime for macOS platform. This can be useful if you only want to build a specific embedded platform. It would be nice to generalize this to handle other compiler-rt projects (i.e. add COMPILER_RT_ENABLE_OSX), but would require additional attention from each compiler-rt project. Note: some tests currently only are configured for osx, so these are disabled when osx is disabled.
-
Michael Christensen authored
We'd like a way to select the current thread by its thread ID (rather than its internal LLDB thread index). This PR adds a `-t` option (`--thread_id` long option) that tells the `thread select` command to interpret the `<thread-index>` argument as a thread ID. Here's an example of it working: ``` michristensen@devbig356 llvm/llvm-project (thread-select-tid) » ../Debug/bin/lldb ~/scratch/cpp/threading/a.out (lldb) target create "/home/michristensen/scratch/cpp/threading/a.out" Current executable set to '/home/michristensen/scratch/cpp/threading/a.out' (x86_64). (lldb) b 18 Breakpoint 1: where = a.out`main + 80 at main.cpp:18:12, address = 0x0000000000000850 (lldb) run Process 215715 launched: '/home/michristensen/scratch/cpp/threading/a.out' (x86_64) This is a thread, i=1 This is a thread, i=2 This is a thread, i=3 This is a thread, i=4 This is a thread, i=5 Process 215715 stopped * thread #1, name = 'a.out', stop reason = breakpoint 1.1 frame #0: 0x0000555555400850 a.out`main at main.cpp:18:12 15 for (int i = 0; i < 5; i++) { 16 pthread_create(&thread_ids[i], NULL, foo, NULL); 17 } -> 18 for (int i = 0; i < 5; i++) { 19 pthread_join(thread_ids[i], NULL); 20 } 21 return 0; (lldb) thread select 2 * thread #2, name = 'a.out' frame #0: 0x00007ffff68f9918 libc.so.6`__nanosleep + 72 libc.so.6`__nanosleep: -> 0x7ffff68f9918 <+72>: cmpq $-0x1000, %rax ; imm = 0xF000 0x7ffff68f991e <+78>: ja 0x7ffff68f9952 ; <+130> 0x7ffff68f9920 <+80>: movl %edx, %edi 0x7ffff68f9922 <+82>: movl %eax, 0xc(%rsp) (lldb) thread info thread #2: tid = 216047, 0x00007ffff68f9918 libc.so.6`__nanosleep + 72, name = 'a.out' (lldb) thread list Process 215715 stopped thread #1: tid = 215715, 0x0000555555400850 a.out`main at main.cpp:18:12, name = 'a.out', stop reason = breakpoint 1.1 * thread #2: tid = 216047, 0x00007ffff68f9918 libc.so.6`__nanosleep + 72, name = 'a.out' thread #3: tid = 216048, 0x00007ffff68f9918 libc.so.6`__nanosleep + 72, name = 'a.out' thread #4: tid = 216049, 0x00007ffff68f9918 libc.so.6`__nanosleep + 72, name = 'a.out' thread #5: tid = 216050, 0x00007ffff68f9918 libc.so.6`__nanosleep + 72, name = 'a.out' thread #6: tid = 216051, 0x00007ffff68f9918 libc.so.6`__nanosleep + 72, name = 'a.out' (lldb) thread select 215715 error: invalid thread #215715. (lldb) thread select -t 215715 * thread #1, name = 'a.out', stop reason = breakpoint 1.1 frame #0: 0x0000555555400850 a.out`main at main.cpp:18:12 15 for (int i = 0; i < 5; i++) { 16 pthread_create(&thread_ids[i], NULL, foo, NULL); 17 } -> 18 for (int i = 0; i < 5; i++) { 19 pthread_join(thread_ids[i], NULL); 20 } 21 return 0; (lldb) thread select -t 216051 * thread #6, name = 'a.out' frame #0: 0x00007ffff68f9918 libc.so.6`__nanosleep + 72 libc.so.6`__nanosleep: -> 0x7ffff68f9918 <+72>: cmpq $-0x1000, %rax ; imm = 0xF000 0x7ffff68f991e <+78>: ja 0x7ffff68f9952 ; <+130> 0x7ffff68f9920 <+80>: movl %edx, %edi 0x7ffff68f9922 <+82>: movl %eax, 0xc(%rsp) (lldb) thread select 3 * thread #3, name = 'a.out' frame #0: 0x00007ffff68f9918 libc.so.6`__nanosleep + 72 libc.so.6`__nanosleep: -> 0x7ffff68f9918 <+72>: cmpq $-0x1000, %rax ; imm = 0xF000 0x7ffff68f991e <+78>: ja 0x7ffff68f9952 ; <+130> 0x7ffff68f9920 <+80>: movl %edx, %edi 0x7ffff68f9922 <+82>: movl %eax, 0xc(%rsp) (lldb) thread select -t 216048 * thread #3, name = 'a.out' frame #0: 0x00007ffff68f9918 libc.so.6`__nanosleep + 72 libc.so.6`__nanosleep: -> 0x7ffff68f9918 <+72>: cmpq $-0x1000, %rax ; imm = 0xF000 0x7ffff68f991e <+78>: ja 0x7ffff68f9952 ; <+130> 0x7ffff68f9920 <+80>: movl %edx, %edi 0x7ffff68f9922 <+82>: movl %eax, 0xc(%rsp) (lldb) thread select --thread_id 216048 * thread #3, name = 'a.out' frame #0: 0x00007ffff68f9918 libc.so.6`__nanosleep + 72 libc.so.6`__nanosleep: -> 0x7ffff68f9918 <+72>: cmpq $-0x1000, %rax ; imm = 0xF000 0x7ffff68f991e <+78>: ja 0x7ffff68f9952 ; <+130> 0x7ffff68f9920 <+80>: movl %edx, %edi 0x7ffff68f9922 <+82>: movl %eax, 0xc(%rsp) (lldb) help thread select Change the currently selected thread. Syntax: thread select <cmd-options> <thread-index> Command Options Usage: thread select [-t] <thread-index> -t ( --thread_id ) Provide a thread ID instead of a thread index. This command takes options and free-form arguments. If your arguments resemble option specifiers (i.e., they start with a - or --), you must use ' -- ' between the end of the command options and the beginning of the arguments. (lldb) c Process 215715 resuming Process 215715 exited with status = 0 (0x00000000) ``` -
Vitaly Buka authored
It crashes with stack overflow now.
-
Vitaly Buka authored
We cat run LAM tests on QEMU.
-
Mircea Trofin authored
An example of a "workload definition" would be "the transitive closure of functions actually called to satisfy a RPC request", i.e. a (typically significantly) smaller subset of the transitive closure (static + possible indirect call targets) of callees. This means this workload definition is a type of flat dynamic profile. Producing one is not in scope - it can be produced offline from traces, or from sample-based profiles, etc. This patch adds awareness to ThinLTO of such a concept. A workload is defined as a root and a list of functions. All function references are by-name (more readable than GUIDs). In the case of aliases, the expectation is the list contains all the alternative names. The workload definitions are presented to the linker as a json file, containing a dictionary. The keys are the roots, the values are the list of functions. The import list for a module defining a root will be the functions listed for it in the profile. Using names this way assumes unique names for internal functions, i.e. clang's `-funique-internal-linkage-names`. Note that the behavior affects the entire module where a root is defined (i.e. different workloads best be defined in different modules), and does not affect modules that don't define roots.
-
Fangrui Song authored
This reverts commit dbf67ea1. It caused spurious "out-of-line definition of 'operator=' does not match any declaration in" error. https://github.com/llvm/llvm-project/pull/75069#issuecomment-1856581259
-
Zequan Wu authored
After #71433, lld-link is able to always generate build id even when PDB is not generated. This adds the `__buildid` symbol to points to the start of 16 bytes guid (which is after `RSDS`) and allows profile runtime to access it and dump it to raw profile.
-
Stephan T. Lavavej authored
[libc++][test] Enhance ADDITIONAL_COMPILE_FLAGS, use TEST_MEOW_DIAGNOSTIC_IGNORED sparingly (#75317) This is the last PR that's needed (for now) to get libc++'s tests working with MSVC's STL. The ADDITIONAL_COMPILE_FLAGS machinery is very useful, but also very problematic for MSVC, as it doesn't understand most of Clang's compiler options. We've been dealing with this by simply marking anything that uses ADDITIONAL_COMPILE_FLAGS as FAIL or SKIPPED, but that creates significant gaps in test coverage. Fortunately, ADDITIONAL_COMPILE_FLAGS also supports "features", which can be slightly enhanced to send Clang-compatible and MSVC-compatible options to the right compilers. This patch adds the gcc-style-warnings and cl-style-warnings Lit features, and uses that to pass the appropriate warning flags to tests. It also uses TEST_MEOW_DIAGNOSTIC_IGNORED for a few local suppressions of MSVC warnings.
-
quic-akaryaki authored
`--gap-fill <value>` fills the gaps between sections with a specified 8-bit value, instead of zero. `--pad-to <address>` pads the output binary up to the specified load address, using the 8-bit value from `--gap-fill` or zero. These options are only supported for ELF input and binary output.
-
Jon Roelofs authored
-
Arthur Eubanks authored
Re-Reland [X86] Respect code models more when determining if a global reference can fit in 32 bits (#75386) For non-GlobalValue references, the small and medium code models can use 32 bit constants. For GlobalValue references, use TargetMachine::isLargeGlobalObject(). Look through aliases for determining if a GlobalValue is small or large. Even the large code model can reference small objects with 32 bit constants as long as we're in no-pic mode, or if the reference is offset from the GOT. Original commit broke the build... First reland broke large PIC builds referencing small data since it was using GOTOFF as a 32-bit constant.
-
cmtice authored
This adds 23 new helper functions to LLDB's CompilerType class, things like IsSmartPtrType, IsPromotableIntegerType, GetNumberofNonEmptyBaseClasses, and GetTemplateArgumentType (to name a few). It also has run clang-format on the files CompilerType.{h,cpp}. These helper functions are needed as part of the implementation for the Data Inspection Language, (see https://discourse.llvm.org/t/rfc-data-inspection-language/69893). -
Jacek Caban authored
Spotted by Alexandre Ganea in #75407.
-
Michael Spencer authored
This patch deprecates `module.map` in favor of `module.modulemap`, which has been the preferred form since 2014. The eventual goal is to remove support for `module.map` to reduce the number of stats Clang needs to do while searching for module map files. This patch touches a lot of files, but the majority of them are just renaming tests or references to the file in comments or documentation. The relevant files are: * lib/Lex/HeaderSearch.cpp * include/clang/Basic/DiagnosticGroups.td * include/clang/Basic/DiagnosticLexKinds.td
-
Michael Spencer authored
${CMAKE_CFG_INTDIR} does not work correctly for llvm-config when building with the Ninja Multi-Config generator. It tries to find files in the ${CONFIGURATION} directory. Using the $<CONFIG> generator expression instead fixes this. Really this needs to be done everywhere as ${CMAKE_CFG_INTDIR} is deprecated as of 3.21 (LLVM's current min version is 3.20), but this is sufficient to get `check-llvm` to pass. See https://cmake.org/cmake/help/latest/variable/CMAKE_CFG_INTDIR.html -
Saleem Abdulrasool authored
Type dereferenced fragments are specified by offset and length in bits. The representation in CodeView is defined in terms of byte offsets. If the bit slice overlaps at a byte that is included, we would create invalid definition ranges. Consider the following scenario: ~~~ 01234567 01234567 ---------+--------- ==== ====== ~~~ Here bits 1-4 are marked as defined as well as bits 7-9. The byte range for the second portion overlaps and so we would say that bytes 1 and 2 are valid though there is potentially a hole. There is no way to represent this in the defined range for the local variable in CodeView. We simply can drop the fragment definition in such a scenario with the variables are "optimized out". Thanks to @rnk and @hjyamauchi for the discussion around this.
-
Zequan Wu authored
-
Jon Roelofs authored
This is safe because for both cases, the use must be in the same TU as the definition, and they cannot be forward declared.
-
Jon Roelofs authored
-
Jon Roelofs authored
-
Jon Roelofs authored
Unlike ELF targets, MachO does not support the same kind of dynamic symbol resolution at load time. Instead, the corresponding MachO feature resolves symbols lazily on first call. Reviewers: JDevlieghere, dmpolukhin, ahmedbougacha, tahonermann, echristo, MaskRay, erichkeane Reviewed By: MaskRay, echristo, ahmedbougacha Pull Request: https://github.com/llvm/llvm-project/pull/73687
-
Jon Roelofs authored
... by lowering them as lazy resolve-on-first-use symbol resolvers. Note that this is subtly different timing than on ELF platforms, where ifunc resolution happens at load time. Since ld64 and ld-prime don't support all the cases we need for these, we lower them manually in the AsmPrinter.
-
Nick Desaulniers authored
Internal builds of the unittests with msan flagged mempcpy_test. ==6862==WARNING: MemorySanitizer: use-of-uninitialized-value #0 0x55e34d7d734a in length llvm-project/libc/src/__support/CPP/string_view.h:41:11 #1 0x55e34d7d734a in string_view llvm-project/libc/src/__support/CPP/string_view.h:71:24 #2 0x55e34d7d734a in __llvm_libc_9999_0_0_git::testing::Test::testStrEq(char const*, char const*, char const*, char const*, __llvm_libc_9999_0_0_git::testing::internal::Location) llvm-project/libc/test/UnitTest/LibcTest.cpp:284:13 #3 0x55e34d7d4e09 in LlvmLibcMempcpyTest_Simple::Run() llvm-project/libc/test/src/string/mempcpy_test.cpp:20:3 #4 0x55e34d7d6dff in __llvm_libc_9999_0_0_git::testing::Test::runTests(char const*) llvm-project/libc/test/UnitTest/LibcTest.cpp:133:8 #5 0x55e34d7d86e0 in main llvm-project/libc/test/UnitTest/LibcTestMain.cpp:21:10 SUMMARY: MemorySanitizer: use-of-uninitialized-value llvm-project/libc/src/__support/CPP/string_view.h:41:11 in length What's going on here is that mempcpy_test.cpp's Simple test is using ASSERT_STREQ with a partially initialized char array. ASSERT_STREQ calls Test::testStrEq which constructs a cpp:string_view. That constructor calls the private method cpp::string_view::length. When built with msan, the loop is transformed into multi-byte access, which then fails upon access. I took a look at libc++'s __constexpr_strlen which just calls __builtin_strlen(). Replacing the implementation of cpp::string_view::length with a call to __builtin_strlen() may still result in out of bounds access when the test is built with msan. It's not safe to use ASSERT_STREQ with a partially initialized array. Initialize the whole array so that the test passes. -
Craig Hesling authored
These patches do not change the functionality of the library. They simply correct comments and documentation. * Add a missing space in a the `FixIt` class comment * Fix an llvm-project path in the `README.txt`
-
Jay Foad authored
-
Andrzej Warzyński authored
Direct follow-up of #73124 - the linker on Darwin does not support `-whole-archive`, so that needs to be removed from the linker invocation. For context: * https://github.com/llvm/llvm-project/pull/73124
-
Jay Foad authored
Also v_cmpx_t_* and v_cmpx_f_* No GFX12 encoding was added for these, so this patch just adds tests that they are not recognized by the assembler.
-
Jay Foad authored
No GFX12 encoding was added for these. This patch adds tests that they are not recognized by the assembler and defends against generating them in codegen.
-
Jay Foad authored
No GFX12 encoding was added for these, so this patch just adds tests that they are not recognized by the assembler.
-
Rainer Orth authored
Even after 13e2200f (Solaris lacks `femode_t`, too), the Solaris `flang` build is still broken: ``` /vol/llvm/src/llvm-project/local/flang/runtime/exceptions.cpp:87:5: error: static assertion failed due to requirement 'sizeof(fenv_t) <= sizeof(int) * 8': increase ieee_status_type size 87 | sizeof(fenv_t) <= sizeof(int) * _FORTRAN_RUNTIME_IEEE_FENV_T_EXTENT, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /vol/llvm/src/llvm-project/local/flang/runtime/exceptions.cpp:87:20: note: expression evaluates to '200 <= 32' 87 | sizeof(fenv_t) <= sizeof(int) * _FORTRAN_RUNTIME_IEEE_FENV_T_EXTENT, | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` This patch fixes this by removing the assertion. Tested on `amd64-pc-solaris2.11` and `sparcv9-sun-solaris2.11`.
-
Arthur Eubanks authored
Revert "Reland [X86] Respect code models more when determining if a global reference can fit in 32 bits (#75386)" This reverts commit ec92d74a. Breaks some compiler-rt tests, e.g. https://lab.llvm.org/buildbot/#/builders/37/builds/28834
-
Natalie Chouinard authored
These tests currently fail on asserts, so adding a REQUIRES to make sure they're skipped on builds with asserts disabled. Follow-up from #74849
-