aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-03-29[𝘀𝗽𝗿] initial versionusers/alexey-bataev/spr/slpfix-pr87011-missing-sign-extension-of-demoted-type-before-zero-1Alexey Bataev4-37/+90
Created using spr 1.3.5
2024-03-28[SLP]Fix PR87011: Do not assume that initial ext/trunc nodes can beAlexey Bataev2-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.
2024-03-28[SLP][NFC]Add a test with the incorrect sign extension of first extAlexey Bataev1-0/+29
node.
2024-03-28[scudo] Fix stack depot validation. (#87024)Christopher Ferris1-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.
2024-03-28[docs][TypeProf]Update instrumentation file format document (#83309)Mingming Liu1-0/+53
This is a follow-up to the profile format change in https://github.com/llvm/llvm-project/pull/82711
2024-03-28[nfc][docs]Generalize header description and ascii art for indexed profiles ↵Mingming Liu2-39/+43
(#83507) - Add pointers to code for source of truth. - Move necessary details from doc to code.
2024-03-29[APINotes][test] Fix permissions of a file copied from a source treeDmitri Gribenko1-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.
2024-03-28[RISCV] Extend pattern matches involving shNadd to support disjoint or (#87001)Philip Reames2-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.
2024-03-28Reapply "[clang][nullability] allow _Nonnull etc on nullable class types ↵Sam McCall21-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.
2024-03-28[LangRef] Try to clarify some Metadata semantics (#81948)Scott Linder2-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.
2024-03-28[scudo] Dump ReleaseToOsIntervalMs (#86887)ChiaHungDuan2-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.
2024-03-28[libc] Add inf/nan tests for strfrom*() functions (#86663)Vinayak Dev2-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.
2024-03-28[APINotes] Make an assert in a std::sort call tolerate self-comparisonsDmitri Gribenko1-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.
2024-03-28[AArch64][GISEL] Consider fcmp true and fcmp false in cond code selection ↵Marc Auberer3-0/+127
(#86972) Fixes #86917 `FCMP_TRUE` and `FCMP_FALSE` were previously not considered and we ended up in an llvm_unreachable assertion.
2024-03-29[RISCV] Combine ({s,u}{div,rem} (zext, zext)) -> (zext ({s,u}{div,rem} ↵Luke Lau2-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
2024-03-28[CodeGen/DWARF] Introduce DWARF tag for SwiftTail and emit it in CodeGen.Adrian Prantl3-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]
2024-03-28[MCP] Remove dead copies from basic blocks with successors. (#86973)Craig Topper13-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.
2024-03-28[DXIL] Add lowering for `reversebits` and `trunc` (#86909)Helena Kotas4-0/+67
Add lowering of `llvm.bitreverse` and `llvm.trunc` intrinsics to DXIL ops. Fixes #86582 Fixes #86581
2024-03-28Revert "[libc][math][c23] Fix X86_Binary80 special cases for canonicalize ↵Nick Desaulniers3-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
2024-03-28[memprof] Add MemProf version (#86414)Kazu Hirata5-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.
2024-03-28[SystemZ] Fix an unused variable warningKazu Hirata1-0/+1
This patch fixes: llvm/lib/Target/SystemZ/SystemZISelLowering.cpp:8181:9: error: unused variable 'TFL' [-Werror,-Wunused-variable]
2024-03-28[VPlan] Rename getVPValueOrAddLiveIn -> getOrAddLiveIn (NFCI).Florian Hahn8-31/+31
The helper now only deals with live-ins, clarify the name.
2024-03-28[lldb] Remove cmake check for pexpect with LLDB_TEST_USE_VENDOR_PACKAGES ↵Jordan Rupprecht1-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.
2024-03-28[libc][math][c23] Fix X86_Binary80 special cases for canonicalize functions. ↵Shourya Goel3-56/+54
(#86924) Updates the special case of pseudo infinty as pointed in #85940
2024-03-28[lld-macho] Disable objc test on 32-bit ARM targetsLeandro Lupori1-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.
2024-03-28[SLP][NFC]Simplify function/constructors by removing unnecessary params.Alexey Bataev1-16/+14
2024-03-28[libclc] Track dependencies through dependency files (#86965)Fraser Cormack1-0/+1
This commit fixes the problem of missing build dependencies between libclc source files and their various includes (namely headers and .inc files). We would like to do this with compiler-generated dependency files because then the dependencies are accurate and there are no false positives, leading to unnecessary rebuilds. This is how regular C/C++ dependencies are usually tracked by CMake. Note that this variable is an internal API so is not guaranteed to work, but then again *all* of CMake's support for new languages (which we use for CLC/LL languages) is an internal API. On balance this change is probably worth it due to how minimally invasive it is. It should work with all supported compilers and CMake generators.
2024-03-28[clang][modules] Avoid calling expensive `SourceManager::translateFile()` ↵Jan Svoboda6-50/+78
(#86216) The `ASTWriter` algorithm for computing affecting module maps uses `SourceManager::translateFile()` to get a `FileID` from a `FileEntry`. This is slow (O(n)) since the function performs a linear walk over `SLocEntries` until it finds one with a matching `FileEntry`. This patch removes this use of `SourceManager::translateFile()` by tracking `FileID` instead of `FileEntry` in couple of places in `ModuleMap`, giving `ASTWriter` the desired `FileID` directly. There are no changes required for clients that still want a `FileEntry` from `ModuleMap`: the existing APIs internally use `SourceManager` to perform the reverse `FileID` to `FileEntry` conversion in O(1).
2024-03-28[X86] Add isLogicOp helper to match ISD::AND/OR/XOR and X86ISD::ANDNPSimon Pilgrim1-2/+6
We could easily support the X86ISD 'float' variants of the logic ops as well, but we don't have good test coverage at the moment (they're mainly for SSE1 targets).
2024-03-28[RISCV] Add add_like PatFrags to reduce number of required patterns [nfc] ↵Philip Reames2-9/+7
(#86983) This is an NFC prep patch for an upcoming change which is going to support or_is_add in a bunch more cases. Posting separately because tblgen is not particularly my strong suit.
2024-03-28[HLSL] Add validation for the -enable-16bit-types option (#85340)Joshua Batista6-5/+62
Previously, the clang compiler with the dxc driver would accept the -enable-16bit-types flag without checking to see if the required conditions are met for proper processing of the flag. Specifically, -enable-16bit-types requires a shader model of at least 6.2 and an HLSL version of at least 2021. This PR adds a validation check for these other options having the required values, and emits an error if these constraints are not met. Fixes #57876 --------- Co-authored-by: Damyan Pepper <damyanp@microsoft.com> Co-authored-by: Chris B <cbieneman@microsoft.com>
2024-03-28[mlir][bazel] Export headers either from :Transforms or :TransformUtils (#86819)Christian Sigg6-12/+116
Split them according to their implementation. Ideally, header files should be used by only one target, but this is hard because CMake is less strict with headers (no layering check). But even with bazel, headers should only be exported once in the `hdrs` attribute. Other targets may use them in the `srcs` attribute to avoid circular dependencies.
2024-03-28Remove an accidental duplicate C status page entryAaron Ballman1-5/+0
2024-03-28[LVI] Use m_AddLike instead of m_Add when matching simple conditionNoah Goldstein3-8/+5
We have more complete logic for handling `Add`, so try to use that logic for `or disjoint` (which can definitionally be treated as `add`). Closes #86058
2024-03-28[LVI] Add tests for tracking `or disjoint` like add; NFCNoah Goldstein2-0/+79
2024-03-28[ValueTracking] Tracking `or disjoint` conditions as `add` in ↵Noah Goldstein2-4/+3
Assumption/DomCondition Cache We can definitionally treat `or disjoint` as `add` anywhere. Closes #86302
2024-03-28[ValueTracking] Add basic tests tracking `or disjoint` conditions as `add`; NFCNoah Goldstein1-0/+52
2024-03-28[C99] Claim conformance to WG14 N590 (#86985)Aaron Ballman3-1/+394
This adds test coverage for implementation limits that were defined in WG14 N590. The original content of that paper is not available, so this actually tests against the limits as of C23.
2024-03-28[libc++abi] Disable forced_unwind4 test for musl. (#85096)Alastair Houghton1-2/+2
This test won't pass on musl, but we should still run it for other Linux platforms. rdar://123436716
2024-03-28[mlir][spirv] Add IsInf/IsNan expansion for WebGPU (#86903)Jakub Kuderski3-16/+82
These non-finite math ops are supported by SPIR-V but not by WGSL. Assume finite floating point values and expand these ops into `false`. Previously, this worked by adding fast math flags during conversion from arith to spirv, but this got removed in https://github.com/llvm/llvm-project/pull/86578. Also do some misc cleanups in the surrounding code.
2024-03-28[clang] Add invalid check in NormalizedConstraint::fromConstraintExpr. (#86943)Haojian Wu1-0/+2
This is an oversight spot in #86869, we should always check the invalid bit after constructing the `Sema::InstantiatingTemplate` RAII object.
2024-03-28[mlir] fix empty spaces in bazel fileYijia Gu1-1/+1
2024-03-28[AIX] Handle toc-data offset overflowing 16-bits (#80092)Zaara Syeda2-4/+78
When the toc-data offset overflows the 16-bits, we can truncate the value to the 16-bit value as the linker will handle overflow through fixup code.
2024-03-28[mlir] propagate silenceable failures in transform.foreach_match (#86956)Oleksandr "Alex" Zinenko2-2/+95
The original implementation was eagerly reporting silenceable failures from actions as definite failures. Since silenceable failures are intended for cases when the IR has not been irreversibly modified, it's okay to propagate them as silenceable failures of the parent op. Fixes #86834.
2024-03-28[mlir] fix bazel error for MatchInterfaces dialectYijia Gu1-4/+4
2024-03-28[mlir][tensor] Fold producer linalg transpose with consumer unpack an… ↵Prashant Kumar2-46/+238
(#86795) …d viceversa -- Adds folding of producer linalg transpose op with consumer unpack op, also adds folding of producer unpack op and consumer transpose op. -- Minor bug fixes w.r.t. to the test cases.
2024-03-28[HLSL] prevent generation of wrong double intrinsics. (#86932)Andrii Levitskiy5-48/+11
As #86555, we should cover all of non-double builtins. Closes #86818
2024-03-28[BOLT] Add rewriting support for Linux kernel __bug_table (#86908)Maksim Panchenko2-10/+81
Update instruction locations in the __bug_table section after new code is emitted. If an instruction with associated bug ID was deleted, overwrite its location with zero.
2024-03-28[SPIR-V] Fix paths when copying spriv-dis and spirv-val on windows (#86876)Justin Bogner1-2/+2
We need `CMAKE_EXECUTABLE_SUFFIX` here so we get the paths right when they end in `.exe`.
2024-03-28[SystemZ] Eliminate call sequence instructions early. (#77812)Jonas Paulsson14-50/+45
On SystemZ, the outgoing argument area which is big enough for all calls in the function is created once during the prolog, as opposed to adjusting the stack around each call. The call-sequence instructions are therefore not really useful any more than to compute the maximum call frame size, which has so far been done by PEI, but can just as well be done at an earlier point. This patch removes the mapping of the CallFrameSetupOpcode and CallFrameDestroyOpcode and instead computes the MaxCallFrameSize directly after instruction selection and then removes the ADJCALLSTACK pseudos. This removes the confusing pseudos and also avoids the problem of having to keep the call frame size accurate when creating new MBBs. This fixes #76618 which exposed the need to maintain the call frame size when splitting blocks (which was not done).