summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [𝘀𝗽𝗿] initial versionupstream/users/alexey-bataev/spr/slpimprove-reordering-for-consts-splats-and-ops-from-same-nodes-improved-analysisAlexey Bataev2024-03-2911-178/+212
| | | | Created using spr 1.3.5
* [GlobalIsel] add trunc flags (#87045)Thorsten Schütt2024-03-292-0/+96
| | | https://github.com/llvm/llvm-project/pull/85592
* [Libomptarget][NFCI] Move logic out of PluginAdaptorTy (#86971)Joseph Huber2024-03-292-61/+47
| | | | | | | | | | | Summary: This patch removes most of the special handling from the `PluginAdaptorTy` in preparation for changing this to be the `GenericPluginTy`. Doing this requires that the OpenMP specific handling of stuff like device offsets be contained within the OpenMP plugin manager. Generally this was uninvasive expect for the change to tracking the offset and size of the used devices. The eaiest way I could think to do this was to use some maps, which double as indicators for which plugins have devices active. This should not affect the logic.
* [RISCV] Add test case for vmerge fold for tied pseudos with rounding mode. NFCLuke Lau2024-03-291-0/+17
|
* [RISCV] Combine (or disjoint ext, ext) -> vwadd (#86929)Luke Lau2024-03-292-17/+27
| | | | | | | | DAGCombiner (or InstCombine) will convert an add to an or if the bits are disjoint, which can prevent what was originally an (add {s,z}ext, {s,z}ext) from being selected as a vwadd. This teaches combineBinOp_VLToVWBinOp_VL to recover it by treating it as an add.
* [gn build] Port 316634ff5925LLVM GN Syncbot2024-03-291-0/+5
|
* [RISCV] Add more disjoint or tests for vwadd[u].{w,v}v. NFCLuke Lau2024-03-291-2/+58
|
* [libc++] Remove <queue> and <stack> includes from <format> (#85520)Nikolas Klauser2024-03-2926-43/+187
| | | This reduces the include time of <format> from 691ms to 556ms.
* [libc++][NFC] Use __copy_cv to implement __apply_cv (#86477)Nikolas Klauser2024-03-291-45/+5
|
* Fix calls to PrintedDeclCXX98Matches. (#86741)Zahira Ammarguellat2024-03-291-25/+29
| | | | Fix the calls to `PrintedDeclCXX98Matches` to take the lambda function as the last argument.
* Revert "[ProfileData] Use size_t in PatchItem (NFC) (#87014)"Muhammad Omair Javaid2024-03-291-7/+7
| | | | | | | This reverts commit c64a328cb4a32e81f8b694162750ec1b8823994c. This broke Arm32 bit build on various LLVM buildbots. For example: https://lab.llvm.org/buildbot/#/builders/17/builds/51129
* [NFC] [Decl] Introduce Decl::isFromExplicitGlobalModuleChuanqi Xu2024-03-294-14/+17
| | | | | | Introduce `Decl::isFromExplicitGlobalModule` to replace the `D->getOwningModule() && D->getOwningModule()->isExplicitGlobalModule()` pattern to save some typings.
* Add missing declarations of explicit template instantiations. (#86964)Thomas Köppe2024-03-291-0/+1
| | | Found with -Wundefined-func-template.
* [gn build] Port 1d99d7a6f841LLVM GN Syncbot2024-03-291-0/+1
|
* [X86][MC] Support enc/dec for IMULZU. (#86653)Freddy Ye2024-03-296-0/+175
| | | | | apx-spec: https://cdrdv2.intel.com/v1/dl/getContent/784266 apx-syntax-recommendation: https://cdrdv2.intel.com/v1/dl/getContent/817241
* Revert "Reapply "[clang][nullability] allow _Nonnull etc on nullable class ↵dyung2024-03-2921-226/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | types (#82705)"" (#87041) This reverts commit bbbcc1d99d08855069f4501c896c43a6d4d7b598. This change is causing the following build bots to fail due to a missing header file: - https://lab.llvm.org/buildbot/#/builders/188/builds/43765 - https://lab.llvm.org/buildbot/#/builders/176/builds/9428 - https://lab.llvm.org/buildbot/#/builders/187/builds/14696 - https://lab.llvm.org/buildbot/#/builders/186/builds/15551 - https://lab.llvm.org/buildbot/#/builders/182/builds/9413 - https://lab.llvm.org/buildbot/#/builders/245/builds/22507 - https://lab.llvm.org/buildbot/#/builders/258/builds/16026 - https://lab.llvm.org/buildbot/#/builders/249/builds/17221 - https://lab.llvm.org/buildbot/#/builders/38/builds/18566 - https://lab.llvm.org/buildbot/#/builders/214/builds/11735 - https://lab.llvm.org/buildbot/#/builders/231/builds/21947 - https://lab.llvm.org/buildbot/#/builders/230/builds/26675 - https://lab.llvm.org/buildbot/#/builders/57/builds/33922 - https://lab.llvm.org/buildbot/#/builders/124/builds/10311 - https://lab.llvm.org/buildbot/#/builders/109/builds/86173 - https://lab.llvm.org/buildbot/#/builders/280/builds/1043 - https://lab.llvm.org/buildbot/#/builders/283/builds/440 - https://lab.llvm.org/buildbot/#/builders/247/builds/16034 - https://lab.llvm.org/buildbot/#/builders/139/builds/62423 - https://lab.llvm.org/buildbot/#/builders/216/builds/36718 - https://lab.llvm.org/buildbot/#/builders/259/builds/2039 - https://lab.llvm.org/buildbot/#/builders/36/builds/44091 - https://lab.llvm.org/buildbot/#/builders/272/builds/12629 - https://lab.llvm.org/buildbot/#/builders/271/builds/6020 - https://lab.llvm.org/buildbot/#/builders/236/builds/10319
* [SDAG] Use shifts if ISD::MUL is illegal when lowering ISD::CTPOP (#86505)Wang Pengcheng2024-03-2918-1120/+839
| | | | | We can avoid libcalls. Fixes #86205
* [mlir][bazel] Remove unsed BUILD dependencies. (#87038)Christian Sigg2024-03-291-383/+44
| | | | | | | | | | | | | | This is the second attempt of 32fcfcdc4cc1d68116438f761897953894d65fb1, which had to be reverted. This should be good to go now, after a number of cleanups to not expose headers from multiple targets: - 6e58efac16958ccb99060f4329b48737be7d8d36 - f1dff836593d4601e3ad78117df1d980d284bb9c - 89ef3130cf16f1965475396ad3a50760558cc08a - eb70b485a91361eee83d3744d1bd3e4c3a23692f - 83e5a1239242d64110e3dfa96ed3889170ab96b2 - fce046ca5b7edb4c0d37a6eb580154ccb7dda966
* [C++20] [Modules] [Reduced BMI] Don't record declarations in functionsChuanqi Xu2024-03-292-0/+37
| | | | | | | | | | | by default For reduced BMI, it is meaningless to record the local declarations in functions if not required explicitly during the process of writing the function bodies. It wastes time for reduced BMI and may be problematic if we want to avoid transiting unnecessary changes.
* [IR] Add nowrap flags for trunc instruction (#85592)elhewaty2024-03-2915-20/+281
| | | | | | | This patch adds the nuw (no unsigned wrap) and nsw (no signed wrap) poison-generating flags to the trunc instruction. Discourse thread: https://discourse.llvm.org/t/rfc-add-nowrap-flags-to-trunc/77453
* [LLDB] Add APFloat helper functions to Scalar class. (#86862)cmtice2024-03-283-0/+105
| | | | This adds the ability to create a Scalar from an APFloat, and to create an APFloat from an APSInt or another APFloat.
* [RISCV][TypePromotion] Dont generate truncs if PromotedType is greater than ↵Sudharsan Veeravalli2024-03-282-1/+28
| | | | | | | | | | Source Type (#86941) We currently check if the source and promoted types are not equal before generating truncate instructions. This does not work for RV64 where the promoted type is i64 and this lead to a crash due to the generation of truncate instructions from i32 to i64. Fixes #86400
* [ProfileData] Use size_t in PatchItem (NFC) (#87014)Kazu Hirata2024-03-281-7/+7
| | | size_t in PatchItem eliminates the need for casts.
* [SampleFDO][NFC] Refactoring SampleProfileMatcher (#86988)Lei Wang2024-03-288-671/+718
| | | | Move all the stale profile matching stuffs into new files so that it can be shared for unit testing.
* [bazel] Fix lit tests with python 3.11+ (#87022)Keith Smiley2024-03-282-0/+2
| | | | | | | | | | | In python3.11 there is a new environment variable PYTHONSAFEPATH which stops python from setting the current directory as the first entry in sys.path. Bazel started setting this to ensure that python targets don't accidentally access things that aren't in their dependency tree. This resulted in lit tests breaking because sys.path didn't include the directory to the lit source files. This is fixed by adding the lit binary to the dependency tree and propagating the import path from it. Fixes https://github.com/llvm/llvm-project/issues/75963
* [NFC] [HWASan] add example for ring buffer wrap (#87029)Florian Mayer2024-03-281-2/+16
| | | Also another move comment to correct place.
* [SLP]Fix PR87011: Do not assume that initial ext/trunc nodes can beAlexey Bataev2024-03-282-5/+11
| | | | | | | represented by bitwidth without analysis. Need to check that initial ext/trunc nodes can be safely represented using calculated bitwidth before applying it.
* [SLP][NFC]Add a test with the incorrect sign extension of first extAlexey Bataev2024-03-281-0/+29
| | | | node.
* [scudo] Fix stack depot validation. (#87024)Christopher Ferris2024-03-281-1/+1
| | | | | | | In the StackDepot::isValid function, there is work to validate the TabMask variable. Unfortunately, if TabMask is set to the maximum allowed value, TabSize = TabMask + 1 becomes zero and validation passes. Disallow that case to prevent invalid reads into the Tab structure.
* [docs][TypeProf]Update instrumentation file format document (#83309)Mingming Liu2024-03-281-0/+53
| | | This is a follow-up to the profile format change in https://github.com/llvm/llvm-project/pull/82711
* [nfc][docs]Generalize header description and ascii art for indexed profiles ↵Mingming Liu2024-03-282-39/+43
| | | | | | (#83507) - Add pointers to code for source of truth. - Move necessary details from doc to code.
* [APINotes][test] Fix permissions of a file copied from a source treeDmitri Gribenko2024-03-291-0/+1
| | | | | | | Our CI system makes the source tree read-only. The 'cp' command that copies a directory from the source tree into a temp directory preserves permissions, and the copied files stay read-only. When the test tries to append to one of these files, it fails with a "permission denied" error.
* [RISCV] Extend pattern matches involving shNadd to support disjoint or (#87001)Philip Reames2024-03-282-25/+114
| | | | I tried to add representative tests while not duplicating complete coverage. If there's other tests you'd like to see, let me know.
* Reapply "[clang][nullability] allow _Nonnull etc on nullable class types ↵Sam McCall2024-03-2821-29/+226
| | | | | | | | | | | (#82705)" This reverts commit ca4c4a6758d184f209cb5d88ef42ecc011b11642. This was intended not to introduce new consistency diagnostics for smart pointer types, but failed to ignore sugar around types when detecting this. Fixed and test added.
* [LangRef] Try to clarify some Metadata semantics (#81948)Scott Linder2024-03-282-18/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | General cleanup in LangRef (and two outdated comments in LLParser.cpp) with the aim of making it easier to understand some of the terminology and subtle idiosyncrasies related to metadata in the IR. I'm still not happy with the fact that "node" is used both informally and with a particular category of metadata in mind, depending on the context. This also bleeds into the type names in the implementation. There are also several places where names from the implementation appear in the document with no other context or definition. In some cases I added a parenthetical to section titles to tie the two together, but I don't think this is ideal. I also think it might be useful to define the "abstract" metadata classes like "DIScope" in the document, so the hierarchy of metadata node kinds is direct, and so we can avoid repetitive descriptions of all of the members of on part of the hierarchy. This inheritance doesn't have to be in terms of C++ classes, but using the same names as the implementation seems helpful, and we already do it for many other things. Finally I added sections for the specialized nodes which are implemented in the IR but didn't have documentation in LangRef yet. These could use some work, and I admit I didn't dig too deep into the specifics beyond enumerating the fields, but I think we would ideally always have a LangRef section for every kind of node.
* [scudo] Dump ReleaseToOsIntervalMs (#86887)ChiaHungDuan2024-03-282-6/+9
| | | | This can be adjusted during runtime and it may impact the memory footprint if it's set to a big value or is disabled.
* [libc] Add inf/nan tests for strfrom*() functions (#86663)Vinayak Dev2024-03-282-7/+73
| | | | | | | Adds tests for `inf` and `nan` values to the tests for `strfrom*()` functions. Also marks some variables as `[[maybe_unused]]` to silence unused variable warnings.
* [APINotes] Make an assert in a std::sort call tolerate self-comparisonsDmitri Gribenko2024-03-281-1/+1
| | | | | | | | | | | | libc++ debug mode verifies that a comparator passed to std::sort defines a strict weak order by calling it with the same element. See also: - RFC that introduced the feature: https://discourse.llvm.org/t/rfc-strict-weak-ordering-checks-in-the-debug-libc/70217 - `strict_weak_ordering_check.h` in libc++ sources.
* [AArch64][GISEL] Consider fcmp true and fcmp false in cond code selection ↵Marc Auberer2024-03-283-0/+127
| | | | | | | | (#86972) Fixes #86917 `FCMP_TRUE` and `FCMP_FALSE` were previously not considered and we ended up in an llvm_unreachable assertion.
* [RISCV] Combine ({s,u}{div,rem} (zext, zext)) -> (zext ({s,u}{div,rem} ↵Luke Lau2024-03-292-18/+36
| | | | | | | | | | | | | | (zext, zext))) (#86779) This narrows unsigned and signed div and rem nodes via combineBinOpOfZExt. Unlike other binary ops, there are no widening div or rem instructions. So we will end up with an extra vzext.vf2. However I'm assuming that div/rem are expensive enough that by reducing their EMUL we will gain back the cost. Alive2 proof: https://alive2.llvm.org/ce/z/Et_L6y
* [CodeGen/DWARF] Introduce DWARF tag for SwiftTail and emit it in CodeGen.Adrian Prantl2024-03-283-6/+5
| | | | | | | | | | swifttailcc is a new calling convention in LLVM introduced in https://reviews.llvm.org/D95443. We add a new DWARF tag to capture this in debuginfo. Differential Revision: https://reviews.llvm.org/D95704 [Note: This patch seems to have been forgotten about, landing it now with considerable delay]
* [MCP] Remove dead copies from basic blocks with successors. (#86973)Craig Topper2024-03-2813-43/+40
| | | | | | | | | | Previously we wouldn't remove dead copies from basic blocks with successors. The comment said we didn't want to trust the live-in lists. The comment is very old so I'm not sure if that's still a concern today. This patch checks the live-in lists and removes copies from MaybeDeadCopies if they are referenced by any live-ins in any successors. We only do this if the tracksLiveness property is set. If that property is not set, we retain the old behavior.
* [DXIL] Add lowering for `reversebits` and `trunc` (#86909)Helena Kotas2024-03-284-0/+67
| | | | | | | Add lowering of `llvm.bitreverse` and `llvm.trunc` intrinsics to DXIL ops. Fixes #86582 Fixes #86581
* Revert "[libc][math][c23] Fix X86_Binary80 special cases for canonicalize ↵Nick Desaulniers2024-03-283-54/+56
| | | | | | | | | | | | | | functions. (#86924)" This reverts commit 7c1c07c92099d3e36e8f362706a5824ab04bdf38. Fails in presubmit. Link: https://lab.llvm.org/buildbot/#/builders/90/builds/67461 Link: https://lab.llvm.org/buildbot/#/builders/225/builds/33519 Link: https://lab.llvm.org/buildbot/#/builders/163/builds/53858 Link: https://lab.llvm.org/buildbot/#/builders/250/builds/20983 Link: #86924
* [memprof] Add MemProf version (#86414)Kazu Hirata2024-03-285-18/+91
| | | | | | | | | | | | This patch adds a version field to the MemProf section of the indexed profile format, calling the new version "version 1". The existing version is called "version 0". The writer supports both versions via a command-line option: llvm-profdata merge --memprof-version=1 ... The reader supports both versions by automatically detecting the version from the header.
* [SystemZ] Fix an unused variable warningKazu Hirata2024-03-281-0/+1
| | | | | | | This patch fixes: llvm/lib/Target/SystemZ/SystemZISelLowering.cpp:8181:9: error: unused variable 'TFL' [-Werror,-Wunused-variable]
* [VPlan] Rename getVPValueOrAddLiveIn -> getOrAddLiveIn (NFCI).Florian Hahn2024-03-288-31/+31
| | | | The helper now only deals with live-ins, clarify the name.
* [lldb] Remove cmake check for pexpect with LLDB_TEST_USE_VENDOR_PACKAGES ↵Jordan Rupprecht2024-03-281-17/+0
| | | | | | | | | | | | | | | | | | (#86962) The commit 8bed754c2f965c8cbbb050be6f650b78f7fd78a6 was intended to support the use case where users want to run all the LLDB tests in an environment where pexpect is not installed. Those users can build with `-DLLDB_TEST_USER_ARGS=--skip-category=pexpect` to skip pexpect tests, *but* because we still fail in cmake configuration, they must use `-DLLDB_TEST_USE_VENDOR_PACKAGES=ON` to avoid failing due to pexpect not being available. I would like to remove `LLDB_TEST_USE_VENDOR_PACKAGES` now, but first I'd like to make sure users w/o pexpect can pass CI with `-DLLDB_TEST_USE_VENDOR_PACKAGES=OFF -DLLDB_TEST_USER_ARGS=--skip-category=pexpect`. Once that is done, I am not aware of any other issues caused by the previous commits, so the third party tree should be safe to remove.
* [libc][math][c23] Fix X86_Binary80 special cases for canonicalize functions. ↵Shourya Goel2024-03-283-56/+54
| | | | | (#86924) Updates the special case of pseudo infinty as pointed in #85940
* [lld-macho] Disable objc test on 32-bit ARM targetsLeandro Lupori2024-03-281-0/+1
| | | | | | | | | lld/test/MachO/objc-relative-method-lists-simple.s fails on AArch64 hosts running 32-bit ARM binaries, such as armv8l-unknown-linux-gnueabihf. Disable the test on the failing targets for now, to keep the buildbots passing.