- Sep 09, 2020
-
-
Puyan Lotfi authored
warning: type qualifiers ignored on cast result type [-Wignored-qualifiers] Differential Revision: https://reviews.llvm.org/D86952
-
Sergej Jaskiewicz authored
The TempDir.path() member function returns a StringRef. We've been calling the data() method on that StringRef, which does not guarantee to return a null-terminated string (required by chdir and other POSIX functions). Introduce the c_str() method in the TempDir class, which returns the proper string without the need to create a copy of the path at use site.
-
Craig Topper authored
This was a missed simplication in D87200
-
Ryan Prichard authored
Define a _LIBUNWIND_USE_DL_ITERATE_PHDR macro in config.h when there is no other unwind info lookup method. Also define a _LIBUNWIND_USE_DL_UNWIND_FIND_EXIDX macro to factor out (__BIONIC__ and _LIBUNWIND_ARM_EHABI). Differential Revision: https://reviews.llvm.org/D86768
-
David Blaikie authored
Since a function might have portions of its code coming from multiple different files, "start line" is ambiguous (it can't just be resolved relative to the file/line specified). Add start file to disambiguate it.
-
Craig Topper authored
[SelectionDAGBuilder] Pass fast math flags to getNode calls rather than trying to set them after the fact.: This removes the after the fact FMF handling from D46854 in favor of passing fast math flags to getNode. This should be a superset of D87130. This required adding a SDNodeFlags to SelectionDAG::getSetCC. Now we manage to contant fold some stuff undefs during the initial getNode that we don't do in later DAG combines. Differential Revision: https://reviews.llvm.org/D87200
-
Nate Voorhies authored
Body of unrolled loop was missing opening bracket. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D87329
-
Rahul Joshi authored
- Introduce a new BlockRange class to represent range of blocks (constructible from an ArrayRef<Block *> or a SuccessorRange); - Change Operation::create() methods to use TypeRange for result types, ValueRange for operands and BlockRange for successors. Differential Revision: https://reviews.llvm.org/D86985
-
Krzysztof Parzyszek authored
Failing example: v8i8 = truncate v8i32. v8i8 is legal, but v8i32 was widened to HVX. Make sure that v8i8 does not get altered (even if it's changed to another legal type).
-
Vitaly Buka authored
Used for https://github.com/google/sanitizers/issues/1193 Reviewed By: morehouse Differential Revision: https://reviews.llvm.org/D86933
-
Vitaly Buka authored
Fixes https://github.com/google/sanitizers/issues/1193. AsanChunk can be uninitialized yet just after return from the secondary allocator. If lsan starts scan just before metadata assignment it can fail to find corresponding AsanChunk. It should be safe to ignore this and let lsan to assume that AsanChunk is in the beginning of the block. This block is from the secondary allocator and created with mmap, so it should not contain any pointers and will make lsan to miss some leaks. Similar already happens for primary allocator. If it can't find real AsanChunk it falls back and assume that block starts with AsanChunk. Then if the block is already returned to allocator we have garbage in AsanChunk and may scan dead memory hiding some leaks. I'll fix this in D87135. Reviewed By: morehouse Differential Revision: https://reviews.llvm.org/D86931
-
Walter Erquinigo authored
This reverts commit 5b2b4f33. This caused a link error in http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/18794/steps/build/logs/stdio
-
Yaxun (Sam) Liu authored
Differential Revision: https://reviews.llvm.org/D87324
-
Saleem Abdulrasool authored
Extract a simple check to check if a `RecordDecl` is a `CFError` Decl. This is a simple refactoring to prepare for an upcoming change. NFC. Patch is extracted from https://github.com/llvm/llvm-project-staging/commit/8afaf3aad2af43cfedca7a24cd817848c4e95c0c.
-
Paul C. Anagnostopoulos authored
add release note
-
Nikita Popov authored
Implement known bits for the min/max intrinsics based on the recently added KnownBits primitives.
-
Nikita Popov authored
We already have test coverage for the underlying calculation, this just checked that the folding is wired up...
-
Walter Erquinigo authored
The test is being disabled on Linux, as lldb-vscode has a bug with --wait-for on LInux. I'm also fixing some compilation warnings.
-
David Stenberg authored
The get{Return,Unwind,Unreachable}Block functions in UnifyFunctionExitNodes have not been used for many years, so just remove them. Reviewed By: bjope Differential Revision: https://reviews.llvm.org/D87078 -
Andrew Ng authored
MarkLive::scanEhFrameSection is used to retain personality/LSDA functions when --gc-sections is enabled. Improve its performance by only iterating over the .eh_frame relocations that need to be resolved for an EhSectionPiece. This optimization makes the same assumption as elsewhere in LLD that the .eh_frame relocations are sorted by r_offset. This appears to be a performance regression introduced in commit e6c24299 (https://reviews.llvm.org/D59800). This change has been seen to reduce link time by up to ~50%. Differential Revision: https://reviews.llvm.org/D87245
-
Alexander Shaposhnikov authored
This diff adds a test which checks the error-message when multiple input files are passed to llvm-install-name-tool. Test plan: make check-all Differential revision: https://reviews.llvm.org/D87268
-
Azharuddin Mohammed authored
- Fix it to work on Apple Silicon - Add testcases for simulators running on Apple Silicon
-
Nikita Popov authored
If the abs is poisoning, this is already folded to true/false. For non-poisoning abs, we can convert this to a comparison with the operand.
-
Nikita Popov authored
-
Nikita Popov authored
If we know that the abs operand is known negative, we can replace it with a neg. To avoid computing known bits twice, I've removed the fold for the non-negative case from InstSimplify. Both the non-negative and the negative case are handled by InstCombine now, with one known bits call. Differential Revision: https://reviews.llvm.org/D87196
-
Xun Li authored
D66230 attempted to fix a problem where when there are allocas used before CoroBegin. It keeps allocas and their uses stay in put if there are no escapse/changes to the data before CoroBegin. Unfortunately that's incorrect. Consider this code: %var = alloca i32 %1 = getelementptr .. %var; stays put %f = call i8* @llvm.coro.begin store ... %1 After this fix, %1 will now stay put, however if a store happens after coro.begin and hence modifies the content, this change will not be reflected in the coroutine frame (and will eventually be DCEed). To generalize the problem, if any alias ptr is created before coro.begin for an Alloca and that alias ptr is latter written into after coro.begin, it will lead to incorrect behavior. There are also a few other minor issues, such as incorrect dominate condition check in the ptr visitor, unhandled memory intrinsics and etc. Ths patch attempts to fix some of these issue, and make it more robust to deal with aliases...
-
Craig Topper authored
SSE4_1 and SSE4_2 due imply SSSE3. So I guess I got confused when switching the code to being table based in D83273. Fixes PR47464
-
Paul C. Anagnostopoulos authored
-
Ties Stuij authored
This reverts commit 514df1b2. Some of the buildbots got llvm-lit errors on CodeGen/volatile.c
-
Simon Pilgrim authored
-
Simon Pilgrim authored
Add APInt forward declaration and move include to RISCVMatInt.cpp
-
Fangrui Song authored
D28596 added SANITIZER_INTERFACE_WEAK_DEF which can guarantee `*_default_options` are always defined. The weak attributes on the `__{asan,lsan,msan,ubsan}_default_options` declarations can thus be removed. `MaybeCall*DefaultOptions` no longer need nullptr checks, so their call sites can just be replaced by `__*_default_options`. Reviewed By: #sanitizers, vitalybuka Differential Revision: https://reviews.llvm.org/D87175 -
Mehdi Amini authored
Differential Revision: https://reviews.llvm.org/D87177
-
Krzysztof Parzyszek authored
-
Ties Stuij authored
This patch resumes the work of D16586. According to the AAPCS, volatile bit-fields should be accessed using containers of the widht of their declarative type. In such case: ``` struct S1 { short a : 1; } ``` should be accessed using load and stores of the width (sizeof(short)), where now the compiler does only load the minimum required width (char in this case). However, as discussed in D16586, that could overwrite non-volatile bit-fields, which conflicted with C and C++ object models by creating data race conditions that are not part of the bit-field, e.g. ``` struct S2 { short a; int b : 16; } ``` Accessing `S2.b` would also access `S2.a`. The AAPCS Release 2020Q2 (https://documentation-service.arm.com/static/5efb7fbedbdee951c1ccf186?token=) section 8.1 Data Types, page 36, "Volatile bit-fields - preserving number and width of container accesses" has been updated to avoid conflict with the C++ Memory Model. Now it reads in the note: ``` This ABI does not place any restrictions on the access widths of bit-fields where the container overlaps with a non-bit-field member or where the container overlaps with any zero length bit-field placed between two other bit-fields. This is because the C/C++ memory model defines these as being separate memory locations, which can be accessed by two threads simultaneously. For this reason, compilers must be permitted to use a narrower memory access width (including splitting the access into multiple instructions) to avoid writing to a different memory location. For example, in struct S { int a:24; char b; }; a write to a must not also write to the location occupied by b, this requires at least two memory accesses in all current Arm architectures. In the same way, in struct S { int a:24; int:0; int b:8; };, writes to a or b must not overwrite each other. ``` Patch D16586 was updated to follow such behavior by verifying that we only change volatile bit-field access when: - it won't overlap with any other non-bit-field member - we only access memory inside the bounds of the record - avoid overlapping zero-length bit-fields. Regarding the number of memory accesses, that should be preserved, that will be implemented by D67399. Differential Revision: https://reviews.llvm.org/D72932 The following people contributed to this patch: - Diogo Sampaio - Ties Stuij -
-
Heejin Ahn authored
When the function return type is non-void and `end` instructions are at the very end of a function, CFGStackify's `fixEndsAtEndOfFunction` function fixes the corresponding block/loop/try's type to match the function's return type. This is applied to consecutive `end` markers at the end of a function. For example, when the function return type is `i32`, ``` block i32 ;; return type is fixed to i32 ... loop i32 ;; return type is fixed to i32 ... end_loop end_block end_function ``` But try-catch is a little different, because it consists of two parts: a try part and a catch part, and both parts' return type should satisfy the function's return type. Which means, ``` try i32 ;; return type is fixed to i32 ... block i32 ;; this should be changed i32 too! ... end_block catch ... end_try end_function ``` As you can see in this example, it is not sufficient to only `end` instructions at the end of a function; in case of `try`, we should check instructions before `catch`es, in case their corresponding `try`'s type has been fixed. This changes `fixEndsAtEndOfFunction`'s algorithm to use a worklist that contains a reverse iterator, each of which is a starting point for a new backward `end` instruction search. Fixes https://bugs.llvm.org/show_bug.cgi?id=47413. Reviewed By: dschuff, tlively Differential Revision: https://reviews.llvm.org/D87207 -
Simon Pilgrim authored
We only need to include MachineInstrBundle.h, but exposes an implicit dependency in MachineOutliner.h. Also, remove duplicate includes from LiveRegUnits.cpp + MachineOutliner.cpp.
-
Lubomir Litchev authored
Currently, there is no option to allow for unrolling a loop up to a specific factor (specified by the user). The code for doing that is there and there are benefits when unrolling is done to smaller loops (smaller than the factor specified). Reviewed By: bondhugula Differential Revision: https://reviews.llvm.org/D87111
-
Heejin Ahn authored
Without this, builds with `-DBUILD_SHARED_LIBS=ON` fail.
-