aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-11-03[𝘀𝗽𝗿] changes introduced through rebaseusers/joker-eph/main.refactor-moduletoobject-to-offer-more-flexibility-to-subclass-nfcChristian Ulmann331-3269/+13200
Created using spr 1.3.4 [skip ci]
2023-11-03[𝘀𝗽𝗿] changes introduced through rebaseMehdi Amini11-282/+22
Created using spr 1.3.4 [skip ci]
2023-11-03[MLIR][VectorToLLVM] Remove typed pointer support (#71075)Christian Ulmann8-208/+9
This commit removes the support for lowering Vector to LLVM dialect with typed pointers. Typed pointers have been deprecated for a while now and it's planned to soon remove them from the LLVM dialect. Related PSA: https://discourse.llvm.org/t/psa-removal-of-typed-pointers-from-the-llvm-dialect/74502
2023-11-03[NFC][OpenMP][Clang]Update OpenMP clang testsDominik Adamski2-12/+12
Replace hardcoded constants by regular expressions
2023-11-03[ConstantFold] Remove unnecessary checks in FoldBitCast() (NFCI)Nikita Popov1-10/+0
These are no-op casts, which are already handled earlier.
2023-11-03[𝘀𝗽𝗿] changes to main this commit is based onMehdi Amini2-0/+77
Created using spr 1.3.4 [skip ci]
2023-11-03[ConstantFold] Remove unnecessary BitCastConstantVector() (NFCI)Nikita Popov1-52/+1
ConstantFoldCastInstruction() already has generic code to perform lane-wise casts for vectors. There is no need to repeate it specifically for bitcasts.
2023-11-03Revert "Reapply [clang-repl] [test] Make an XFAIL more precise (#70991)"Martin Storsjö1-1/+1
This reverts commit e9db60c05e2fb96ff40cbb1f78790abc5de9237e. This was still failing (unexpectedly passing) on some Sony PS buildbots. The issue is that the clang-repl testcases don't depend on what the default target triple is, but what the host triple is, which is used for JIT purposes.
2023-11-03[MLIR][MemRefToLLVM] Remove last typed pointer remnants (#71113)Christian Ulmann4-21/+9
This commit removes the last typed pointer remnants from the MemRef to LLVM conversions, including the transform dialect operation. Typed pointers have been deprecated for a while now and it's planned to soon remove them from the LLVM dialect. Related PSA: https://discourse.llvm.org/t/psa-removal-of-typed-pointers-from-the-llvm-dialect/74502
2023-11-03Fix MSVC "not all control paths return a value" warnings. NFC.Simon Pilgrim2-0/+2
2023-11-03[IR] Remove zext and sext constant expressions (#71040)Nikita Popov62-502/+347
Remove support for zext and sext constant expressions. All places creating them have been removed beforehand, so this just removes the APIs and uses of these constant expressions in tests. There is some additional cleanup that can be done on top of this, e.g. we can remove the ZExtInst vs ZExtOperator footgun. This is part of https://discourse.llvm.org/t/rfc-remove-most-constant-expressions/63179.
2023-11-03Reapply [clang-repl] [test] Make an XFAIL more precise (#70991)Martin Storsjö1-1/+1
The const.cpp testcase fails when running in MSVC mode, while it does succeed in MinGW mode. In MSVC mode, there are more constructor invocations than expected, as the printout looks like this: A(1), this = 0000025597930000 A(1), this = 0000025597930000 f: this = 0000025597930000, val = 1 A(1), this = 0000025597930000 f: this = 0000025597930000, val = 1 ~A, this = 0000025597930000, val = 1 ~A, this = 0000025597930000, val = 1 ~A, this = 0000025597930000, val = 1 While the expected printout looks like this: A(1), this = 000002C903E10000 f: this = 000002C903E10000, val = 1 f: this = 000002C903E10000, val = 1 ~A, this = 000002C903E10000, val = 1 Reapplying with the XFAIL pattern expanded to include PS4/PS5 triples as well, which also seem to have the same behaviour as MSVC.
2023-11-03Reapply [InstCombine] Simplify and/or of icmp eq with op replacement (#70335)Nikita Popov14-587/+251
Relative to the first attempt, this contains two changes: First, we only handle the case where one side simplifies to true or false, instead of calling simplification recursively. The previous approach would return poison if one operand simplified to poison (under the equality assumption), which is incorrect. Second, we do not fold llvm.is.constant in simplifyWithOpReplaced(). We may be assuming that a value is constant, if the equality holds, but it may not actually be constant. This is nominally just a QoI issue, but the std::list implementation in libstdc++ relies on the precise behavior in a way that causes miscompiles. ----- and/or in logical (select) form benefit from generic simplifications via simplifyWithOpReplaced(). However, the corresponding fold for plain and/or currently does not exist. Similar to selects, there are two general cases for this fold (illustrated with `and`, but there are `or` conjugates). The basic case is something like `(a == b) & c`, where the replacement of a with b or b with a inside c allows it to fold to true or false. Then the whole operation will fold to either false or `a == b`. The second case is something like `(a != b) & c`, where the replacement inside c allows it to fold to false. In that case, the operand can be replaced with c, because in the case where a == b (and thus the icmp is false), c itself will already be false. As the test diffs show, this catches quite a lot of patterns in existing test coverage. This also obsoletes quite a few existing special-case and/or of icmp folds we have (e.g. simplifyAndOrOfICmpsWithLimitConst), but I haven't removed anything as part of this patch in the interest of risk mitigation. Fixes #69050. Fixes #69091.
2023-11-03[analyzer][NFC] Add a test case to PR 70792 for Issue 59493 and 54533 (#71073)Ella Ma1-0/+86
Following PR #70792 for issue #70464 Adding test cases for issue #59493 and #54533
2023-11-03[Docs][LTO] Updated HowToSubmitABug.rst for LTO crashes (#68389)Shivam Gupta1-0/+56
2023-11-03Revert D87067 "[llvm-symbolizer] Add back --use-symbol-table=true"Fangrui Song2-9/+0
This reverts commit 3d54976a704327aea8de85f7b2c36172e42100d9. This was added as a temporary courtesy to a misuse https://android-review.googlesource.com/c/platform/ndk/+/1419436 (2020).
2023-11-03[MLIR][FuncToLLVM] Remove typed pointers from call conversion test pass (#71107)Christian Ulmann2-5/+4
This commit removes typed pointers from the Func to LLVM test pass. Typed pointers have been deprecated for a while now and it's planned to soon remove them from the LLVM dialect. Related PSA: https://discourse.llvm.org/t/psa-removal-of-typed-pointers-from-the-llvm-dialect/74502
2023-11-03[clangd] Support `-specs` arguments when querying the driver. (#70285)Chris Carlon2-6/+32
Similarly to commit 3935a29, forward spec file arguments to the driver if they appear in the compile database. Spec files can affect the include search path. fixes clangd/clangd#1410
2023-11-02[llvm] Adjust files including llvm/Support/Endian.h (NFC)Kazu Hirata2-1/+1
llvm/include/llvm/Support/VersionTuple.h doesn't need anything from llvm/Support/Endian.h, but llvm/lib/DebugInfo/BTF/BTFParser.cpp relies on a transitive inclusion of llvm/Support/Endian.h.
2023-11-03[TSAN] Add __tsan_check_no_mutexes_held helper (#69372)Kenny Yu8-3/+70
This adds a new helper that can be called from application code to ensure that no mutexes are held on specific code paths. This is useful for multiple scenarios, including ensuring no locks are held: - at thread exit - in peformance-critical code - when a coroutine is suspended (can cause deadlocks) See this discourse thread for more discussion: https://discourse.llvm.org/t/add-threadsanitizer-check-to-prevent-coroutine-suspending-while-holding-a-lock-potential-deadlock/74051
2023-11-03CodeGen: Port ExpandLargeFpConvert to new PM (#71027)Matt Arsenault8-0/+45
2023-11-02[RISCV] Fix stale comments in lowerShift*Parts. NFCCraig Topper1-3/+3
This comment was not updated when we changed from xor back to sub.
2023-11-03[LLDB][easy] Fix a bug in DummySyntheticFrontEnd (#71143)Walter Erquinigo1-1/+1
DummySyntheticFrontEnd is implementing correctly CalculateNumChildren but not MightHaveChildren, where instead of delegating its action, it was returning true. This fixes that simple bug.
2023-11-02[Modules] Fix ModuleDeclState transition when module is used as a regular ↵Fangrui Song2-18/+29
identifier (#71134) `ModuleDeclState` is incorrectly changed to `NamedModuleImplementation` for `struct module {}; void foo(module a);`. This is mostly benign but leads to a spurious warning after #69555. A real world example is: ``` // pybind11.h class module_ { ... }; using module = module_; // tensorflow void DefineMetricsModule(pybind11::module main_module); // `module main_module);` incorrectly changes `ModuleDeclState` to `NamedModuleImplementation` #include <algorithm> // spurious warning ```
2023-11-03[NFC][RISCV] Fix failed test caused by #71141sunshaoce1-4/+4
2023-11-03[NFC][RISCV] Add `SiFive` prefix for XSfvfnrclipxfqf description (#71141)Shao-Ce SUN1-2/+2
`'XSfvfnrclipxfqf' (FP32-to-int8 Ranged Clip Instructions)` -> `'XSfvfnrclipxfqf' (SiFive FP32-to-int8 Ranged Clip Instructions)`
2023-11-02[Support] Remove extraneous "using namespace llvm::support;" (NFC)Kazu Hirata1-1/+0
2023-11-03[clang-format] Skip PP directives when determining brace kind (#69473)Emilia Kond2-5/+24
Pull request #65409 changed the brace kind heuristic to not treat a preprocessor if directive as a in statement, however, this caused some regressions. If the contents of a brace don't immediately determine the brace kind, the heuristic will look at the characters immediately before and after the closing brace to determine the brace type. Unfortunately, if the closing brace was preceded by a preprocessor directive, for example `#endif`, the preceding token was `endif`, seen as just an identifier, so the braces were understood as a braced list. This patch fixes this behaviour by skipping all preprocessor directives when calculating brace types. Comments were already being skipped, so now preprocessor lines are skipped alongside comments. Fixes https://github.com/llvm/llvm-project/issues/68404
2023-11-02[OpenMP] Add support for Solaris/x86_64 (#70593)Brad Smith8-16/+62
Tested on `amd64-pc-solaris2.11`.
2023-11-03[RISCV] Support Xsfvfnrclipxfqf extensions (#68297)Brandon Wu34-14/+3047
FP32-to-int8 Ranged Clip Instructions https://sifive.cdn.prismic.io/sifive/0aacff47-f530-43dc-8446-5caa2260ece0_xsfvfnrclipxfqf-spec.pdf
2023-11-03[RISCV] Support Xsfvfwmaccqqq extensions (#68296)Brandon Wu19-12/+523
Bfloat16 Matrix Multiply Accumulate Instruction https://sifive.cdn.prismic.io/sifive/c391d53e-ffcf-4091-82f6-c37bf3e883ed_xsfvfwmaccqqq-spec.pdf
2023-11-02[CodeGen][MIR] Support parsing of scalable vectors in MIR (#70893)Michael Maitland19-9/+317
This patch builds on the support for vectors by adding ability to parse scalable vectors in MIR and updates error messages to reflect that ability.
2023-11-03[RISCV] Fix wrong implication for zvknhb. (#66860)Brandon Wu14-28/+80
2023-11-03Reland [SimplifyCFG] Delete the unnecessary range check for small mask ↵Allen2-16/+102
operation (#70542) Fix the compile crash when the default result has no result for https://github.com/llvm/llvm-project/pull/65835 Fixes https://github.com/llvm/llvm-project/issues/65120 Reviewed By: zmodem, nikic
2023-11-02[GISel] Make RegBank constructor constexpr. NFC (#71109)Craig Topper2-3/+3
RegBanks are constructed as global objects. Making the constructor constexpr helps the compiler construct it without a global constructor. clang's optimizer seems to figure this out on its own, but at least gcc 8 does not.
2023-11-02[mlir][attrtypedef] Sort by def order in file. (#71083)Jacques Pienaar2-23/+28
Enables having attribute that has another from same file as member.
2023-11-02[GISel] Remove BitVector from RegBank. Use tablegen CoverageData tables ↵Craig Topper2-16/+15
directly. NFC (#71105) RegBanks are allocated as global variables. The use of BitVector causes a static global constructor to be used. The BitVector is initialized from a table of bits that is created by tablegen. We can keep a pointer to that data and use it as the bit vector instead. This does require a little bit of manual indexing and reimplementation of BitVector::count.
2023-11-02Improvements to RS4GC BDV Algorithm (#69795)Petr Maj5-26/+148
Previously, after the algorithm fixpointed, the state was manually patched by emitting BDVs for EE instructions earlier, while marking some (but not all) vector and vector<->scalar instructions as conflict. This causes issues as not all instructions that required BDVs had them emitted and due to after-fixpoint patching, the extra BDVs did not propagate to their users. This change fixes both by rewriting the logic for BDV insertion & patching. Instead of inserting the BDV for EE earlier, it merely marks every EE instruction as a conflict. The two phase insertion algorithm (first insert empty instructions and patch the BDVState, then actually connect the BDV instructions to their input bases) then ensures correct propagation to all its users. Furthermore the shufflevector instruction as well as all instances of IE instruction are conservatively marked as conflicts as well, fixing the second problem. This change does not fix the handling of constant values and vectors in the BDV. --------- Co-authored-by: Petr Maj <pmaj@azul.com>
2023-11-02[AArch64] Only clear kill flags if necessary when merging str (#69680)Zhaoxuan Jiang7-11/+19
Previously the kill flags of the source register were unconditionally cleared when a `str` pair was merged, which results in suboptimal register allocation and inhibits some renaming opportunities which may allow further merging `str`.
2023-11-02[clang][SVE][NFC] Add -fclang-abi-compat=latest to the builtins tests.Amara Emerson276-1217/+1217
This doesn't change upstream behaviour, but for downstream users it makes sure these tests work even if the ABI compat version is modified.
2023-11-02[GISel] Remove remainder of the concept of an invalid RegisterBank. (#71118)Craig Topper3-20/+2
RegisterBank no longer has a default constructor so there's no way to create an invalid register bank. Remove InvalidID and the isValid method. Replace the one use of isValid outside of RegBank with a check that the ID matches so there's still some check of sanity.
2023-11-02[AMDGPU] Add documentation for scheduler intrinsics (#69854)bcahoon1-0/+53
Adding sched_barrier, sched_group_barrier, and iglp_opt.
2023-11-03CodeGen: Port ExpandLargeDivRem to new pass manager (#71022)Matt Arsenault8-1/+45
2023-11-02[mlir][sparse] remove (some) deprecated dim/lvl methods (#71125)Aart Bik4-19/+4
This removes the most obvious ones. The others are still TBD.
2023-11-03[PowerPC] Change registers used in test due to ABI breakage. NFC. (#70758)Kai Luo2-8/+31
Usage of `r30` and `r31` has broken current traceback table's convention on AIX. Avoid using CSRs in livein list.
2023-11-02[flang][openmp] Fix `not yet implemented intrinsic` message for omp_lib (#71101)Razvan Lupusoru2-1/+4
PR#70386 removed hardcoded omp_lib name when checking if it is intrinsic module procedure reference - but instead relied on bind(c) to avoid generating error when the implementation is external to module. However, this change only worked for HLFIR. Make it work for FIR flow and update the test to exercise that as well.
2023-11-02[clang][CGExpr] Remove no-op ptr-to-ptr bitcasts (NFC)Youngsuk Kim1-21/+2
Opaque ptr cleanup effort.
2023-11-02[OpenMP] Simplify parallel reductions (#70983)Johannes Doerfert2-98/+47
A lot of the code was from a time when we had multiple parallel levels. The new runtime is much simpler, the code can be simplified a lot which should speed up reductions too.
2023-11-02[OpenMP] Provide a specialized team reduction for the common case (#70766)Johannes Doerfert1-0/+98
We default to < 1024 teams if the user did not specify otherwise. As such we can avoid the extra logic in the teams reduction that handles more than num_of_records (default 1024) teams. This is a stopgap but still shaves of 33% of the runtime in some simple reduction examples.
2023-11-03Revert "[SLP]Improve tryToGatherExtractElements by using per-register analysis."Martin Storsjö8-879/+426
This reverts commit 3e6d7c6d983dd5896e3a03857584654eb1360fda. That commit caused miscompilation of ffmpeg's libavcodec/vp9dsp_8bpp.o on aarch64; the file still compiles correctly, but no longer produces the right result - see https://reviews.llvm.org/D148855#4655968 for details.