- Jan 17, 2024
-
-
Stefan Gränitz authored
-
Stefan Gränitz authored
-
Stefan Gränitz authored
-
Stefan Gränitz authored
All other backends use the full term "relocations". Also, sorting by type (relocations/stubs/etc.) before CPU states (arm/thumb/other) makes it easier to filter in LIT.
-
Stefan Gränitz authored
-
Michael Spencer authored
A previous commit (82f75ed5) made clang ignore .gch files that were not Clang AST files. This broke `-gmodules`, which embeds the Clang AST into an object file containing debug info. This changes the probing to detect any file format recognized by `llvm::identify_magic()` as potentially containing a Clang AST. Previous PR: https://github.com/llvm/llvm-project/pull/69204
-
PiJoules authored
…v64 ELF This is similar to https://github.com/llvm/llvm-project/pull/67754 but adds support for ELF aarch64 and riscv64 now that GOTPCREL-equivalent relocations have been added for those archs.
-
Chelsea Cassanova authored
The test TestTrimmedProgressReporting tests that progress reports are being sent by listening for events with the titles of specific progress reports. Commit f1ef910b removed the report for Apple DWARF indices which was one of the reports being listened for in this test, so that report is removed here as well. That commit also now creates all progress reports with details so reports string are prepended with the details count. This changes the length of the trimmed progress report title string that's checked for here so this commit changes the string to match as well. This test was skipped on non-Apple platforms, but since the progress report for Apple DWARF indices has been removed this commit removes that decorator.
-
Bill Wendling authored
The 'counted_by' attribute is used on flexible array members. The argument for the attribute is the name of the field member holding the count of elements in the flexible array. This information is used to improve the results of the array bound sanitizer and the '__builtin_dynamic_object_size' builtin. The 'count' field member must be within the same non-anonymous, enclosing struct as the flexible array member. For example: ``` struct bar; struct foo { int count; struct inner { struct { int count; /* The 'count' referenced by 'counted_by' */ }; struct { /* ... */ struct bar *array[] __attribute__((counted_by(count))); }; } baz; }; ``` This example specifies that the flexible array member 'array' has the number of elements allocated for it in 'count': ``` struct bar; struct foo { size_t count; /* ... */ struct bar *array[] __attribute__((counted_by(count))); }; ``` This establishes a relationship between 'array' and 'count'; specifically that 'p->array' must have *at least* 'p->count' number of elements available. It's the user's responsibility to ensure that this relationship is maintained throughout changes to the structure. In the following, the allocated array erroneously has fewer elements than what's specified by 'p->count'. This would result in an out-of-bounds access not not being detected: ``` struct foo *p; void foo_alloc(size_t count) { p = malloc(MAX(sizeof(struct foo), offsetof(struct foo, array[0]) + count * sizeof(struct bar *))); p->count = count + 42; } ``` The next example updates 'p->count', breaking the relationship requirement that 'p->array' must have at least 'p->count' number of elements available: ``` void use_foo(int index, int val) { p->count += 42; p->array[index] = val; /* The sanitizer can't properly check this access */ } ``` In this example, an update to 'p->count' maintains the relationship requirement: ``` void use_foo(int index, int val) { if (p->count == 0) return; --p->count; p->array[index] = val; } ``` -
Jonas Devlieghere authored
This hoists SupportFile out of FileSpecList. SupportFileList is still implemented there as it's very similar to FileSpecList.
-
Rahman Lavaee authored
[SHT_LLVM_BB_ADDR_MAP,NFC] Add SCOPED_TRACE for convenient mapping of failures to test cases. (#78335) Although parameterized gtests are preferred for this, our tests are not very straightforward. So I decided to add SCOPED_TRACE for different test cases and the lambda checks as well. Typical test failure message now looks like: ``` ...llvm-project/llvm/unittests/Object/ELFObjectFileTest.cpp:737 Expected equality of these values: *BBAddrMaps Which is: { 32-byte object <11-11 01-00 00-00 00-00 C0-A9 FB-3E E4-55 00-00 D0-A9 FB-3E E4-55 00-00 D0-A9 FB-3E E4-55 00-00>, 32-byte object <22-22 02-00 00-00 00-00 F0-8E FB-3E E4-55 00-00 00-8F FB-3E E4-55 00-00 00-8F FB-3E E4-55 00-00> } ExpectedResult Which is: { 32-byte object <33-33 03-00 00-00 00-00 50-A7 FB-3E E4-55 00-00 60-A7 FB-3E E4-55 00-00 60-A7 FB-3E E4-55 00-00> } Google Test trace: ...llvm-project/llvm/unittests/Object/ELFObjectFileTest.cpp:726: for TextSectionIndex: 1 and object yaml: --- !ELF FileHeader: Class: ELFCLASS64 Data: ELFDATA2LSB Type: ET_EXEC Sections: - Name: .llvm_bb_addr_map_1 Type: SHT_LLVM_BB_ADDR_MAP Link: 1 Entries: - Version: 2 Address: 0x11111 BBEntries: - ID: 1 AddressOffset: 0x0 Size: 0x1 Metadata: 0x2 - Name: .llvm_bb_addr_map_2 Type: SHT_LLVM_BB_ADDR_MAP Link: 1 Entries: - Version: 2 Address: 0x22222 BBEntries: - ID: 2 AddressOffset: 0x0 Size: 0x2 Metadata: 0x4 - Name: .llvm_bb_addr_map_3 Type: SHT_LLVM_BB_ADDR_MAP Link: 2 Entries: - Version: 1 Address: 0x33333 BBEntries: - ID: 0 AddressOffset: 0x0 Size: 0x3 Metadata: 0x6 - Name: .llvm_bb_addr_map_4 Type: SHT_LLVM_BB_ADDR_MAP_V0 # Link: 0 (by default, can be overriden) Entries: - Version: 0 Address: 0x44444 BBEntries: - ID: 0 AddressOffset: 0x0 Size: 0x4 Metadata: 0x18 ...llvm-project/llvm/unittests/Object/ELFObjectFileTest.cpp:757: normal sections ``` -
Rahman Lavaee authored
BasicBlockSections must enforce placing the entry block at the beginning of the function regardless of the basic block sections profile.
-
Victor Mustya authored
It's not enough to just make sure destination type is floating point, because the following chain may be incorrectly optimized: ```LLVM %trunc = fptrunc float %src to bfloat %cast = bitcast bfloat %trunc to half ``` Before the fix, the instruction sequence mentioned above used to be translated into single fptrunc instruction as follows: ```LLVM %trunc = fptrunc float %src to half ``` Such transformation was semantically incorrect.
-
Craig Topper authored
With lldb build fix. Original message: EnumConstantDecl is allocated by the ASTContext allocator so the destructor is never called. This patch takes a similar approach to IntegerLiteral by using APIntStorage to allocate large APSInts using the ASTContext allocator as well. The downside is that an additional heap allocation and copy of the data needs to be made when calling getInitValue if the APSInt is large. Fixes #78160.
-
Yeoul Na authored
The document is mostly the exact copy of RFC: Enforcing Bounds Safety in C, except some clarifications made over the PR review: https://discourse.llvm.org/t/rfc-enforcing-bounds-safety-in-c-fbounds-safety/70854 Further changes and clarifications for the programming model will be done as separate patches to make it easier to track history of changes.
-
Ivan Kosarev authored
Resolves AsmParser ambiguities, e.g., between V_DOT4C_I32_I8_dpp_vi and V_DOT4C_I32_I8_dpp_gfx10. The latter is predicated with isGFX10Only while the first has no subtarget generation predicates. Part of <https://github.com/llvm/llvm-project/issues/69256>.
-
Charlie Barto authored
[ASAN][sanitizers][win] Allow windows-asan to be built with /MDd and intercept functions from the debug runtimes. (#77840) It turns out this works _mostly_ fine, even when mixing debug versions of asan with programs built with the release runtime. Using /MT (or /MTd) with a dynamically linked asan has never really worked that well, and I am planning on opening a PR that will completely remove the static-asan configuration for windows and make programs linked with the static CRT/runtime work with the DLL version of asan. This is better than the current situation because the static linked version of asan doesn't work well on windows if there are multiple DLLs in the process using it. The check for building asan with only /MD or /MT has been removed. It was in AsanDoesNotSupportStaticLinkage, but was checking for debug CRTs, not static linkage. The kind of static linkage this function is supposed to check for (on linux for example) doesn't really exist on windows. Note: There is one outstanding issue with this approach, if you mix a /MDd DLLs and /MD dlls in the same process then the "real" function called by asan interceptors will be the same for calls from both contexts, potentially screwing up things like errno. This only happens if you mix /MD and /MDd in the same process, because otherwise asan won't find functions from both runtimes to intercept. We are working on a fix for this, and it mainly hits with the CRT functions exported from both ucrtbase and ntdll. This change is being upstreamed from Microsoft's fork.
-
Craig Topper authored
This reverts commit 4737959d. Missed an lldb update.
-
serbanu authored
Add config parse tests for SeparateDefinitionBlocks option.
-
Craig Topper authored
EnumConstantDecl is allocated by the ASTContext allocator so the destructor is never called. This patch takes a similar approach to IntegerLiteral by using APIntStorage to allocate large APSInts using the ASTContext allocator as well. The downside is that an additional heap allocation and copy of the data needs to be made when calling getInitValue if the APSInt is large. Fixes #78160.
-
Nick Desaulniers authored
This reverts commit fdbf255c. Causes build breakage on 32b arm (see reports: https://github.com/llvm/llvm-project/pull/78192). These are reproducible for the 32b arm baremetal target on x86 hosts as well.
-
Arthur Eubanks authored
-
Pranav Kant authored
Similar to d88c1f94
-
Aiden Grossman authored
Currently, BenchmarkRunner scales the per snippet counters by multiplying the raw counter values by the number of instructions (casted to a double) divided by the minimum number of instructions. This is incorrect for the loop repetition mode for snippets that don't fit a whole number of times into the minimum instruction count. For example, with 3 instructions in the snippet and the minimum number of instructions set to 4, the loop repetitor will execute a total of six instructions, but BenchmarkRunner will scale the raw count by 3/4 instead of 3/6=1/2. This will also be incorrect for the duplicate snippet repetitor after #77224. This patch fixes this behavior by dividing the raw count by the ceiling of the number of repetitions divided by the instruction count.
-
erichkeane authored
The 'reduction' clause takes a mandatory operator followed by a colon, followed by a 'var-list'. This patch implements the parsing for the 'reduction' clause.
-
jimingham authored
There's a bad interaction between the macOS 14 dyld and the "dyld_sim" shim that comes from older (iOS 15) simulator downloads that results in dyld reporting some modules twice in the return from the dyld callback to list modules. The records were identical, but lldb wasn't happy with seeing the duplicates... Since it's not possible to load two different modules at the same address, this change just picks the first instance of any entries that have the same load address. There really isn't a good way to test this patch.
-
Teresa Johnson authored
As suggested in https://github.com/llvm/llvm-project/pull/75823, to avoid confusion with std::function_ref, qualify all uses with llvm:: (we were already using the llvm version, but this avoids ambiguity).
-
Mark de Wever authored
This was reviewed in https://github.com/llvm/llvm-project/pull/76246
-
mmoadeli authored
[NVPTX] Fix generating permute bytes from register pair when the initial values are undefined (#74437) When generating the permute bytes for the prmt instruction, the existence of an undefined initial value initialises the int32 that holds the mask with all 1's (0xFFFFFFFF). That initialization subsequently leads to complications during the subsequent OR operation, leading to inaccuracies in populating mask values for the following bytes. Consequently, the final value persists as a constant -1, irrespective of the actual mask values that succeed the initial set value.
-
Mark de Wever authored
The documentation CI no longer builds. This is likely introduced by 8f90e693. This fixes the issue.
-
Petr Hosek authored
This contains compiler-rt builtins and llvm-libc for baremetal use. Differential Revision: https://reviews.llvm.org/D155337
-
Louis Dionne authored
This simplifies the IWYU generation script by treating everything as a file, instead of dealing with directories and files separately. This has the downside that the `libcxx.imp` file is a lot larger than it used to be, however we now have the flexibility of mapping files under detail directories to different public headers. For example, this allows us to map <__fwd/subrange.h> to <ranges> but <__fwd/pair.h> to <utility>. This patch also adds basic validation to ensure that we never map a header to a public header that doesn't exist. We may still be missing some mappings or we may be mapping to incorrect headers, but we won't be mapping to headers that downright don't exist. Fixes #63346
-
Louis Dionne authored
This was missed in the patch where I marked the macro as deprecated.
-
Mark de Wever authored
As suggested in #73262 this enable the stream printing on Apple backdeployment targets. This omits the check whether the file is a terminal. This is not entirely conforming, but the differences should be minor and are typically not observable. Fixes https://github.com/llvm/llvm-project/issues/75225
-
Mark de Wever authored
Previously the header included several headers, possibly granularized threading headers. This could lead to build errors when these headers were incompatible with threading disabled. Now test the guard before inclusion. This matches the pattern used for no localization and no wide characters. Fixes: https://github.com/llvm/llvm-project/issues/76620
-
Mark de Wever authored
We discussed the removal of these enable-all macros in the libc++ monthly meeting and we agreed that we should deprecate these macros in LLVM 18, and then remove them in LLVM 19 since they can silently enable deprecated features that are implemented after the first release of the macro. This patch does the first part of this -- it deprecates the macro. Note that the file test/libcxx/depr/enable_removed_cpp20_features.compile.pass.cpp does not exist so this file is not adapted. Since the feature is deprecated and slated for removal soon the missing test is not implemented. Partly addresses: https://github.com/llvm/llvm-project/issues/75976 --------- Co-authored-by:
Louis Dionne <ldionne.2@gmail.com>
-
Yitzhak Mandelbaum authored
Makes value equivalence require that the values have no properties, except in the case of equivalence by pointer equality (if the pointers are equal, nothing else is checked). Fixes issue #76459.
-
Aart Bik authored
-
erichkeane authored
The update directive has its own version of 'self' that has a 'var-list' instead of a 'condition' (like the serial/parallel/kernel/combined constructs). This patch special cases it on 'update' to make sure we parse this correctly.
-
Simon Pilgrim authored
-