- Jul 13, 2021
-
-
Jinsong Ji authored
AIX .file directive support including compiler version string. https://www.ibm.com/docs/en/aix/7.2?topic=ops-file-pseudo-op This patch adds the support so that it will be easier to identify build compiler in objects. Reviewed By: #powerpc, shchenz Differential Revision: https://reviews.llvm.org/D105743
-
David Green authored
-
Joachim Protze authored
The annotations in libomp were never built by default. The annotations are also superseded by the annotations which the OMPT tool libarcher.so provides. With respect to libarcher, libomp behaves as if libarcher would be the last element of OMP_TOOL_LIBARARIES. I.e., if no other OMPT tool gets active, libarcher will check if an OpenMP application is built with TSan. Since libarcher gets loaded by default, enabling LIBOMP_TSAN_SUPPORT would result in redundant annotations for TSan, which slightly differ in details and coverage (e.g. task dependencies are not handled well by the annotations in libomp). This patch removes all TSan annotations from the OpenMP runtime code. Differential Revision: https://reviews.llvm.org/D103767
-
Louis Dionne authored
-
Albion Fung authored
This patch implements trap and FP to and from double conversions. The builtins generate code that mirror what is generated from the XL compiler. Intrinsics are named conventionally with builtin_ppc, but are aliased to provide the same builtin names as the XL compiler. Differential Revision: https://reviews.llvm.org/D103668
-
Fangrui Song authored
Some users use a long list of fixed patterns (PR50404) and O(|patterns|*|symbols|) can be too slow. Such usage typically does not use --regex or --wildcard. We can use a DenseSet<CachedHashStringRef> to optimize name lookups. Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D105218
-
- Jul 12, 2021
-
-
Benjamin Kramer authored
Another follow-up to 0da172b1 compiler-rt/lib/scudo/scudo_tsd_shared.cpp:103:1: error: mutex 'CandidateTSD->Mutex' is not held on every path through here [-Werror,-Wthread-safety-analysis] } ^ compiler-rt/lib/scudo/scudo_tsd_shared.cpp:95:21: note: mutex acquired here CandidateTSD->lock(); ^ compiler-rt/lib/scudo/scudo_tsd_shared.cpp:103:1: error: mutex 'TSD->Mutex' is not held on every path through here [-Werror,-Wthread-safety-analysis] } ^ compiler-rt/lib/scudo/scudo_tsd_shared.cpp:101:8: note: mutex acquired here TSD->lock(); ^ compiler-rt/lib/scudo/scudo_tsd_shared.cpp:103:1: error: mutex 'TSDs[Index].Mutex' is not held on every path through here [-Werror,-Wthread-safety-analysis] } ^ compiler-rt/lib/scudo/scudo_tsd_shared.cpp:80:23: note: mutex acquired here if (TSDs[Index].tryLock()) { ^
-
Benjamin Kramer authored
Looks like an oversight in 0da172b1 compiler-rt/lib/scudo/scudo_tsd_shared.inc:53:1: error: mutex 'TSD->Mutex' is not held on every path through here [-Werror,-Wthread-safety-analysis] } ^ compiler-rt/lib/scudo/scudo_tsd_shared.inc:49:12: note: mutex acquired here if (TSD->tryLock()) ^
-
Philip Reames authored
In review discussion on D104322, Eli and Roman quite reasonable raised concerns about the LangRef not really providing a precise definition for inttoptr/ptrtoint on non-integral types. These had previously been disallowed, but I'd pragmatically allowed them in ac81cb7e. This is my attempt to improve the situation. Differential Revision: https://reviews.llvm.org/D104547
-
Bardia Mahjour authored
We are currently being inconsistent in using signed vs unsigned comparisons for vec_all_* and vec_any_* interfaces that use vector bool types. For example we use signed comparison for vec_all_ge(vector signed char, vector bool char) but unsigned comparison for when the arguments are swapped. GCC and XL use signed comparison instead. This patch makes clang consistent with itself and with XL and GCC. Reviewed By: nemanjai Differential Revision: https://reviews.llvm.org/D105666
-
Vassil Vassilev authored
Original commit message: [clang-repl] Implement partial translation units and error recovery. https://reviews.llvm.org/D96033 contained a discussion regarding efficient modeling of error recovery. @rjmccall has outlined the key ideas: Conceptually, we can split the translation unit into a sequence of partial translation units (PTUs). Every declaration will be associated with a unique PTU that owns it. The first key insight here is that the owning PTU isn't always the "active" (most recent) PTU, and it isn't always the PTU that the declaration "comes from". A new declaration (that isn't a redeclaration or specialization of anything) does belong to the active PTU. A template specialization, however, belongs to the most recent PTU of all the declarations in its signature - mostly that means that it can be pulled into a more recent PTU by its template arguments. The second key insight is that processing a PTU might extend an earlier PTU. Rolling back the later PTU shouldn't throw that extension away. For example, if the second PTU defines a template, and the third PTU requires that template to be instantiated at float, that template specialization is still part of the second PTU. Similarly, if the fifth PTU uses an inline function belonging to the fourth, that definition still belongs to the fourth. When we go to emit code in a new PTU, we map each declaration we have to emit back to its owning PTU and emit it in a new module for just the extensions to that PTU. We keep track of all the modules we've emitted for a PTU so that we can unload them all if we decide to roll it back. Most declarations/definitions will only refer to entities from the same or earlier PTUs. However, it is possible (primarily by defining a previously-declared entity, but also through templates or ADL) for an entity that belongs to one PTU to refer to something from a later PTU. We will have to keep track of this and prevent unwinding to later PTU when we recognize it. Fortunately, this should be very rare; and crucially, we don't have to do the bookkeeping for this if we've only got one PTU, e.g. in normal compilation. Otherwise, PTUs after the first just need to record enough metadata to be able to revert any changes they've made to declarations belonging to earlier PTUs, e.g. to redeclaration chains or template specialization lists. It should even eventually be possible for PTUs to provide their own slab allocators which can be thrown away as part of rolling back the PTU. We can maintain a notion of the active allocator and allocate things like Stmt/Expr nodes in it, temporarily changing it to the appropriate PTU whenever we go to do something like instantiate a function template. More care will be required when allocating declarations and types, though. We would want the PTU to be efficiently recoverable from a Decl; I'm not sure how best to do that. An easy option that would cover most declarations would be to make multiple TranslationUnitDecls and parent the declarations appropriately, but I don't think that's good enough for things like member function templates, since an instantiation of that would still be parented by its original class. Maybe we can work this into the DC chain somehow, like how lexical DCs are. We add a different kind of translation unit `TU_Incremental` which is a complete translation unit that we might nonetheless incrementally extend later. Because it is complete (and we might want to generate code for it), we do perform template instantiation, but because it might be extended later, we don't warn if it declares or uses undefined internal-linkage symbols. This patch teaches clang-repl how to recover from errors by disconnecting the most recent PTU and update the primary PTU lookup tables. For instance: ```./clang-repl clang-repl> int i = 12; error; In file included from <<< inputs >>>:1: input_line_0:1:13: error: C++ requires a type specifier for all declarations int i = 12; error; ^ error: Parsing failed. clang-repl> int i = 13; extern "C" int printf(const char*,...); clang-repl> auto r1 = printf("i=%d\n", i); i=13 clang-repl> quit ``` Differential revision: https://reviews.llvm.org/D104918
-
Bradley Smith authored
Let other parts of legalization handle the rest of the node, this allows re-use of existing optimizations elsewhere. Differential Revision: https://reviews.llvm.org/D105624
-
Nico Weber authored
No behavior change, but ld64 can't load .tbd files without the trailing `...`, so include them to make it easier to run tests with l64 too.
-
Louis Dionne authored
This is what ffccf96e should have enabled, however the symlink in the Docker image was not pointing to the right compiler, so we were testing with Clang 12 instead of ToT.
-
Sanjay Patel authored
More coverage for: D105730
-
Dmitry Vyukov authored
__m128i is vector SSE type used in tsan. It's handy to be able to print it for debugging. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D102167
-
Simon Tatham authored
No implementation uses the `LocCookie` parameter at all. Errors are reported from inside that function by `llvm::SourceMgr`, and the instance of that at the clang call site arranges to pass the error messages back to a `ClangAsmParserCallback`, which is where the clang SourceLocation for the error is computed. (This is part of a patch series working towards the ability to make SourceLocation into a 64-bit type to handle larger translation units. But this particular change seems beneficial in its own right.) Reviewed By: miyuki Differential Revision: https://reviews.llvm.org/D105490
-
Abbas Sabra authored
Reviewed By: vsavchenko Differential Revision: https://reviews.llvm.org/D102273
-
Benjamin Kramer authored
AArch64ISelLowering.cpp:15167:8: warning: unused variable 'OpCode' [-Wunused-variable] auto OpCode = N->getOpcode(); ^ -
Louis Dionne authored
-
Felix Berger authored
Structured bindings can currently trigger the check and lead to a wrong fix. Because the DecompositionDecl itself is not used and the check does not iterate through its the decl's bindings to verify whether the bindings' holding vars are used this leads to the whole statement to be deleted. To support structured bindings properly 3 cases would need to be considered. 1. All holding vars are not used -> The statement can be deleted. 2. All holding vars are used as const or not used -> auto can be converted to const auto&. 3. Neither case is true -> leave unchanged. In the check we'll have to separate the logic that determines this from the code that produces the diagnostic and fixes and first determine which of the cases we're dealing with before creating fixes. Since this is a bigger refactoring we'll disable structured bindings for now to prevent incorrect fixes. Differential Revision: https://reviews.llvm.org/D105727 Reviewed-by: ymandel
-
Dmitry Vyukov authored
The memcpy interceptor is the only one that uses COMMON_INTERCEPTOR_ENTER more than once in a single function. This does not allow COMMON_INTERCEPTOR_ENTER to use labels, because they are global for the whole function (not block scoped). Don't include COMMON_INTERCEPTOR_ENTER code twice. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D105774
-
Raphael Isemann authored
The implementation converts the pointer/size pair anyway back to ArrayRef.
-
Frederik Gossen authored
Make the function `copyUnrankedDescriptors` accessible in `ConvertToLLVMPattern`. Differential Revision: https://reviews.llvm.org/D105810
-
Cullen Rhodes authored
First patch in a series adding MC layer support for the Arm Scalable Matrix Extension. This patch adds the following features: sme, sme-i64, sme-f64 The sme-i64 and sme-f64 flags are for the optional I16I64 and F64F64 features. If a target supports I16I64 then the following instructions are implemented: * 64-bit integer ADDHA and ADDVA variants (D105570). * SMOPA, SMOPS, SUMOPA, SUMOPS, UMOPA, UMOPS, USMOPA, and USMOPS instructions that accumulate 16-bit integer outer products into 64-bit integer tiles. If a target supports F64F64 then the FMOPA and FMOPS instructions that accumulate double-precision floating-point outer products into double-precision tiles are implemented. Outer products are implemented in D105571. The reference can be found here: https://developer.arm.com/documentation/ddi0602/2021-06 Reviewed By: CarolineConcatto Differential Revision: https://reviews.llvm.org/D105569 -
Michael Liao authored
-
Jonas Paulsson authored
Don't use a local MachineOperand copy in SystemZAsmPrinter::PrintAsmOperand() and change the register as it may break the MRI tracking of register uses. Use an MCOperand instead. Review: Ulrich Weigand Differential Revision: https://reviews.llvm.org/D105757
-
Sanjay Patel authored
This is the pattern from the description of: https://llvm.org/PR50816 There might be a way to generalize this to a smaller or more generic pattern, but I have not found it yet. https://alive2.llvm.org/ce/z/ShzJoF define i1 @src(i8 %x) { %add = add i8 %x, -1 %xor = xor i8 %x, -1 %and = and i8 %add, %xor %r = icmp slt i8 %and, 0 ret i1 %r } define i1 @tgt(i8 %x) { %r = icmp eq i8 %x, 0 ret i1 %r }
-
Sanjay Patel authored
PR50816
-
Tobias Gysi authored
Annotate LinalgNamedStructuredOps.yaml with a comment stating the file is auto-generated and should not be edited manually. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D105809
-
Simon Pilgrim authored
Update truncation costs based on the worst case costs from the script in D103695. Move to using legalized types wherever possible, which allows us to prune the cost tables.
-
Nico Weber authored
-
David Green authored
This sets the latency of stores to 1 in the Cortex-A55 scheduling model, to better match the values given in the software optimization guide. The latency of a store in normal llvm scheduling does not appear to have a lot of uses. If the store has no outputs then the latency is somewhat meaningless (and pre/post increment update operands use the WriteAdr write for those operands instead). The one place it does alter things is the latency between a store and the end of the scheduling region, which can in turn have an effect on the critical path length. As a result a latency of 1 is more correct and offers ever-so-slightly better scheduling of instructions near the end of the block. They are marked as RetireOOO to keep the llvm-mca from introducing stalls where non would exist. Differential Revision: https://reviews.llvm.org/D105541
-
Nico Weber authored
-
Corentin Jabot authored
Support Narrowing conversions to bool in if constexpr condition under C++23 language mode. Only if constexpr is implemented as the behavior of static_assert is already conforming. Still need to work on explicit(bool) to complete support.
-
Dmitry Vyukov authored
https://reviews.llvm.org/D105716 enabled thread safety annotations, and that broke 32-bit build: https://green.lab.llvm.org/green/job/lldb-cmake/33604/consoleFull#-77815080549ba4694-19c4-4d7e-bec5-911270d8a58c 1. Enable thread-safety analysis in unit tests (this catches the breakage even in 64-bit mode). 2. Add NO_THREAD_SAFETY_ANALYSIS to sanitizer_allocator_primary32.h to unbreak the build. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D105808
-
Aaron Ballman authored
It was broken three days ago by the changes in D95561.
-
Med Ismail Bennani authored
This patch fixes process event handling when the events are broadcasted at launch. To do so, the patch introduces a new listener to fetch events by hand off the event queue and then resending them ensure the event ordering. Differental Revision: https://reviews.llvm.org/D105698 Signed-off-by:
Med Ismail Bennani <medismail.bennani@gmail.com>
-
Yevgeny Rouban authored
This new test demonstrates a case where a base ptr is generated twice for the same value: the first one is generated while the gc.get.pointer.base() is inlined, the second is generated for the statepoint. This happens because the methods inlineGetBaseAndOffset() and insertParsePoints() do not share their defining value cache used by the findBasePointer() method. Reviewed By: reames Differential Revision: https://reviews.llvm.org/D103240
-
Yevgeny Rouban authored
This new test demonstrates a case where a base ptr is generated twice for the same value: the first one is generated while the gc.get.pointer.base() is inlined, the second is generated for the statepoint. This happens because the methods inlineGetBaseAndOffset() and insertParsePoints() do not share their defining value cache used by the findBasePointer() method. Reviewed By: reames Differential Revision: https://reviews.llvm.org/D103238
-