summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* improve test, rebaseupstream/users/lanza/sprcirgenmodule-buildtopleveldecl-huskNathan Lanza2024-05-03816-22738/+49289
|\ | | | | | | Created using spr 1.3.5
| * Revert "[lldb] Unify CalculateMD5 return types" (#90998)Jonas Devlieghere2024-05-039-60/+52
| | | | | | Reverts llvm/llvm-project#90921
| * [InstCombine] Add example usage for new Checked matcher APINoah Goldstein2024-05-032-20/+12
| | | | | | | | | | | | | | | | There is no real motivation for this change other than to highlight a case where the new `Checked` matcher API can handle non-splat-vecs without increasing code complexity. Closes #85676
| * [InstCombine] Add non-splat test for `(icmp (lshr x, y), x)`; NFCNoah Goldstein2024-05-031-8/+55
| |
| * [PatternMatching] Add generic API for matching constants using custom conditionsNoah Goldstein2024-05-032-0/+210
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new API is: `m_CheckedInt(Lambda)`/`m_CheckedFp(Lambda)` - Matches non-undef constants s.t `Lambda(ele)` is true for all elements. `m_CheckedIntAllowUndef(Lambda)`/`m_CheckedFpAllowUndef(Lambda)` - Matches constants/undef s.t `Lambda(ele)` is true for all elements. The goal with these is to be able to replace the common usage of: ``` match(X, m_APInt(C)) && CustomCheck(C) ``` with ``` match(X, m_CheckedInt(C, CustomChecks); ``` The rationale if we often ignore non-splat vectors because there are no good APIs to handle them with and its not worth increasing code complexity for such cases. The hope is the API creates a common method handling scalars/splat-vecs/non-splat-vecs to essentially make this a non-issue.
| * [Inliner] Propagate callee argument memory access attributes before inliningNoah Goldstein2024-05-034-31/+108
| | | | | | | | | | | | | | | | | | | | To avoid losing information, we can propagate some access attribute from the to-be-inlined callee to its callsites. We can propagate argument memory access attributes to callsite parameters if they are from the same underlying object. Closes #89024
| * [Inliner] Add tests for not propagating `writable` if `readonly` is present; NFCNoah Goldstein2024-05-031-1/+44
| |
| * [AMDGPU] Allow the `__builtin_flt_rounds` functions on AMDGPU (#90994)Joseph Huber2024-05-032-8/+20
| | | | | | | | | | | | Summary: Previous patches added support for the LLVM rounding intrinsic functions. This patch allows them to me emitted using the clang builtins when targeting AMDGPU.
| * [lldb] Unify CalculateMD5 return types (#90921)Anthony Ha2024-05-039-52/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # Overview In my previous PR: https://github.com/llvm/llvm-project/pull/88812, @JDevlieghere suggested to match return types of the various calculate md5 functions. This PR achieves that by changing the various calculate md5 functions to return `llvm::ErrorOr<llvm::MD5::MD5Result>`.   The suggestion was to go for `std::optional<>` but I opted for `llvm::ErrorOr<>` because local calculate md5 was already possibly returning `ErrorOr`. To make sure I didn't break the md5 calculation functionality, I ran some tests for the gdb remote client, and things seem to work. # Testing 1. Remote file doesn't exist ![image](https://github.com/llvm/llvm-project/assets/1326275/b26859e2-18c3-4685-be8f-c6b6a5a4bc77) 1. Remote file differs ![image](https://github.com/llvm/llvm-project/assets/1326275/cbdb3c58-555a-401b-9444-c5ff4c04c491) 1. Remote file matches ![image](https://github.com/llvm/llvm-project/assets/1326275/07561572-22d1-4e0a-988f-bc91b5c2ffce) ## Test gaps Unfortunately, I had to modify `lldb/source/Plugins/Platform/MacOSX/PlatformDarwinDevice.cpp` and I can't test the changes there. Hopefully, the existing test suite / code review from whomever is reading this will catch any issues. Co-authored-by: Anthony Ha <antha@microsoft.com>
| * [flang][cuda] Add verifier for cuda_alloc/cuda_free (#90983)Valentin Clement (バレンタイン クレメン)2024-05-033-0/+35
| | | | | | Adding a verifier to check the associated cuda attribute.
| * [VectorCombine] Add foldShuffleToIdentity (#88693)David Green2024-05-034-146/+212
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a basic version of a combine that attempts to remove shuffles that when combined simplify away to an identity shuffle. For example: %ab = shufflevector <8 x half> %a, <8 x half> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0> %at = shufflevector <8 x half> %a, <8 x half> poison, <4 x i32> <i32 7, i32 6, i32 5, i32 4> %abt = fneg <4 x half> %at %abb = fneg <4 x half> %ab %r = shufflevector <4 x half> %abt, <4 x half> %abb, <8 x i32> <i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0> By looking through the shuffles and fneg, it can be simplified to: %r = fneg <8 x half> %a The code tracks each lane starting from the original shuffle, keeping a track of a vector of {src, idx}. As we propagate up through the instructions we will either look through intermediate instructions (binops and unops) or see a collections of lanes that all have the same src and incrementing idx (an identity). We can also see a single value with identical lanes, which we can treat like a splat. Only the basic version is added here, handling identities, splats, binops and unops. In follow-up patches other instructions can be added such as constants, intrinsics, cmp/sel and zext/sext/trunc.
| * [StandardInstrumentation] Annotate loops with the function name (#90756)annamthomas2024-05-0310-27/+28
| | | | | | | | When analyzing pass debug output it is helpful to have the function name along with the loop name.
| * [lldb] Add TeeLogHandler to log to 2 handlers (#90984)Jonas Devlieghere2024-05-033-0/+43
| | | | | | | | | | | | | | Add a T-style log handler that multiplexes messages to two log handlers. The goal is to use this in combination with the SystemLogHandler to log messages both to the user requested file as well as the system log. The latter is part of a sysdiagnose on Darwin which is commonly attached to bug reports.
| * [lldb][NFCI] Unify DW_TAG -> string conversions (#90657)Alex Langford2024-05-036-78/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The high level goal is to have 1 way of converting a DW_TAG value into a human-readable string. There are 3 ways this change accomplishes that: 1.) Changing DW_TAG_value_to_name to not create custom error strings. The way it was doing this is error-prone: Specifically, it was using a function-local static char buffer and handing out a pointer to it. Initialization of this is thread-safe, but mutating it is definitely not. Multiple threads that want to call this function could step on each others toes. The implementation in this patch sidesteps the issue by just returning a StringRef with no mention of the tag value in it. 2.) Changing all uses of DW_TAG_value_to_name to log the value of the tag since the function doesn't create a string with the value in it anymore. 3.) Removing `DWARFBaseDIE::GetTagAsCString()`. Callers should call DW_TAG_value_to_name on the tag directly.
| * [LV] Add test showing miscompile with store reductions and RT checks.Florian Hahn2024-05-031-9/+44
| | | | | | | | | | | | Add anew test showing how a loop gets vectorized incorrectly with a invariant store reduction where the same location is also read, when vectorizing with runtime checks.
| * [AMDGPU] Fix mode register pass for constrained FP operations (#90085)Abhinav Garg2024-05-032-4/+8
| | | | | | | | | | This PR will fix the si-mode-register pass which is inserting an extra setreg instruction in case of constrained FP operations. This pass will be ignored for strictfp functions.
| * [mlir][sparse] test optimization of binary-valued operations (#90986)Aart Bik2024-05-031-0/+145
| | | | | | | | Make sure consumer-producer fusion happens (to avoid the temporary dense tensor) and constant folding occurs in the generated code.
| * [mlir,test] Convert text files from CRLF to LFFangrui Song2024-05-034-98/+98
| |
| * [clang,test] Convert text files from CRLF to LFFangrui Song2024-05-0357-2974/+2974
| | | | | | | | Skip files with intentional CRLF line endings.
| * AMDGPU: Use umin in set.rounding expansionMatt Arsenault2024-05-032-111/+57
| | | | | | | | Addresses comment from #88587
| * [docs,utils] Convert text files from CRLF to LFFangrui Song2024-05-037-1185/+1185
| | | | | | | | Skip *.bat, *.natvis, utils/lit/tests/Inputs/shtest-shell/diff-in.dos
| * [test] Convert text files from CRLF to LFFangrui Song2024-05-0323-2207/+2207
| | | | | | | | Skip *.pdb, *.rc, *crlf*, and FileCheck/dos-style-eol.txt
| * [test] Fix CodeGen/DirectX/strip-fn-attrs.llFangrui Song2024-05-031-2/+1
| |
| * [FMV][AArch64] Don't optimize backward compatible features in resolver. (#90928)Pavel Iliin2024-05-032-4/+35
| | | | | | | | | | | | | | | | | | | | | | For arch64 features, such as Branch Target Identification or MTE (Memory Tagging Extension), compatible with targets that lack their support we may encounter scenarios where a binary compiled with MTE for example is executed on both MTE and non-MTE hardware and we still need to detect at runtime whether the MTE feature is available to choose the appropriate function version. So, we cannot optimize the function multi versioning resolver by removing checks for these features enabled for the target during compilation.
| * [CostModel][X86] Treat lrint/llrint as fptosi calls (#90883)Simon Pilgrim2024-05-036-484/+508
| | | | | | | | | | X86 can use the CVTP2SI instructions to lower lrint/llrint calls, which have the same costs as the CVTTP2SI (fptosi) instructions Followup to #90065
| * [DAGCombiner] In mergeTruncStore, make sure we aren't storing shifted in ↵Craig Topper2024-05-032-2/+8
| | | | | | | | | | | | | | | | | | bits. (#90939) When looking through a right shift, we need to make sure that all of the bits we are using from the shift come from the shift input and not the sign or zero bits that are shifted in. Fixes #90936.
| * [tools,test] Convert text files from CRLF to LFFangrui Song2024-05-0316-662/+662
| |
| * [DebugInfo,test] Convert text files from CRLF to LFFangrui Song2024-05-0374-2072/+2072
| |
| * [AArch64] Add test for #90936. NFCCraig Topper2024-05-031-0/+18
| |
| * [lldb] Always emit diagnostic events to the system log (#90913)Jonas Devlieghere2024-05-031-0/+3
| | | | | | | | Always emit diagnostic events to the system log so that they end up in the sysdiagnose on Darwin.
| * SystemZ: Fold copy of vector immediate to gr128 (#90706)Matt Arsenault2024-05-033-0/+243
| | | | | | | | | | | | If materializing a constant in a vector register that is just going to be copied to general registers, directly materialize the immediate in the gpr. This will avoid a few lit test regressions in a future commit.
| * [clang-tools-extra,test] Convert text files from CRLF to LFFangrui Song2024-05-0310-158/+158
| | | | | | | | | | | | | | | | | | Skip files with intentional CRLF line endings: test/clang-apply-replacements/crlf.cpp test/clang-apply-replacements/Inputs/crlf/crlf.cpp.expected clangd/test/input-mirror.test clangd/test/protocol.test clangd/test/too-large.test
| * AMDGPU: Try to fix build error with old gccMatt Arsenault2024-05-032-56/+57
| |
| * [RISCV] Make parseArchString only accept [a-z0-9_]. (#90879)Craig Topper2024-05-033-6/+7
| | | | | | Similar change was recently made to parseNormalizedArchString.
| * [RISCV] Add partial validation of Z extension name to ↵Craig Topper2024-05-033-2/+16
| | | | | | | | | | | | | | RISCVISAInfo::parseNormalizedArchString (#90895) If 'z' is given as the complete extension name or with a digit after it, it will crash in the extension map compare function. Check for these cases and give an error.
| * [lld,test] Convert text files from CRLF to LFFangrui Song2024-05-034-116/+116
| |
| * [lldb] Create a single Severity enum in lldb-enumerations (#90917)Jonas Devlieghere2024-05-0320-203/+164
| | | | | | | | We have 3 different enums all expressing severity (info, warning, error). Remove all uses with a new Severity enum in lldb-enumerations.h.
| * [clangd] use existing functions for code locations in the scopify enum tweak ↵Julian Schmidt2024-05-031-27/+11
| | | | | | | | | | | | (#88737) Clangd already implements some utility functions for converting between `SourceLocation`s, `Position`s and `Offset`s into a buffer.
| * [mlir][linalg] Vectorize unpack op without masking (#89067)Prashant Kumar2024-05-032-32/+145
| | | | | | | | Enables vectorization of unpack op in the case of unknown vector size. The vector sizes are determined by the result's shape.
| * [libc++][modules] Uses _LIBCPP_USING_IF_EXISTS. (#90409)Mark de Wever2024-05-0333-1023/+1023
| | | | | | | | | | This attribute is used in the headers. Not using this in the modules has led to several issues. Add them to the modules to avoid these errors in other placed.
| * Revert "[NFC] Enable atomic tests on AIX"Mark de Wever2024-05-034-0/+4
| | | | | | | | | | | | | | This reverts commit 02660e274242b2dd61543a06d7ab4dc0efd2517d. The tests do not pass on AIX, the buildkite precommit CI fails on these tests. For example, https://buildkite.com/llvm-project/libcxx-ci/builds/35184
| * [M68k] Correctly emit non-pic relocations (#89863)Peter Lafreniere2024-05-0315-78/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The m68k backend will always emit external calls (including libcalls) with PC-relative PLT relocations, even when in non-pic mode or -fno-plt is used. This is unexpected, as other function calls are emitted with absolute addressing, and a static code modes suggests that there is no PLT. It also leads to a miscompilation where the call instruction emitted expects an immediate address, while the relocation emitted for that instruction is PC-relative. This miscompilation can even be seen in the default C function in godbolt: https://godbolt.org/z/zEoazovzo Fix the issue by classifying external function references based upon the pic mode. This triggers a change in the static code model, making it more in line with the expected behaviour and allowing use of this backend in more bare-metal situations where a PLT does not exist. The change avoids the issue where we emit a PLT32 relocation for an absolute call, and makes libcalls and other external calls use absolute addressing modes when a static code model is desired. Further work should be done in instruction lowering and validation to ensure that miscompilations of the same type don't occur.
| * [RISCV] Add Sched classes for vector crypto instructions (#90068)Michael Maitland2024-05-0316-375/+830
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The vector crypto instructions may have different scheduling behavior compared to VALU operations. Instead of using scheduling resources that describe VALU operations, we give these instructions their own scheduling resources. This is similar to what we did for Zb* instructions. The sifive-p670 has vector crypto, so we model behavior for these instructions in the P600SchedModel. The numbers are based off of measurements collected internally. These numbers are a bit old and new measurements show that they may not be fully accurate. It is likely that we will refine these numbers in a follow up patch(s) based on new measurements. This PR is stacked on #89256.
| * [lldb-dap] Fix test_exit_status_message_sigterm test. (#90223)Miro Bucko2024-05-031-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: 'test_exit_status_message_sigterm' is failing due to 'psutil' dependency introduced in PR #89405. This fix removes 'deque' dependency and checks if 'psutil' can be imported before running the test. If 'psutil' cannot be imported, it emits a warning and skips the test. Test Plan: ./bin/llvm-lit -sv /path-to-llvm-project/lldb/test/API/tools/lldb-dap/console/TestDAP_console.py --filter=tools/lldb-dap/console/TestDAP_console.py Reviewers: @jeffreytan81,@clayborg,@kusmour, @JDevlieghere,@walter-erquinigo Subscribers: Tasks: lldb-dap Tags:
| * [RISCV][llvm-mca] Add vector crypto llvm-mca tests for P600Michael Maitland2024-05-038-23/+1307
| |
| * [RISCV] Use Sched*MC for Zvk MC instructionsMichael Maitland2024-05-031-11/+13
| |
| * [GlobalISel] Use some standard matchinfo defs. NFC.Jay Foad2024-05-032-11/+5
| |
| * [OpenACC] Implement copyin, copyout, create clauses for compute constructerichkeane2024-05-0322-74/+1268
| | | | | | | | | | | | | | | | | | Like 'copy', these also have alternate names, so this implements that as well. Additionally, these have an optional tag of either 'readonly' or 'zero' depending on the clause. Otherwise, this is a pretty rote implementation of the clause, as there aren't any special rules for it.
| * [VPlan] Remove unused VPWidenCanonicalIVRecipe::getScalarType (NFCI).Florian Hahn2024-05-031-6/+0
| | | | | | | | | | After a48ebb8276408fa88cf7060ddc68f4eda1b62def, the function is no longer used. Remove it.
| * [AMDGPU] Use replaceOpcodeWith instead of applyCombine_s_mul_u64. NFC.Jay Foad2024-05-032-8/+2
| |