- Jan 15, 2021
-
-
Andy Wingo authored
This patch adds support to wasm-ld for linking multiple table references together, in a manner similar to wasm globals. The indirect function table is synthesized as needed. To manage the transitional period in which the compiler doesn't yet produce TABLE_NUMBER relocations and doesn't residualize table symbols, the linker will detect object files which have table imports or definitions, but no table symbols. In that case it will synthesize symbols for the defined and imported tables. As a change, relocatable objects are now written with table symbols, which can cause symbol renumbering in some of the tests. If no object file requires an indirect function table, none will be written to the file. Note that for legacy ObjFile inputs, this test is conservative: as we don't have relocs for each use of the indirecy function table, we just assume that any incoming indirect function table should be propagated to the output. Differential Revision: https://reviews.llvm.org/D91870
-
KAWASHIMA Takahiro authored
Basic support of A64FX was added in D75594 but its scheduling model was missing. This commit adds the scheduling model. Also, this commit amends/adds some subtarget parameters of A64FX. The A64FX Microarchitecture Manual, which is source information of this commit, is on GitHub. https://github.com/fujitsu/A64FX/ Differential Revision: https://reviews.llvm.org/D93791
-
Jan Svoboda authored
It turns out we need to handle `LangOptions` separately from the rest of the options. `LangOptions` used to be conditionally parsed only when `!(DashX.getFormat() == InputKind::Precompiled || DashX.getLanguage() == Language::LLVM_IR)` and we need to restore this order (for more info, see D94682). We could do this similarly to how `DiagnosticOptions` are handled: via a counterpart to the `IsDiag` mix-in (e.g. `IsLang`). These mix-ins would prefix the option key path with the appropriate `CompilerInvocation::XxxOpts` member. However, this solution would be problematic, as we'd now have two kinds of options (`Lang` and `Diag`) with seemingly incomplete key paths in the same file. To understand what `CompilerInvocation` member an option affects, one would need to read the whole option definition and notice the `IsDiag` or `IsLang` class. Instead, this patch introduces more robust way to handle different kinds of options separately: via the `KeyPathAndMacroPrefix` class. We have one specialization of that class per `CompilerInvocation` member (e.g. `LangOpts`, `DiagnosticOpts`, etc.). Now, instead of specifying a key path with `"LangOpts->UndefPrefixes"`, we use `LangOpts<"UndefPrefixes">`. This keeps the readability intact (you don't have to look for the `IsLang` mix-in, the key path is complete on its own) and allows us to specify a custom macro prefix within `LangOpts`. Reviewed By: Bigcheese Differential Revision: https://reviews.llvm.org/D94676
-
Jan Svoboda authored
Instead of passing the whole `TargetOptions` and `FrontendOptions` to `ParseCodeGenArgs` give it only the necessary members. This makes tracking the dependencies between various parsers and option groups easier. Reviewed By: Bigcheese Differential Revision: https://reviews.llvm.org/D94675
-
Jan Svoboda authored
Instead of passing the whole `TargetOptions` and `PreprocessorOptions` to `ParseLangArgs` give it only the necessary members. This makes tracking the dependencies between various parsers and option groups easier. Reviewed By: Bigcheese Differential Revision: https://reviews.llvm.org/D94674
-
Aart Bik authored
This is a very minor improvement during iteration graph construction. If the first attempt considering the dimension order of all tensors fails, a second attempt is made using the constraints of sparse tensors only. Dense tensors prefer dimension order (locality) but provide random access if needed, enabling the compilation of more sparse kernels. Reviewed By: penpornk Differential Revision: https://reviews.llvm.org/D94709
-
Yashaswini authored
Add Semantic check for Flang OpenMP 4.5 - 2.7.1 Do Loop restrictions on single directive and firstprivate clause. Semantic checks added to check the worksharing 'single' region closely nested inside a worksharing 'do' region. And also to check whether the 'do' iteration variable is a variable in 'Firstprivate' clause. Files: check-directive-structure.h check-omp-structure.h check-omp-structure.cpp Testcases: omp-do01-positivecase.f90 omp-do01.f90 omp-do05-positivecase.f90 omp-do05.f90 Reviewed by: Kiran Chandramohan @kiranchandramohan , Valentin Clement @clementval Differential Revision: https://reviews.llvm.org/D93205
-
Kazu Hirata authored
Identified with readability-redundant-control-flow.
-
Kazu Hirata authored
-
Kazu Hirata authored
-
Cheng Wang authored
Use `memcpy` rather than copying bytes one by one, for there might be large size structs to move. Reviewed By: gchatelet, sivachandra Differential Revision: https://reviews.llvm.org/D93195
-
Amara Emerson authored
In order to import patterns for these, we need to define new ops that can map to the AArch64ISD::[SU]ITOF nodes. We then transform fpr->fpr variants of the generic opcodes to these custom opcodes in preisel-lowering. We have to do it here and not the PostLegalizer combiner because this has to run after regbankselect. Differential Revision: https://reviews.llvm.org/D94702
-
Yitzhak Mandelbaum authored
This patch changes the default range used to anchor the include insertion to use an expansion loc. This ensures that the location is valid, when the user relies on the default range. Driveby: extend a FIXME for a problem that was emphasized by this change; fix some spellings. Differential Revision: https://reviews.llvm.org/D93703
-
Jon Chesterfield authored
[libomptarget][nvptx] Reduce calls to cuda header Remove use of clock_t in favour of a builtin. Drop a preprocessor branch. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D94731
-
Amara Emerson authored
G_[US]ITOFP users of loads on AArch64 can operate on both gpr and fpr banks for scalars. Because of this, if their source is a load, then that load can be assigned to an fpr bank and therefore avoid having to do a cross bank copy via a gpr->fpr conversion. Differential Revision: https://reviews.llvm.org/D94701
-
Tim Keith authored
When a use-associated procedure was included in a generic, we weren't correctly recording that fact. The ultimate symbol was added rather than the local symbol. Also, improve the message emitted for the specific procedure by mentioning the module it came from. This fixes one of the problems in https://bugs.llvm.org/show_bug.cgi?id=48648. Differential Revision: https://reviews.llvm.org/D94696
-
Jon Chesterfield authored
[libomptarget][nvptx][nfc] Move target_impl functions out of header This removes most of the differences between the two target_impl.h. Also change name mangling from C to C++ for __kmpc_impl_*_lock. Reviewed By: tianshilei1992 Differential Revision: https://reviews.llvm.org/D94728
-
MaheshRavishankar authored
With the recent changes to linalg on tensor semantics, the tiling operations works out-of-the-box for generic operations. Add a test to verify that and some minor refactoring. Differential Revision: https://reviews.llvm.org/D93077
-
MaheshRavishankar authored
Add canonicalization to replace use of the result of a linalg operation on tensors in a dim operation, to use one of the operands of the linalg operations instead. This allows the linalg op itself to be deleted when all its non-dim uses are removed (say through tiling, etc.) Differential Revision: https://reviews.llvm.org/D93076
-
Shilei Tian authored
`omptarget-nvptx` is still a dependence for `check-libomptarget-nvtpx` although it has been removed by D94573. Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D94725
-
Sanjay Patel authored
This is NFC-intended. I'm still trying to figure out how the loop where this is used works. It does not seem like we require this data at all, but it's hard to confirm given the complicated predicates.
-
MaheshRavishankar authored
linalg.generic/indexed_generic operations on tensors whose body is just yielding the (non-induction variable) arguments of the operation can be canonicalized by replacing uses of the result with the corresponding arguments. Differential Revision: https://reviews.llvm.org/D94581
-
Sam McCall authored
-
Andrew Young authored
The standard and gpu dialect both have `alloc` operations which use the memory effect `MemAlloc`. In both cases, it is specified on both the operation itself and on the result. This results in two memory effects being created for these operations. When `MemAlloc` is defined on an operation, it represents some background effect which the compiler cannot reason about, and inhibits the ability of the compiler to remove dead `std.alloc` operations. This change removes the uneeded `MemAlloc` effect from these operations and leaves the effect on the result, which allows dead allocs to be erased. There is the same problem, but to a lesser extent, with MemFree, MemRead and MemWrite. Over-specifying these traits is not currently inhibiting any optimization. Differential Revision: https://reviews.llvm.org/D94662
-
Sam Elliott authored
This regenerates these tests using utils/update_llc_test_checks.py so that future changes in this area don't have the noise of lots of `@plt` lines being added. I also removed the `nounwind`s from the stack-realignment.ll test to increase coverage on the generated call frame information.
-
Teresa Johnson authored
As requested in D91583, use ';;' instead of ';' to preceed comments in lld test. I did this in the equivalent gold test as well.
-
Alexandre Ganea authored
The number of hardware threads available to a ThreadPool can be limited if setting an affinity mask. For example: > start /B /AFFINITY 0xF lld-link.exe ... Would let LLD only use 4 hyper-threads. Previously, there was an outstanding issue on Windows Server 2019 on dual-CPU machines, which was preventing from using both CPU sockets. In normal conditions, when no affinity mask was set, ProcessorGroup::AllThreads was different from ProcessorGroup::UsableThreads. The previous code in llvm/lib/Support/Windows/Threading.inc L201 was improperly assuming those two values to be equal, and consequently was limiting the execution to only one CPU socket. Differential Revision: https://reviews.llvm.org/D92419 -
Craig Topper authored
Some FP compares expand to a sequence ending with (xor X, 1) to invert the result. If the consumer is a select_cc we can likely get rid of this xor by fixing up the select_cc condition. This patch combines (select_cc (xor X, 1), 0, setne, trueV, falseV) - (select_cc X, 0, seteq, trueV, falseV) if we can prove X is 0/1. Reviewed By: lenary Differential Revision: https://reviews.llvm.org/D94546
-
Douglas Yung authored
Add -fexceptions to test as it uses them and fails on platforms where it is not on by default (like the PS4).
-
Roland McGrath authored
Standard C allows all standard headers to declare macros for all their functions. So after possibly including any standard header like <ctype.h>, it's perfectly normal for any and all of the functions it declares to be defined as macros. Standard C requires explicit `#undef` before using that identifier in a way that is not compatible with function-like macro definitions. The C standard's rules for this are extended to POSIX as well for the interfaces it defines, and it's the expected norm for nonstandard extensions declared by standard C library headers too. So far the only place this has come up for llvm-libc's code is with the isascii function in Fuchsia's libc. But other cases can arise for any standard (or common extension) function names that source code in llvm-libc is using in nonstandard ways, i.e. as C++ identifiers. The only correct and robust way to handle the possible inclusion of standard C library headers when building llvm-libc source code is to use `#undef` explicitly for each identifier before using it. The easy and obvious place to do that is in the per-function header. This requires that all code, such as test code, that might include any standard C library headers, e.g. via utils/UnitTest/Test.h, make sure to include those *first* before the per-function header. This change does that for isascii and its test. But it should be done uniformly for all the code and documented as a consistent convention so new implementation files are sure to get this right. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D94642
-
Nico Weber authored
-
Jinsong Ji authored
Legacy AIX assembly might not support all extended mnes, add one feature bit to control the generation in MC, and avoid generating them by default on AIX. Reviewed By: sfertile Differential Revision: https://reviews.llvm.org/D94458
-
Sean Silva authored
This spilts out BufferDeallocationInternals.md, since buffer deallocation is not part of bufferization per se. Differential Revision: https://reviews.llvm.org/D94351
-
Adam Czachorowski authored
This can happen on some invalid code, like the included test case. Differential Revision: https://reviews.llvm.org/D94704
-
Tres Popp authored
TosaToLinalg was depending on its header file indirectly through Passes.h rather than directly. This removes that indirection. Differential Revision: https://reviews.llvm.org/D94706
-
River Riddle authored
This revision adds a new `replaceOpWithIf` hook that replaces uses of an operation that satisfy a given functor. If all uses are replaced, the operation gets erased in a similar manner to `replaceOp`. DialectConversion support will be added in a followup as this requires adjusting how replacements are tracked there. Differential Revision: https://reviews.llvm.org/D94632
-
Craig Topper authored
MCTargetDesc includes headers from Utils and Utils includes headers from MCTargetDesc. So from a library layering perspective it makes sense for them to be in the same library. I guess the other option might be to move the tablegen includes from RISCVMCTargetDesc.h to RISCVBaseInfo.h so that RISCVBaseInfo.h didn't need to include RISCVMCTargetDesc.h. Everything else that depends on Utils also depends on MCTargetDesc so having one library seemed simpler. Differential Revision: https://reviews.llvm.org/D93168
-
Fangrui Song authored
This generalizes D94647 to IR input, as suggested by @tejohnson. Ideally the driver should just forward split dwarf options, but doing this currently will cause `clang -gsplit-dwarf -c a.c` to create a .dwo with just `.strtab`. Reviewed By: dblaikie, tejohnson Differential Revision: https://reviews.llvm.org/D94655
-
River Riddle authored
In the overwhelmingly common case, enum attribute case strings represent valid identifiers in MLIR syntax. This revision updates the format generator to format as a keyword in these cases, removing the need to wrap values in a string. The parser still retains the ability to parse the string form, but the printer will use the keyword form when applicable. Differential Revision: https://reviews.llvm.org/D94575
-