- Dec 20, 2022
-
-
Nikita Popov authored
Sample test where cfd594f8 causes optimization regressions.
-
Simon Pilgrim authored
LOCK + CMPXCHG8/CMPXCHG16 variants still need overriding as they are not completely correct - already much better though Based off llvm-exegesis captures, confirmed with Agner + uops.info
-
Jean Perier authored
Addresses and properties (bounds, length parameters) of host variables associated in an internal procedure were all passed via an extra tuple argument of the internal procedure. This extra tuple is in general an overhead: it must be created and passed, and require creating thunks when taking the address of the internal procedure. This patch allows not using the tuple for host global variables (from modules, common block, or local saved variables) since they can be instantiated from the fir.global symbol in the internal procedure instead. Add a fir.internal_proc attribute to mlir::FuncOp for internal procedures so that ArrayValueCopy can still detect internal procedures even if they do not have a tuple argument. Differential Revision: https://reviews.llvm.org/D140288
-
Archibald Elliott authored
-
Sebastian Neubauer authored
This facilitates replacing llvm::Any with std::any. - Deprecate any_isa in favor of using any_cast(Any*) and checking for nullptr because C++17 has no any_isa. - Remove the assert from any_cast(Any*), so it returns nullptr if the type is not correct. This aligns it with std::any_cast(any*). Use any_cast(Any*) throughout LLVM instead of checks with any_isa. This is the first part outlined in https://discourse.llvm.org/t/rfc-switching-from-llvm-any-to-std-any/67176 Differential Revision: https://reviews.llvm.org/D139973
-
Archibald Elliott authored
-
Matthias Springer authored
Make sure that both functions populate patterns with the same functionality. Both should be refactored at some point so that canonicalization patterns are not populated. Differential Revision: https://reviews.llvm.org/D140372
-
Stephen Tozer authored
This patch fixes a simple bug in DbgValueHistoryMap::hasNonEmptyLocation that caused it to treat empty DBG_VALUE_LIST instructions as non-empty when determining whether to emit a variable or not. Differential Revision: https://reviews.llvm.org/D133925
-
gonglingqin authored
Further, after MUL is decomposed, use ALSL instead of SLLI and ADD Differential Revision: https://reviews.llvm.org/D140282
-
Nikita Popov authored
One test case was testing the case where a bitcasted function pointer is passed to an X constraint. With opaque pointers, this is no longer a thing, and it gets treated the same way as a non-bitcasted function pointer. Per the comment, this is a desirable change.
-
Archibald Elliott authored
-
Nikita Popov authored
Nothing interesting, but required some fixups to MIR.
-
Nikita Popov authored
There is a minor change in register allocation in one test case, which doesn't have impact on codegen quality though. Probably due to differences in SCEVExpander behavior with opaque pointers.
-
Nikita Popov authored
And regenerate check lines.
-
Jessica Del authored
These tests show suboptimal code generation that will be improved by the changes in D140208
-
Archibald Elliott authored
This is a fairly large changeset, but it can be broken into a few pieces: - `llvm/Support/*TargetParser*` are all moved from the LLVM Support component into a new LLVM Component called "TargetParser". This potentially enables using tablegen to maintain this information, as is shown in https://reviews.llvm.org/D137517. This cannot currently be done, as llvm-tblgen relies on LLVM's Support component. - This also moves two files from Support which use and depend on information in the TargetParser: - `llvm/Support/Host.{h,cpp}` which contains functions for inspecting the current Host machine for info about it, primarily to support getting the host triple, but also for `-mcpu=native` support in e.g. Clang. This is fairly tightly intertwined with the information in `X86TargetParser.h`, so keeping them in the same component makes sense. - `llvm/ADT/Triple.h` and `llvm/Support/Triple.cpp`, which contains the target triple parser and representation. This is very intertwined with the Arm target parser, because the arm architecture version appears in canonical triples on arm platforms. - I moved the relevant unittests to their own directory. And so, we end up with a single component that has all the information about the following, which to me seems like a unified component: - Triples that LLVM Knows about - Architecture names and CPUs that LLVM knows about - CPU detection logic for LLVM Given this, I have also moved `RISCVISAInfo.h` into this component, as it seems to me to be part of that same set of functionality. If you get link errors in your components after this patch, you likely need to add TargetParser into LLVM_LINK_COMPONENTS in CMake. Differential Revision: https://reviews.llvm.org/D137838
-
Nikita Popov authored
-
Dmitry Preobrazhensky authored
Summary of changes: - Enable register tuples with 9, 10, 11 and 12 registers (https://reviews.llvm.org/D138205). - Small improvements and clarifications. - Correct typos.
-
Nikita Popov authored
-
Guillaume Chatelet authored
As discussed on the patch the Align type is probably not a good fit for linkers. This reverts commit cfe77f23.
-
Sebastian Neubauer authored
Using CMAKE_CFG_INTDIR in paths that are used in configure_file, resulted in a folder that is literally called '${CONFIGURATION}' for the multi-config ninja build. I think this is a regression from a while ago. Fix this by replacing CMAKE_CFG_INTDIR with '.'. We can only create one of the LLVMConfig.cmake files as the consuming CMake project can only import a single file. This creates LLVMConfig.cmake and others in the place where they were previously and where they are for a single-config build. Differential Revision: https://reviews.llvm.org/D139623 -
Timm Bäder authored
This reverts commit d20101db. Lifetime of the string is not what I thought it was it seems.
-
eopXD authored
Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D139025
-
Timm Bäder authored
PathStorage is only used in one of the if branches, so doesn't need to be a std::optional anyway.
-
Archibald Elliott authored
This change is rather more invasive than intended. The main intention here is to make CommandLine.cpp not rely on llvm/Support/Host.h. Right now, this reliance is only in 3 superficial places: - Choosing how to expand response files (in two places) - Printing the default triple and current CPU in `--version` output. The built in version system has a method for adding "extra version printers", commonly used by several tools (such as llc) to report the registered targets in the built version of LLVM. It was reasonably easy to move the logic for printing the default triple and current CPU into a similar function, and register it with any relevant binaries. The incompatible change here is that now, even if LLVM_VERSION_PRINTER_SHOW_HOST_TARGET_INFO is defined, most binaries will no longer print out the default target triple and cpu when provided with `--version`, for instance llvm-as and llvm-dis. This breakage is intended, but the changes in this patch keep printing the default target and detected in `llc` and `opt` as these were remarked as important binaries in the LLVM install. The change to expanding response files may also be controversial, but I believe that these macros should correspond exactly to the host triple introspection used before. Differential Revision: https://reviews.llvm.org/D137837
-
Kadir Cetinkaya authored
Fixes https://github.com/llvm/llvm-project/issues/59541. Differential Revision: https://reviews.llvm.org/D140380
-
Piyou Chen authored
RVV intrinsic function has several policy variants. Include TU, TA, TAMU, TAMA, TUMU, TUMA, MU, MA, TUM, TAM Currently, the clang side enumerates these policies, but it's hard to add a new policy. This patch use structure to replace the origin policy enumeration, and enhance some policy transform logic. This is a clean-up job that will not affect the RVV intrinsic functionality and make sure riscv_vector_builtin_cg.inc is the same as the original one. Reviewed By: kito-cheng Differential Revision: https://reviews.llvm.org/D139995
-
Qiu Chaofan authored
-
Nikita Popov authored
During scalar promotion, if there are additional potentially-aliasing loads outside the promoted set, we can still perform a load-only promotion. As the stores are retained, any potentially-aliasing loads will still read the correct value. This increases the number of load promotions in llvm-test-suite by a factor of two: | Old | New licm.NumPromotionCandidates | 4448 | 6038 licm.NumLoadPromoted | 479 | 1069 licm.NumLoadStorePromoted | 1459 | 1459 Unfortunately, this does have some impact on compile-time: http://llvm-compile-time-tracker.com/compare.php?from=57f7f0d6cf0706a88e1ecb74f3d3e8891cceabfa&to=72b811738148aab399966a0435f13b695da1c1c8&stat=instructions In part this is because we now have less early bailouts from promotion, but also due to second order effects (e.g. for one case I looked at we spend more time in SLP now). Differential Revision: https://reviews.llvm.org/D133192 -
Muhammad Omair Javaid authored
This patch fixes a typo in test/CodeGen/c-strings.c. Test was failing on AArch64/Windows.
-
Haojian Wu authored
-
Ramkumar Ramachandra authored
This is part of an effort to migrate from llvm::Optional to std::optional. 22426110 changed the way mlir-tblgen generates .inc files, emitting std::optional when an Optional attribute is specified in a .td file. It also changed several .td files hard-coding llvm::Optional to use std::optional. However, the patch excluded a few .td files in SPIRV and Bufferization hard-coding llvm::Optional. This patch fixes that defect, and after this patch, references to llvm::Optional in .cpp and .h files can be replaced mechanically. See also: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716 Signed-off-by:
Ramkumar Ramachandra <r@artagnon.com> Differential Revision: https://reviews.llvm.org/D140329
-
Jean Perier authored
Hlfir.designate was made to support substrings but so far substrings were not yet lowered to it. Implement support for them. Differential Revision: https://reviews.llvm.org/D140310
-
Carl Ritson authored
Accelerate finding the base class for a physical register by building a statically mapping table from physical registers to base classes using TableGen. Replace uses of SIRegisterInfo::getPhysRegClass with TargetRegisterInfo::getPhysRegBaseClass in order to use the computed table. Reviewed By: arsenm, foad Differential Revision: https://reviews.llvm.org/D139422
-
Carl Ritson authored
Allow targets to define a mapping from registers to register classes such that each register has exactly one base class. As registers may be in multiple register classes the base class is determined by the container class with the lowest BaseClassOrder. Only register classes with BaseClassOrder set are considered when determining the base classes. By default BaseClassOrder is unset in RegisterClass so no code is generated unless a target explicit defines one or more base register classes. Reviewed By: arsenm, foad Differential Revision: https://reviews.llvm.org/D139616
-
Sameer Sahasrabuddhe authored
This fixes the buildbot failure on reverse iteration: https://lab.llvm.org/buildbot/#/builders/54/builds/3034
-
Craig Topper authored
It's much more common to use a register class rather than a type. Add an additional i64 cast to the patterns where needed to avoid increasing isel table size.
-
Craig Topper authored
Missed this in the review of D139394. Not a functional issue because select only makes it to isel with XVentanaCondOps.
-
Craig Topper authored
-
Craig Topper authored
Removes some extra andi instructions.
-