- Mar 03, 2021
-
-
Jonas Paulsson authored
When a large "irregular" (e.g. i96) integer call argument is converted to indirect, 64-bit parts are stored to the stack. The full stack space (e.g. i128) was not allocated prior to this patch, but rather just the exact space of the original type. This caused neighboring values on the stack to be overwritten. Thanks to Josh Stone for reporting this. Review: Ulrich Weigand Fixes https://bugs.llvm.org/show_bug.cgi?id=49322 Differential Revision: https://reviews.llvm.org/D97514
-
Peter Steinfeld authored
It's possible to define a procedure whose interface depends on a procedure which has an interface that depends on the original procedure. Such a circular definition was causing the compiler to fall into an infinite loop when resolving the name of the second procedure. It's also possible to create circular dependency chains of more than two procedures. I fixed this by adding the function HasCycle() to the class DeclarationVisitor and calling it from DeclareProcEntity() to detect procedures with such circularly defined interfaces. I marked the associated symbols of such procedures by calling SetError() on them. When processing subsequent procedures, I called HasError() before attempting to analyze their interfaces. Unfortunately, this did not work. With help from Tim, we determined that the SymbolSet used to track the erroneous symbols was instantiated using a "<" operator which was defined using the location of the name of the procedure. But the location of the procedure name was being changed by a call to ReplaceName() between the times that the calls to SetError() and HasError() were made. This caused HasError() to incorrectly report that a symbol was not in the set of erroneous symbols. I fixed this by changing SymbolSet to be an unordered set that uses the contents of the name of the symbol as the basis for its hash function. This works because the contents of the name of the symbol is preserved by ReplaceName() even though its location changes. I also fixed the error message used when reporting recursively defined dummy procedure arguments by removing extra apostrophes and sorting the list of symbols. I also added tests that will crash the compiler without this change. Note that the "<" operator is used in other contexts, for example, in the map of characterized procedures, maps of items in equivalence sets, maps of structure constructor values, ... All of these situations happen after name resolution has been completed and all calls to ReplaceName() have already happened and thus are not subject to the problem I ran into when ReplaceName() was called when processing procedure entities. Note also that the implementation of the "<" operator uses the relative location in the cooked character stream as the basis of its implementation. This is potentially problematic when symbols from diffent compilation units (for example symbols originating in .mod files) are put into the same map since their names will appear in two different source streams which may not be allocated in the same relative positions in memory. But I was unable to create a test that caused a problem. Using a direct comparison of the content of the name of the symbol in the "<" operator has problems. Symbols in enclosing or parallel scopes can have the same name. Also using the location of the symbol in the cooked character stream has the advantage that it preserves the the order of the symbols in a structure constructor constant, which makes matching the values with the symbols relatively easy. This patch supersedes D97749. Differential Revision: https://reviews.llvm.org/D97774
-
Nico Weber authored
-
Joe Nash authored
Make OMod explicit instead of implied by HasModifiers in the operand list. Requires explicitly setting HasOMod=1 for irregular OMod usage in instruction V_CVT_{U,I}* Reviewed By: foad Differential Revision: https://reviews.llvm.org/D97587 Change-Id: I230e1476f529e816eec60e242531f23a99e3839f -
Martin Storsjö authored
If the destructor is trivial (_LIBCPP_HAS_TRIVIAL_CONDVAR_DESTRUCTION, the constructor always is), the compiler warns about the std::condition_variable being unused. Add a cast to void to silence the warning about the object being unused. Differential Revision: https://reviews.llvm.org/D97540
-
Andrzej Warzynski authored
-
Louis Dionne authored
Several contributors have been asking me how to reproduce the CI environment locally. This is the last step towards making that work out-of-the-box. Basically, just run `libcxx/utils/ci/run-buildbot-container` and you're good to go. Differential Revision: https://reviews.llvm.org/D97782
-
Jez Ng authored
Fix regression where we aren't passing `-platform_version` to new ld64.lld after {D95204}. Most of the changes were originally in D95204, but I backed them out due to test failures on builds which have `CLANG_DEFAULT_LINKER=lld`. The tests are properly updated in this diff. Reviewed By: #lld-macho, thakis Differential Revision: https://reviews.llvm.org/D97741 -
Arnamoy Bhattacharyya authored
This patch provides a fix for the `fdefault-*` family in f18 (Please consult `D96344` for details) Differential Revision: https://reviews.llvm.org/D97724
-
Vy Nguyen authored
[lld-macho] Change loadReexport to handle the case where a TAPI re-exports to reference documents nested within other TBD. Currently, it was delibrately impleneted to not handle this case, but as it has turnt out, we need this feature. The concrete use case is `System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa` reexports /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit , which then rexports /System/Library/PrivateFrameworks/UIFoundation.framework/Versions/A/UIFoundation The current implemention uses a global currentTopLevelTapi, which is not reset until it finishes loading the whole tree. This is a problem because if the top-level is set to Cocoa, then when we get to UIFoundation, it will try to find UIFoundation in the current top level, which is Cocoa and will not find it. The right thing should be: - When loading a library from a TBD file, re-exports need to be looked up in the auxiliary documents within the same TBD. - When loading from an actual dylib, no additional TBD documents need to be examined. - In no case does a re-export mentioned in one TBD file need to be looked up in a document in an auxiliary document from a different TBD file Differential Revision: https://reviews.llvm.org/D97438 -
Krzysztof Parzyszek authored
There is a function attribute 'nomerge' in addition to 'noduplicate' and 'convergent'. Both 'noduplicate' and 'convergent' have corresponding intrinsic properties. This patch adds an intrinsic property for the 'nomerge' attribute. Differential Revision: https://reviews.llvm.org/D96364
-
Utkarsh Saxena authored
The ASAN failure was fixed by https://github.com/llvm/llvm-project/commit/bf935a034b345e905907c80030c67ef8f737d56a. This reverts commit 7f086d74.
-
Fraser Cormack authored
This patch enables support for lowering INSERT_VECTOR_ELT on fixed-length vector types. The strategy follows that for scalable vector types. This patch also includes a quick fix to prevent the compiler infinitely looping between lowering BUILD_VECTOR as VECTOR_SHUFFLE and back again. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D97698
-
Sam McCall authored
Browsing macro-generated symbols is confusing. On the one hand, it seems very *useful* to be able to see the summary of symbols that were generated. On the other hand, some macros spew a lot of confusing symbols into the namespace and when used repeatedly (ABSL_FLAG) can create a lot of spam that's hard to navigate. Design constraints: - the macro expansion tree need not align with the AST, though it often does in practice. We address this by defining the nesting based on the *primary* location of decls, rather than their ranges. - DocumentSymbol.children[*].range should nest within DocumentSymbol.range (This constraint is not in LSP "breadcrumbs" breaks without it) We adjust macro ranges so they cover their "children", rather than just the macro expansion - LSP does not have a "macro expansion" symbolkind, nor does it allow a symbol to have no kind. I've arbitrarily picked "null" as this is unlikely to conflict with anything useful. This patch makes all macros and children visible for simplicity+consistency, though in some cases it may be better to elide the macro node. We may consider adding heuristics for this in future (e.g. when it expands to one decl only?) but it doesn't seem clear-cut to me. Differential Revision: https://reviews.llvm.org/D97615
-
Alexey Bataev authored
-
dfukalov authored
For the cases of two clobbering loads and one loaded object is fully contained in the second `BasicAAResult::aliasGEP` returns just `PartialAlias` that is actually more common case of partial overlap, it doesn't say anything about actual overlapping sizes. AA users such as GVN and DSE have no functionality to estimate aliasing of GEPs with non-constant offsets. The change stores estimated relative offsets so they can be used further. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D93529
-
- Mar 02, 2021
-
-
Thomas Preud'homme authored
__builtin_isinf currently generates a floating-point compare operation which triggers a trap when faced with a signaling NaN in StrictFP mode. This commit uses integer operations instead to not generate any trap in such a case. Reviewed By: mibintc Differential Revision: https://reviews.llvm.org/D97125
-
Jingu Kang authored
-
Jan Kratochvil authored
-
Jan Kratochvil authored
-
Sam McCall authored
Don't show negative numbers Don't show numbers <10 (hex is the same as decimal) Show numeric enum values in hex too Differential Revision: https://reviews.llvm.org/D97226
-
Nico Weber authored
-
Nico Weber authored
-
Nico Weber authored
-
Utkarsh Saxena authored
CodeCompletionContext::Kind has 36 Kinds. The completion model used to support categorical features of 32 cardinality. Due to this clangd tests were failing asan tests due to overflow. This patch makes the completion model support 64 cardinality of categorical features by storing ENUM Features as uint64_t instead of uint32_t. Verified that this fixes the asan failures. Latency: 6.7ms (old) VS 6.8ms (new) per 1000 predictions. Differential Revision: https://reviews.llvm.org/D97770
-
Alexey Bataev authored
If the mapped structure has data members, which have 'default' mappers, need to map these members individually using their 'default' mappers. Differential Revision: https://reviews.llvm.org/D92195
-
Tim Northover authored
AArch64.td got it right, but the target-parser dropped it, leading to missing feature flags in Clang.
-
Simon Pilgrim authored
-
Simon Pilgrim authored
-
Andrzej Warzynski authored
This reverts commit 93c5e6bb. This patch updates resolve102.f90 which is now failing in 6 out 8 of our public buildbots: * http://lab.llvm.org:8011/#/builders/21/builds/9625 * http://lab.llvm.org:8011/#/builders/134/builds/2395 * http://lab.llvm.org:8011/#/builders/79/builds/6298 * http://lab.llvm.org:8011/#/builders/66/builds/2084 * http://lab.llvm.org:8011/#/builders/135/builds/2485 * http://lab.llvm.org:8011/#/builders/32/builds/3551 Please see the following revisions for more context: * https://reviews.llvm.org/D97201 * https://reviews.llvm.org/D97749
-
Sam McCall authored
-
Alexey Bataev authored
It is possible to merge reuse and reorder shuffles and reduce the total cost of the vectorization tree/number of final instructions. Differential Revision: https://reviews.llvm.org/D94992
-
Stefan Gränitz authored
-
Frederik Gossen authored
Some elementwise operations are not scalarizable, vectorizable, or tensorizable. Split `ElementwiseMappable` trait into the following, more precise traits. - `Elementwise` - `Scalarizable` - `Vectorizable` - `Tensorizable` This allows for reuse of `Elementwise` in dialects like HLO. Differential Revision: https://reviews.llvm.org/D97674
-
Sanjay Patel authored
This prepares codegen for a change that will remove the identical folds from IR because they are not poison-safe. See D93065 / D97360 for details. We already generically support scalar types, and there are various target-specific transforms that overlap the vector folds. For example, x86 recognizes the and patterns, but not or. We can end up with 1 extra instruction there, but I think that is still preferred over the blendv alternative that loads a constant vector. If this is not optimal, then it should be fixed with a later transform (this change is not expected to result in any regressions because InstCombine currently does the same thing). Removing custom code and supporting undefs in constant-pattern-matching can be follow-up changes. Differential Revision: https://reviews.llvm.org/D97730
-
Jan Kratochvil authored
LLDB has been failing on binaries produced by new GCC 11.0 with -gdwarf-5. Differential Revision: https://reviews.llvm.org/D97721
-
Stefan Gränitz authored
-
Stefan Gränitz authored
-
Stefan Gränitz authored
-
Stefan Gränitz authored
lli aims to provide both, RuntimeDyld and JITLink, as the dynamic linkers/loaders for it's JIT implementations. And they both offer debugging via the GDB JIT interface, which builds on the two well-known symbol names `__jit_debug_descriptor` and `__jit_debug_register_code`. As these symbols must be unique accross the linked executable, we can only define them in one of the libraries and make the other depend on it. OrcTargetProcess is a minimal stub for embedding a JIT client in remote executors. For the moment it seems reasonable to have the definition there and let ExecutionEngine depend on it, until we find a better solution. This is the second commit for the reviewed patch. Reviewed By: lhames Differential Revision: https://reviews.llvm.org/D97339
-