- Sep 09, 2020
-
-
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.
-
- Sep 08, 2020
-
-
Ronak Chauhan authored
Decode AMDGPU Kernel descriptors as assembler directives. Reviewed By: scott.linder, jhenderson, kzhuravl Differential Revision: https://reviews.llvm.org/D80713
-
mydeveloperday authored
In some situation shifts can be treated as a template, and is thus formatted as one. So, by doing a couple extra checks to assure that the condition doesn't contain a template, and is in fact a bit shift should solve this problem. This is a fix for [[ https://bugs.llvm.org/show_bug.cgi?id=46969 | bug 46969 ]] Reviewed By: MyDeveloperDay Patch By: Saldivarcher Differential Revision: https://reviews.llvm.org/D86581
-
Louis Dionne authored
-
Louis Dionne authored
Previously, we'd only print the features added through the new config, however printing all the features is important for debugging purposes.
-
Jonas Paulsson authored
On SystemZ, a ZERO_EXTEND of an i1 vector handled by WidenVecRes_Convert() always ended up being scalarized, because the type action of the input is promotion which was previously an unhandled case in this method. This fixes https://bugs.llvm.org/show_bug.cgi?id=47132. Differential Revision: https://reviews.llvm.org/D86268 Patch by Eli Friedman. Review: Ulrich Weigand
-
Haojian Wu authored
-
Hans Wennborg authored
This caused more warnings than expected, see https://crbug.com/1126019 Also reverts the follow-up 7907e551. > Differential Revision: https://reviews.llvm.org/D86369
-
Nico Weber authored
-
Nico Weber authored
-
Florian Hahn authored
This slightly bumps the walker limit so that it covers more cases while not increasing compile-time too much: http://llvm-compile-time-tracker.com/compare.php?from=0fc1c2b51ba0cfb9145139af35be638333865251&to=91144a50ea4fa82c0c877e77784f60371640b263&stat=instructions
-
Sam Parker authored
-
Benjamin Kramer authored
VectorToSCF.cpp:515:47: error: specialization of 'template<class TransferOpTy> mlir::LogicalResult mlir::VectorTransferRewriter<TransferOpTy>::matchAndRewrite(mlir::Operation*, mlir::PatternRewriter&) const' in different namespace [-fpermissive]
-
Haojian Wu authored
Introduce a new diagnostic, and respect the bracket-depth (256) by default. Differential Revision: https://reviews.llvm.org/D86936
-
Frank Derry Wanye authored
The altera struct pack align lint check finds structs that are inefficiently packed or aligned and recommends packing/aligning of the structs using the packed and aligned attributes as needed in a warning.
-
Sanjay Patel authored
-
Denys Petrov authored
Change capitalization of some names due to LLVM naming rules. Change names of some variables to make them more speaking. Rework similar bug reports into one common function. Prepare code for the next patches to reduce unrelated changes. Differential Revision: https://reviews.llvm.org/D87138
-
Raul Tambre authored
LLVM has bumped the minimum required CMake version to 3.13.4, so this has become dead code. Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D87189
-
Ehsan Toosi authored
A crash could happen due to copy removal. The bug is fixed and two more test cases are added. Differential Revision: https://reviews.llvm.org/D87128
-
Benjamin Kramer authored
Put back anonymous namespace to work around GCC5 bug. VectorToSCF.cpp:241:61: error: specialization of 'template<class ConcreteOp> mlir::LogicalResult {anonymous}::NDTransferOpHelper<ConcreteOp>::doReplace()' in different namespace [-fpermissive] -
Simon Pilgrim authored
Discussed with @craig.topper and @spatel - this is to try and tidyup the codegen folder and move the x86 specific tests (as opposed to general tests that just happen to use x86 triples) into subfolders. Its up to other targets if they follow suit. It also helps speed up test iterations as using wildcards on lit commands often misses some filenames.
-
Simon Pilgrim authored
Fix clang-tidy warnings by ensuring auto variables are more cleanly qualified, or just avoid auto entirely.
-
Simon Pilgrim authored
Fix clang-tidy warnings by ensuring auto variables are more cleanly qualified, or just avoid auto entirely.
-
Xing GUO authored
This patch makes the debug_ranges section optional. When we specify an empty debug_ranges section, yaml2obj only emits the section header. Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D87263
-
Ehsan Toosi authored
BufferPlacement has been removed, as allocations are no longer placed during the conversion. Differential Revision: https://reviews.llvm.org/D87079
-
Simon Pilgrim authored
Fixes issue noticed by static analysis where we have a copy+paste typo, testing ScheduleKind.M1 twice instead of ScheduleKind.M2. Differential Revision: https://reviews.llvm.org/D87250
-
Benjamin Kramer authored
While there - De-templatify code that can use function_ref - Make BoundCaptures usable when they're const - Address post-submit review comment (static function into global namespace)
-
Eduardo Caldas authored
* Do not visit `CXXDefaultArgExpr` * To build `CallArguments` nodes, just go through non-default arguments Differential Revision: https://reviews.llvm.org/D87249
-
Eduardo Caldas authored
Differential Revision: https://reviews.llvm.org/D87229
-
Eduardo Caldas authored
Differential Revision: https://reviews.llvm.org/D86700
-
Eduardo Caldas authored
Differential Revision: https://reviews.llvm.org/D86699
-
Jakub Lichman authored
-
Sam Tebbs authored
count register After my patch at D86087, code that now uses the mov operand rather than the vctp operand will no longer remove modifications to the vctp operand as they should. This patch fixes that by explicitly removing modifications to the vctp operand rather than the register used as the element count.
-
Qiu Chaofan authored
This reverts commit 3c0b3250, (along with ea795304 and bb39eb9e) since it breaks test with UB sanitizer.
-