- Dec 01, 2021
-
-
Greg Clayton authored
Symbol table parsing has evolved over the years and many plug-ins contained duplicate code in the ObjectFile::GetSymtab() that used to be pure virtual. With this change, the "Symbtab *ObjectFile::GetSymtab()" is no longer virtual and will end up calling a new "void ObjectFile::ParseSymtab(Symtab &symtab)" pure virtual function to actually do the parsing. This helps centralize the code for parsing the symbol table and allows the ObjectFile base class to do all of the common work, like taking the necessary locks and creating the symbol table object itself. Plug-ins now just need to parse when they are asked to parse as the ParseSymtab function will only get called once. This is a retry of the original patch https://reviews.llvm.org/D113965 which was reverted. There was a deadlock in the Manual DWARF indexing code during symbol preloading where the module was asked on the main thread to preload its symbols, and this would in turn cause the DWARF manual indexing to use a thread pool to index all of the compile units, and if there were relocations on the debug information sections, these threads could ask the ObjectFile to load section contents, which could cause a call to ObjectFileELF::RelocateSection() which would ask for the symbol table from the module and it would deadlock. We can't lock the module in ObjectFile::GetSymtab(), so the solution I am using is to use a llvm::once_flag to create the symbol table object once and then lock the Symtab object. Since all APIs on the symbol table use this lock, this will prevent anyone from using the symbol table before it is parsed and finalized and will avoid the deadlock I mentioned. ObjectFileELF::GetSymtab() was never locking the module lock before and would put off creating the symbol table until somewhere inside ObjectFileELF::GetSymtab(). Now we create it one time inside of the ObjectFile::GetSymtab() and immediately lock it which should be safe enough. This avoids the deadlocks and still provides safety. Differential Revision: https://reviews.llvm.org/D114288
-
Peter Klausler authored
INQUIRE(POSITION=)'s results need to reflect the POSITION= specifier used for the OPEN statement until the unit has been repositioned. Preserve the POSITION= from OPEN and used it for INQUIRE(POSITION=) until is becomes obsolete. INQUIRE(PAD=) is implemented here in the case of an unconnected unit with Fortran 2018 semantics; i.e., "UNDEFINED", rather than Fortran 90's "YES"/"NO" (see 4.3.6 para 2). Apparent failures with F'90-only tests will persist with INQUIRE(PAD=); these discrepancies don't seem to warrant an option or environment variable. To make the implementation of INQUIRE more closely match the language in the standard, rename IsOpen() to IsConnected(), and use it explicitly for the various INQUIRE specifiers. Differential Revision: https://reviews.llvm.org/D114755
-
Aart Bik authored
Proper test for sparse tensor outputs is a single condition throughout the whole tensor index expression (not a general conjunction, since this may include other conditions that cause cancellation). Reviewed By: bixia Differential Revision: https://reviews.llvm.org/D114810
-
Peter Klausler authored
To accommodate triangular implied DO loops in DATA statements, in which the bounds of nested implied DO loops might depend on the values of the indices of outer implied DO loops in the same DATA statement set, it is necessary to run them through constant folding each time they are encountered. Differential Revision: https://reviews.llvm.org/D114754
-
Elizabeth Andrews authored
Test failed on x86 platforms due to a calling convention mismatch when member function was called like a free function. In this patch, member function is marked static to address this.
-
Jonas Devlieghere authored
727bd89b broke the UBSan decorator. The decorator compiles a custom source code snippet that exposes UB and verifies the presence of a UBSan symbol in the generated binary. The aforementioned commit broke both by compiling a snippet without UB and discarding the result.
-
Peter Klausler authored
Max(), MIN(), and their specific variants are defined with an unlimited number of dummy arguments named A1=, A2=, &c. whose names are almost never used in practice but should be allowed for and properly checked for the usual errors when they do appear. The intrinsic table's entries otherwise have fixed numbers of dummy argument definitions, so add some special case handling in a few spots for MAX/MIN/&c. checking and procedure characteristics construction. Differential Revision: https://reviews.llvm.org/D114750
-
Jonas Devlieghere authored
Check if we have an apple_sdk before checking if it contains "internal".
-
Jonas Devlieghere authored
Speed up testing by not rerunning the test for all debug info variants.
-
Nicolas Vasilache authored
This revision reintroduces tensor.insert_slice verification which seems to have vanished over time: a verifier was initially introduced in cf9503c1 but for some reason the invalid.mlir was not properly updated; as time passed the verifier was not called anymore and later the code was deleted. As a consequence, a non-negligible portion of tests has run astray using invalid tensor.insert_slice semantics and needed to be fixed. Also, extract isRankReducedType from TensorOps for better reuse Originally, this facility was used by both tensor and memref forms but it got copied around as dialects were split. Differential Revision: https://reviews.llvm.org/D114715
-
MaheshRavishankar authored
The canonical type of the result of the `memref.subview` needs to make sure that the previously dropped unit-dimensions are the ones dropped for the canonicalized type as well. This means the generic `inferRankReducedResultType` cannot be used. Instead the current dropped dimensions need to be querried and the same need to be dropped. Reviewed By: nicolasvasilache, ThomasRaoux Differential Revision: https://reviews.llvm.org/D114751
-
Jameson Nash authored
Previously, this caused GlobalISel to emit invalid IR (a gpr32 to gpr64 copy) and fail during verification. While this shift is not defined (returns poison), it should not crash codegen, as it may appear inside dead code (for example, a select instruction), and it is legal IR input, as long as the value is unused. Discovered while trying to build Julia with LLVM v13: https://github.com/JuliaLang/julia/pull/42602. Reviewed By: aemerson Differential Revision: https://reviews.llvm.org/D114389
-
Snehasish Kumar authored
The memprof profile reader tests rely on binary data which is generated from and meant to be interpreted on little endian architectures. Add a REQUIRES: x86_64-linux clause to both tests to ensure they don't fail on big endian targets such as ppc.
-
Nikita Popov authored
Make sure that ValuesAtScopes and ValuesAtScopesUsers are consistent during SCEV verification.
-
Zarko Todorovski authored
Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D114562
-
Zarko Todorovski authored
-
Snehasish Kumar authored
The memprof unit tests use an older version of gmock (included in the repo) which does not build cleanly with -pedantic: https://github.com/google/googletest/issues/2650 For now just silence the warning by disabling pedantic and add the appropriate flags for gcc and clang.
-
not-jenni authored
For a 1x1 weight and stride of 1, the input/weight can be reshaped and passed into a fully connected op then reshaped back Reviewed By: rsuderman Differential Revision: https://reviews.llvm.org/D114757
-
Jameson Nash authored
It seems clearer to me that this would check for *any of* instead of *all of* these option categories, as it looks to me like that was the intent. But apparently this logic has always has been inverted, and possibly never fully used? Differential Revision: https://reviews.llvm.org/D114572
-
Michael Jones authored
Up until now, all references to `errno` were marked with `NOLINT`, since it was technically calling an external function. This fixes the lint rules so that `errno`, as well as `malloc`, `calloc`, `realloc`, and `free` are all allowed to be called as external functions. All of the relevant `NOLINT` comments have been removed, and the documentation has been updated. Reviewed By: sivachandra, lntue, aaron.ballman Differential Revision: https://reviews.llvm.org/D113946
-
Snehasish Kumar authored
The memprof unittest also needs to include the MemProfData.inc header directly to have access to MEMPROF_RAW_MAGIC and MEMPROF_RAW_VERSION globals.
-
Fangrui Song authored
This reverts the PPC64PCRelLongBranchThunk part from D86706. PPC64PCRelLongBranchThunk is the same as PPC64R12SetupStub. Use `__gep_setup_` instead of `__long_branch_pcrel_` for the stub symbol name as it more closely indicates the operation. (Note: GNU ld uses `*.long_branch.*` and `*.plt_branch.*`). Reviewed By: NeHuang, nemanjai Differential Revision: https://reviews.llvm.org/D114656
-
Jonas Devlieghere authored
-
Jonas Devlieghere authored
Make sure to add the PrivateFrameworks directory to the frameworks path when using an internal SDK. This is necessary for the "on-device" test suite. rdar://84519268 Differential revision: https://reviews.llvm.org/D114742
-
Sanjay Patel authored
https://alive2.llvm.org/ce/z/4PaPDy There's a related fold where the inner 'or' is replaced by 'and', but that needs to be more careful about matching a 'not'.
-
Sanjay Patel authored
-
Sanjay Patel authored
Also, vary the types in a couple of tests for better coverage.
-
Fangrui Song authored
There is a trend of having more optional options (usually security hardening related) like -z cet-report=, -z bti-report=, -z force-bti. If ld.lld 14.0.0 uses a warning, in 15/16/17/... timeframe when people add new options to software, they can worry less about linker errors on ld.lld 14.0.0. In some cases `-z foo` does essential work where a silent ignore can be problematic, but the user has received a warning. From my observation, the doing-essential-work `-z foo` is much fewer than the converse. In addition, the user who cares can use `--fatal-warnings` (Note: GNU ld doesn't upgrade warnings to errors). It is unclear whether we need something like `clang -Wunknown-warning-option`. If we ever run into unfortunate transition like `-z start-stop-gc`, the affected software (e.g. ldc is a compiler which passes linker options to the underlying ld) can blindly add the `-z` option, without worrying it may cause a linker error to LLD 14.0.0. Reviewed By: jrtc27, peter.smith Differential Revision: https://reviews.llvm.org/D114748
-
LLVM GN Syncbot authored
-
Snehasish Kumar authored
This commit adds initial support to llvm-profdata to read and print summaries of raw memprof profiles. Summary of changes: * Refactor shared defs to MemProfData.inc * Extend show_main to display memprof profile summaries. * Add a simple raw memprof profile reader. * Add a couple of tests to tools/llvm-profdata. Differential Revision: https://reviews.llvm.org/D114286
-
Peter Klausler authored
An earlier fix to evaluate::IsSaved() needed to preserve its treatment of named constants in modules and main programs -- i.e. they would appear to be saved -- until a correction was added to the lowering code. This TODO can now be resolved. Differential Revision: https://reviews.llvm.org/D114756
-
Hans Wennborg authored
-
Alexey Bataev authored
Extended support for undefined source vector/extract indices/non-fixed vector types, also no need to check for the parent of the extractelement instructions with the constant indicies. Differential Revision: https://reviews.llvm.org/D114121
-
Sanjay Patel authored
-
Sanjay Patel authored
Half of the tests had an extra instruction so were not testing the minimal patterns.
-
Sanjay Patel authored
Reduce duplication for handling the top-level commuted operands. There are several other folds that should be moved in here, but we need to make sure there's good test coverage.
-
Sanjay Patel authored
The code for these transforms can be refactored, but the existing tests are incomplete.
-
Sanjay Patel authored
The tests are adapted from the xor patterns used with: 892648b1 b326c058
-
Alexey Bataev authored
NFC.
-
Nikita Popov authored
Revert "Use VersionTuple for parsing versions in Triple. This makes it possible to distinguish between "16" and "16.0" after parsing, which previously was not possible." This reverts commit 1e828646. llvm/test/Transforms/LoopStrengthReduce/X86/2009-11-10-LSRCrash.ll fails with assertion failure: llc: /home/nikic/llvm-project/llvm/include/llvm/ADT/Optional.h:196: T& llvm::optional_detail::OptionalStorage<T, true>::getValue() & [with T = unsigned int]: Assertion `hasVal' failed. ... #8 0x00005633843af5cb llvm::MCStreamer::emitVersionForTarget(llvm::Triple const&, llvm::VersionTuple const&) #9 0x0000563383b47f14 llvm::AsmPrinter::doInitialization(llvm::Module&)
-