- Jun 16, 2021
-
-
LLVM GN Syncbot authored
-
Patrick Holland authored
The original change was pushed in main as commit f7a23ece. It was then reverted by commit a04f01ba because it caused linker failures on buildbots that don't build the AMDGPU target. -- Some instructions are not defined well enough within the target’s scheduling model for llvm-mca to be able to properly simulate its behaviour. The ideal solution to this situation is to modify the scheduling model, but that’s not always a viable strategy. Maybe other parts of the backend depend on that instruction being modelled the way that it is. Or maybe the instruction is quite complex and it’s difficult to fully capture its behaviour with tablegen. The CustomBehaviour class (which I will refer to as CB frequently) is designed to provide intuitive scaffolding for developers to implement the correct modelling for these instructions. More details are available in the original commit log message (f7a23ece). Differential Revision: https://reviews.llvm.org/D104149
-
Vyacheslav Zakharin authored
This change-set removes libelf usage from elf_common part of the plugins. libelf is still used in x86_64 generic plugin code and in some plugins (e.g. amdgpu) - these will have to be cleaned up in separate checkins. Differential Revision: https://reviews.llvm.org/D103545
-
Sanjay Patel authored
We already have this fold: fadd float poison, 1.0 --> poison ...via ConstantFolding, so this makes the behavior consistent if the other operand(s) are non-constant. The fold for undef was added before poison existed as a value/type in IR. This came up in D102673 / D103169 because we're trying to sort out the more complicated handling for constrained math ops. We should have the handling for the regular instructions done first, so we can build on that (or diverge as needed). Differential Revision: https://reviews.llvm.org/D104383
-
Sjoerd Meijer authored
-
Yitzhak Mandelbaum authored
Currently, the implementation combines OOP and overloads, using a template to tie the two together. In practice, this has proven confusing with no benefits. This patch simplifies the code to use standard OOP design (a collection of classes deriving from an interface). Differential Revision: https://reviews.llvm.org/D104317
-
Jez Ng authored
It's a warning in ld64. While having LLD be stricter would be nice, it makes it harder for it to be a drop-in replacement into existing builds. Reviewed By: #lld-macho, thakis Differential Revision: https://reviews.llvm.org/D104333
-
Dylan Fleming authored
Reviewed By: efriedma, CarolineConcatto Differential Revision: https://reviews.llvm.org/D104244
-
James Henderson authored
Accidentally missed from commit 5c1639fe. Differential Revision: https://reviews.llvm.org/D104035
-
Jay Foad authored
This does not affect codegen but might benefit llvm-mca.
-
David Spickett authored
This only applies to FastIsel. GlobalIsel seems to sidestep the issue. This fixes https://bugs.llvm.org/show_bug.cgi?id=46996 One of the things we do in llvm is decide if a type needs consecutive registers. Previously, we just checked if it was an array or not. (plus an SVE specific check that is not changing here) This causes some confusion when you arbitrary IR like: ``` %T1 = type { double, i1 }; define [ 1 x %T1 ] @foo() { entry: ret [ 1 x %T1 ] zeroinitializer } ``` We see it is an array so we call CC_AArch64_Custom_Block which bails out when it sees the i1, a type we don't want to put into a block. This leaves the location of the double in some kind of intermediate state and leads to odd codegen. Which then crashes the backend because it doesn't know how to implement what it's been asked for. You get this: ``` renamable $d0 = FMOVD0 $w0 = COPY killed renamable $d0 ``` Rather than this: ``` $d0 = FMOVD0 $w0 = COPY $wzr ``` The backend knows how to copy 64 bit to 64 bit registers, but not 64 to 32. It can certainly be taught how but the real issue seems to be us even trying to assign a register block in the first place. This change makes the logic of AArch64TargetLowering::functionArgumentNeedsConsecutiveRegisters a bit more in depth. If we find an array, also check that all the nested aggregates in that array have a single member type. Then CC_AArch64_Custom_Block's assumption of a type that looks like [ N x type ] will be valid and we get the expected codegen. New tests have been added to exercise these situations. Note that some of the output is not ABI compliant. The aim of this change is to simply handle these situations and not to make our processing of arbitrary IR ABI compliant. Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D104123
-
Louis Dionne authored
While the std::allocator<void> specialization was deprecated by https://wg21.link/p0174#2.2, the *use* of std::allocator<void> by users was not. The intent was that std::allocator<void> could still be used in C++17 and C++20, but starting with C++20 (with the removal of the specialization), std::allocator<void> would use the primary template. That intent was called out in wg21.link/p0619r4#3.9. As a result of this patch, _LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS will also not control whether the explicit specialization is provided or not. It shouldn't matter, since in C++20, one can simply use the primary template. Fixes http://llvm.org/PR50299 Differential Revision: https://reviews.llvm.org/D104323
-
Andrea Di Biagio authored
When instructions are issued to the underlying pipeline resources, the mca::ResourceManager should also check for the presence of extra uses induced by the explicit consumption of multiple partially overlapping group resources. Fixes PR50725
-
Nicolas Vasilache authored
Differential Revision: https://reviews.llvm.org/D104368
-
Simon Pilgrim authored
Exposes some really bad shift lowering codegen in shiftInput___canonical
-
Ben Dunbobbin authored
[llvm-symbolizer] improve test and fix doc example after recent --print-source-context-lines behaviour change I believe that after https://reviews.llvm.org/D102355 the behaviour of --print-source-context-lines has changed. Before: --print-source-context-lines=3 prints 4 lines. After: --print-source-context-lines=3 prints 3 lines. Adjust the example in the docs for this change and make the testing a little more robust. Differential Revision: https://reviews.llvm.org/D104114
-
Jay Foad authored
This does not affect codegen but might benefit llvm-mca.
-
Amilendra Kodithuwakku authored
Fix for the following exception. AttributeError: 'TestingConfig' object has no attribute 'target_triple' Related revision: https://reviews.llvm.org/D102012 'TestingConfig' object has no attribute 'target_triple' Reviewed By: #libunwind, miyuki, danielkiss, mstorsjo Differential Revision: https://reviews.llvm.org/D103140
-
Guillaume Chatelet authored
Resubmission of D100646 now making sure that we handle cases were `__builtin_memcpy_inline` is not available. Original commit message: Each of these elementary operations can be assembled to support higher order constructs (Overlapping access, Loop, Aligned Loop). The patch does not compile yet as it depends on other ones (D100571, D100631) but it allows to get the conversation started. A self-contained version of this code is available at https://godbolt.org/z/e1x6xdaxM
-
Dylan Fleming authored
Reviewed By: sdesmalen Differential Revision: https://reviews.llvm.org/D104115
-
Raphael Isemann authored
This test is using -gpubnames which is only available since Clang 8. The original Clang 7 requirement was based on the availability of -accel-tables=Dwarf (which the test initially used before being changed to -gpubnames in commit 15a6df52 ).
-
AndreyChurbanov authored
Refactored code of dependence processing and added new inoutset dependence type. Compiler can set dependence flag to 0x8 when call __kmpc_omp_task_with_deps. All dependence flags library gets so far and corresponding dependence types: 1 - IN, 2 - OUT, 3 - INOUT, 4 - MUTEXINOUTSET, 8 - INOUTSET. Differential Revision: https://reviews.llvm.org/D97085
-
Diana Picus authored
Add a test to make sure the flang runtime doesn't pull in the C++ runtime libraries. This is achieved by adding a C file that calls some functions from the runtime (currently only CpuTime, but we should probably add anything complicated enough, e.g. IO-related things). We force the C compiler to use -std=c90 to make sure it's really in C mode (we don't really care which version of the standard, this one is probably more widely available). We only enable this test if CMAKE_C_COMPILER is set to something (which is probably always true in practice). This is a recommit of 7ddbf263, with 2 fixes: * Replace C++ comments with C comments * Only enable the test if libFortranRuntime.a exists (this might not be the case if e.g. BUILD_SHARED_LIBS=On) Differential Revision: https://reviews.llvm.org/D104290
-
Jay Foad authored
This does not affect codegen but might benefit llvm-mca.
-
Guillaume Chatelet authored
This reverts commit 4694321f.
-
Guillaume Chatelet authored
Resubmission of D100646 now making sure that we handle cases were `__builtin_memcpy_inline` is not available. Original commit message: Each of these elementary operations can be assembled to support higher order constructs (Overlapping access, Loop, Aligned Loop). The patch does not compile yet as it depends on other ones (D100571, D100631) but it allows to get the conversation started. A self-contained version of this code is available at https://godbolt.org/z/e1x6xdaxM
-
Raphael Isemann authored
`vwprintw` is (in theory) using the `arargs.h` va_list while `vw_printw` is using the `stdarg.h` va_list. It seems these days they can be used interchangeably but `vwprintw` is marked as deprecated.
-
Jay Foad authored
This does not affect codegen but might benefit llvm-mca.
-
Diana Picus authored
This reverts commit 7ddbf263. This doesn't work if we're not building libFortranRuntime.a. I'll recommit with a fix.
-
Nico Weber authored
Differential Revision: https://reviews.llvm.org/D104345
-
Nico Weber authored
Differential Revision: https://reviews.llvm.org/D104347
-
Konstantin Schwarz authored
During PHDR creation, the case where an output section does not require a PT_LOAD header but still occupies memory in the current VMA region was not handled. If such an output section interleaves two output sections that have the same VMA and LMA regions set, we would previously re-use the existing PT_LOAD header for the second output section. However, since the memory region is not contiguous, we need to start a new PT_LOAD segment. This fixes https://bugs.llvm.org/show_bug.cgi?id=50558 Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D103815
-
Alex Zinenko authored
Default implementations of interfaces may rely on extra class declarations, which aren't currently generated in the external model, that in turn may rely on functions defined in the main Attribute/Type class, which wouldn't be available on the external model.
-
David Green authored
Under MVE v4f32 and v8f16 vectors should be using v4i1/v8i1 predicates for the setcc result type, as they have predicated registers for those types. Setting this correctly prevents some inefficient optimizations from happening.
-
David Green authored
-
Diana Picus authored
Replace C++ comments with C-style comments (not sure why my C compiler doesn't complain about this).
-
Sjoerd Meijer authored
-
Diana Picus authored
Flang diverges from the llvm coding style in that it requires braces around the bodies of if/while/etc statements, even when the body is a single statement. This commit adds the readability-braces-around-statements check to flang's clang-tidy config file. Hopefully the premerge bots will pick it up and report violations in Phabricator. We also explicitly disable the check in the directories corresponding to the Lower and Optimizer libraries, which rely heavily on mlir and llvm and therefore follow their coding style. Likewise for the tools directory. We also fix any outstanding violations in the runtime and in lib/Semantics. Differential Revision: https://reviews.llvm.org/D104100
-
Sjoerd Meijer authored
-
James Henderson authored
This patch adds support for a new field in the FileHeader, which states the name to use for the section header string table. This also allows combining the string table with another string table in the object, e.g. the symbol name string table. The field is optional. By default, .shstrtab will continue to be used. This partially fixes https://bugs.llvm.org/show_bug.cgi?id=50506. Reviewed by: Higuoxing Differential Revision: https://reviews.llvm.org/D104035
-