aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-03-03[Clang][Driver] Merge the different strategies of how libc++ is includedusers/philnik777/merge_libcxx_include_strategiesNikolas Klauser20-129/+178
2024-03-01[Clang] Fix __has_cpp_attribute and C++11 attributes with arguments in C++03 ↵Nikolas Klauser6-27/+33
(#83065) The values for `__has_cpp_attribute` don't have to be guarded behind `LangOpts.CPlusPlus` because `__has_cpp_attribute` isn't available if Clang isn't in a C++ mode. Fixes #82995
2024-03-01Use object directly instead of accessing ArrayRef (#83263)Martin Wehking1-1/+1
Use RegOp directly inside debug code to silence a static analyzer that warns about accessing it through its ArrayRef wrapper.
2024-03-01[X86][CodeGen] Add missing patterns for APX NDD instructions about encoding ↵Shengchen Kan2-41/+76
trick
2024-03-01[ARM] Change the type of CC and VCC code in `splitMnemonic`. (#83413)Alfie Richards1-13/+14
This changes the type of `PredicationCode` and `VPTPredicationCode` from `unsigned` to `ARMCC::CondCodes` and `ARMVCC::VPTCodes` resp' for clarity and correctness.
2024-03-01[AMDGPU] Improve detection of non-null addrspacecast operands (#82311)Pierre van Houtryve8-17/+498
Use IR analysis to infer when an addrspacecast operand is nonnull, then lower it to an intrinsic that the DAG can use to skip the null check. I did this using an intrinsic as it's non-intrusive. An alternative would have been to allow something like `!nonnull` on `addrspacecast` then lower that to a custom opcode (or add an operand to the addrspacecast MIR/DAG opcodes), but it's a lot of boilerplate for just one target's use case IMO. I'm hoping that when we switch to GISel that we can move all this logic to the MIR level without losing info, but currently the DAG doesn't see enough so we need to act in CGP. Fixes: SWDEV-316445
2024-03-01[SLP]Fix/improve potential masked gather loads analysis.Alexey Bataev3-346/+355
When do the analysis for the (potential) masked gather node, we check that not greater than half of the pointer operands are loop invariants or potentially vectorizable. Need to check actually, that we have a loop at first and do better check for the potentially vectorizable pointers. Reviewers: RKSimon Reviewed By: RKSimon Pull Request: https://github.com/llvm/llvm-project/pull/83472
2024-03-01[mlir][EmitC] Add bitwise operators (#83387)Marius Brehler4-14/+207
This adds operations for bitwise operators. Furthermore, an UnaryOp class and a helper to print unary operations are introduced.
2024-03-01[SLP]Fix the cost model for extracts combined with later shuffle.Alexey Bataev3-3/+20
If the buildvector node contains extract, which later should be combined with some other nodes by shuffling, need to estimate the cost of this shuffle before building the mask after shuffle. Reviewers: RKSimon Reviewed By: RKSimon Pull Request: https://github.com/llvm/llvm-project/pull/83442
2024-03-01[AArch64] Remove unused AArch64ISD::BIT. NFCDavid Green3-6/+1
These were last used in the fcopysign lowering, which now uses AArch64ISD::BSP.
2024-03-01[clang] Remove unused lambda capture. (#83550)Alexandros Lamprineas0-0/+0
Fixes the `sanitizer-x86_64-linux-android` buildbot.
2024-03-01Revert fuzzer windows changes (#83551)David CARLIER1-21/+4
2024-03-01[AArch64] Mark AESD and AESE instructions as commutative. (#83390)David Green3-5/+5
This come from https://discourse.llvm.org/t/combining-aes-and-xor-can-be-improved-further/77248. These instructions start out with: ``` XOR Vd, Vn <some complicated math> ``` The initial XOR means that they can be treated as commutative, removing some of the unnecessary mov's introduced during register allocation.
2024-03-01[llvm-jitlink] [test] Add an XFAIL for a JITLink test on MinGWMartin Storsjö1-0/+5
This testcase fails on MinGW targets, because when compiling the main() function, it gets an implicit call to __main(), which is missing in this context.
2024-03-01[flang][HLFIR] Use GreedyPatternRewriter in LowerHLFIRIntrinsics (#83438)Tom Eccles17-222/+190
In #83253 @matthias-springer pointed out that LowerHLFIRIntrinsics.cpp should not be using rewrite patterns with the dialect conversion driver. The intention of this pass is to lower HLFIR intrinsic operations into FIR so it conceptually fits dialect conversion. However, dialect conversion is much stricter about changing types when replacing operations. This pass sometimes looses track of array bounds, resulting in replacements with operations with different but compatible types (expressions of the same rank and element types but with or without compile time known array bounds). This is difficult to accommodate with the dialect conversion driver and so I have changed to use the greedy pattern rewriter. There is a lot of test churn because the greedy pattern rewriter also performs canonicalization.
2024-03-01[AMDGPU] Rename hasGFX12Enc to hasRestrictedSOffset in BUF definitions. NFC. ↵Jay Foad1-76/+76
(#83434) This just renames a tablegen argument to match the corresponding subtarget feature.
2024-03-01[X86][AArch64][PowerPC] __builtin_cpu_supports accepts unknown options. (#83515)Pavel Iliin7-14/+30
The patch fixes https://github.com/llvm/llvm-project/issues/83407 modifing __builtin_cpu_supports behaviour so that it returns false if unsupported features names provided in parameter and issue a warning. __builtin_cpu_supports is target independent, but currently supported by X86, AArch64 and PowerPC only.
2024-03-01[mlir][VectorOps][nfc] Add result pretty printing to `vector.vscale` (#83439)Benjamin Maxwell2-2/+10
This will now print the value of `vector.vscale` as `%vscale` in IR dumps which makes it easier to spot where things are scalable. One test that depended on the value names has also been fixed.
2024-03-01[MC] Teach checkAsmTiedOperandConstraints about optional operands (#81381)Sergei Barannikov1-27/+62
At some point in the past, optional operands have become allowed in the middle of an instruction. However, `checkAsmTiedOperandConstrains` hasn't been modified to support this. This patch adds the support by pulling operand offsets counting out of `convertToMCInst` and reusing it in `checkAsmTiedOperandConstrains`.
2024-03-01Fix MSVC "not all control paths return a value" warnings. NFC.Simon Pilgrim1-2/+2
2024-03-01[lldb][test][Windows] Don't check for pexpect with ↵David Spickett1-4/+8
LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS See https://github.com/llvm/llvm-project/issues/22648 for why we don't use it on Windows. Any pexpect tests are skipped there.
2024-03-01[clang] Remove unused-lambda-capture in AArch64.cpp (NFC)Jie Fu1-2/+1
llvm-project/clang/lib/CodeGen/Targets/AArch64.cpp:886:26: error: lambda capture 'TI' is not used [-Werror,-Wunused-lambda-capture] 886 | llvm::sort(Features, [&TI](const StringRef LHS, const StringRef RHS) { | ~^~ 1 error generated.
2024-03-01[IR] Update getOrInsertFunction() docs for opaque pointers (NFC)Nikita Popov1-15/+8
This can no longer return a bitcast, but the function type in FunctionCallee may differ from the function type of the function.
2024-03-01[compiler-rt][fuzzer] windows build unbreak proposal. (#83538)David CARLIER1-4/+7
shuffling the order of its includes.
2024-03-01[clang][Interp] OpaqueValueExprs can have null subexprsTimm Bäder1-3/+7
2024-03-01[FMV] Use lexicographic order of feature names when mangling. (#83464)Alexandros Lamprineas5-57/+99
This decouples feature priorities from name mangling. Doing so will prevent ABI breakages in case we change the feature priorities. Formalized in ACLE here: https://github.com/ARM-software/acle/pull/303.
2024-03-01Add llvm_v6i32_ty. NFC. (#83522)Pravin Jagtap1-0/+1
Authored-by: Pravin Jagtap <Pravin.Jagtap@amd.com>
2024-03-01Revert "[AArch64][GlobalISel] Legalize G_SHUFFLE_VECTOR for Odd-Sized ↵chuongg35-212/+108
Vectors" (#83544) Reverts llvm/llvm-project#83038 due to failing build in Fuchsia build https://lab.llvm.org/staging/#/builders/187/builds/1695
2024-03-01[AMDGPU] promote i1 arg type for amdgpu_cs (#82971)Nick Anderson2-0/+1216
fixes #68087 Not sure where to put regression tests for this pr? Also, should i1 args not in reg also be promoted?
2024-03-01[clang][Interp][NFC] Add an assertion to classify(Expr*)Timm Bäder1-0/+1
NFC but makes the backtrace easier to read in case the expression somehow ends up being null.
2024-03-01[clang][dataflow] Correctly treat empty initializer lists for unions. (#82986)martinboehme5-22/+153
This fixes a crash introduced by https://github.com/llvm/llvm-project/pull/82348 but also adds additional handling to make sure that we treat empty initializer lists for both unions and structs/classes correctly (see tests added in this patch).
2024-03-01[X86][CodeGen] Fix compile crash in EVEX compression for corner caseShengchen Kan2-1/+10
The base register of OPmi_ND may be allocated to the same physic register as the ND operand. OPmi_ND is not compressible b/c it has different semnatic from OPmi. In this case, `isRedundantNewDataDest` should return false, otherwise we would get error Assertion `!IsNDLike && "Missing entry for ND-like instruction"' failed.
2024-03-01[AArch64][GlobalISel] Expand abs.v4i8 to v4i16 and abs.v2s16 to v2s32 (#81231)Dhruv Chawla (work)2-3/+6
GISel was currently falling back to SDAG for these functions, and this matches the way SDAG currently generates code for these functions.
2024-03-01[compiler-rt] fix __sanitizer_siginfo type on freebsd. (#77379)David CARLIER2-2/+22
mostly interested in the first half of the type, adding also compile time check.
2024-03-01[clang][analyzer] Add StreamChecker note tags for "indeterminate stream ↵Balázs Kéri2-126/+238
position". (#83288) If a stream operation fails the position can become "indeterminate". This may cause warning from the checker at a later operation. The new note tag shows the place where the position becomes "indeterminate", this is where a failure occurred.
2024-03-01Revert "[mlir][PDL] Add support for native constraints with results (#82760)"Matthias Gehre18-555/+98
Due to buildbot failure https://lab.llvm.org/buildbot/#/builders/88/builds/72130 This reverts commit dca32a3b594b3c91f9766a9312b5d82534910fa1.
2024-03-01[mlir][PDL] Add support for native constraints with results (#82760)Matthias Gehre18-98/+555
From https://reviews.llvm.org/D153245 This adds support for native PDL (and PDLL) C++ constraints to return results. This is useful for situations where a pattern checks for certain constraints of multiple interdependent attributes and computes a new attribute value based on them. Currently, for such an example it is required to escape to C++ during matching to perform the check and after a successful match again escape to native C++ to perform the computation during the rewriting part of the pattern. With this work we can do the computation in C++ during matching and use the result in the rewriting part of the pattern. Effectively this enables a choice in the trade-off of memory consumption during matching vs recomputation of values. This is an example of a situation where this is useful: We have two operations with certain attributes that have interdependent constraints. For instance `attr_foo: one_of [0, 2, 4, 8], attr_bar: one_of [0, 2, 4, 8]` and `attr_foo == attr_bar`. The pattern should only match if all conditions are true. The new operation should be created with a new attribute which is computed from the two matched attributes e.g. `attr_baz = attr_foo * attr_bar`. For the check we already escape to native C++ and have all values at hand so it makes sense to directly compute the new attribute value as well: ``` Constraint checkAndCompute(attr0: Attr, attr1: Attr) -> Attr; Pattern example with benefit(1) { let foo = op<test.foo>() {attr = attr_foo : Attr}; let bar = op<test.bar>(foo) {attr = attr_bar : Attr}; let attr_baz = checkAndCompute(attr_foo, attr_bar); rewrite bar with { let baz = op<test.baz> {attr=attr_baz}; replace bar with baz; }; } ``` To achieve this the following notable changes were necessary: PDLL: - Remove check in PDLL parser that prevented native constraints from returning results PDL: - Change PDL definition of pdl.apply_native_constraint to allow variadic results PDL_interp: - Change PDL_interp definition of pdl_interp.apply_constraint to allow variadic results PDLToPDLInterp Pass: The input to the pass is an arbitrary number of PDL patterns. The pass collects the predicates that are required to match all of the pdl patterns and establishes an ordering that allows creation of a single efficient matcher function to match all of them. Values that are matched and possibly used in the rewriting part of a pattern are represented as positions. This allows fusion and thus reusing a single position for multiple matching patterns. Accordingly, we introduce ConstraintPosition, which records the type and index of the result of the constraint. The problem is for the corresponding value to be used in the rewriting part of a pattern it has to be an input to the pdl_interp.record_match operation, which is generated early during the pass such that its surrounding block can be referred to by branching operations. In consequence the value has to be materialized after the original pdl.apply_native_constraint has been deleted but before we get the chance to generate the corresponding pdl_interp.apply_constraint operation. We solve this by emitting a placeholder value when a ConstraintPosition is evaluated. These placeholder values (due to fusion there may be multiple for one constraint result) are replaced later when the actual pdl_interp.apply_constraint operation is created. Changes since the phabricator review: - Addressed all comments - In particular, removed registerConstraintFunctionWithResults and instead changed registerConstraintFunction so that contraint functions always have results (empty by default) - Thus we don't need to reuse `rewriteFunctions` to store constraint functions with results anymore, and can instead use `constraintFunctions` - Perform a stable sort of ConstraintQuestion, so that ConstraintQuestion appear before other ConstraintQuestion that use their results. - Don't create placeholders for pdl_interp::ApplyConstraintOp. Instead generate the `pdl_interp::ApplyConstraintOp` before generating the successor block. - Fixed a test failure in the pdl python bindings Original code by @martin-luecke Co-authored-by: martin-luecke <martinpaul.luecke@amd.com>
2024-03-01Add "REQUIRES: asserts" to 2 tests added in #83379 using "-debug-only" run ↵Douglas Yung2-0/+2
arguments.
2024-02-29[TextAPI] Fixup symbol names of ivars from extensions (#83525)Cyndy Ishida2-1/+3
2024-02-29[InstallAPI] Use unique identifiers for input buffers (#83523)Cyndy Ishida1-2/+4
2024-03-01[RISCV] Add getFeaturesForCPU function support (#83269)Brandon Wu2-0/+27
This function parse the cpu and return it's supported features placed in EnabledFeatures. It is same as the one in X86TargetParser and also is used in IREE.
2024-02-29[lldb] [debugserver] fix qLaunchSuccess error, add ↵Jason Molenda2-160/+168
QErrorStringInPacketSupported (#82593) Pavel added an extension to lldb's gdb remote serial protocol that allows the debug stub to append an error message (ascii hex encoded) after an error response packet Exx. This was added in 2017 in https://reviews.llvm.org/D34945 . lldb sends the QErrorStringInPacketSupported packet and then the remote stub may add these error strings. debugserver has two bugs in its use of extended error messages: the vAttach family would send the extended error string without checking if the mode had been enabled. And qLaunchSuccess would not properly format its error response packet (missing the hex digits, did not asciihex encode the string). There is also a bug in the HandlePacket_D (detach) packet where the error packets did not include hex digits, but this one does not append an error string. I'm adding a new RNBRemote::SendErrorPacket() and routing all error packet returns though this one method. It takes an optional second string which is the longer error message; it now handles appending it to the Exx response or not, depending on the QErrorStringInPacketSupported state. I updated all packets to send their errors via this method.
2024-03-01[RISCV] Move V0 to the end of register allocation order (#82967)Wang Pengcheng62-520/+516
According to https://riscv-optimization-guide-riseproject-c94355ae3e6872252baa952524.gitlab.io/riscv-optimization-guide.html: > The v0 register defined by the RISC-V vector extension is special in > that it can be used both as a general purpose vector register and also > as a mask register. As a preference, use registers other than v0 for > non-mask values. Otherwise data will have to be moved out of v0 when a > mask is required in an operation. v0 may be used when all other > registers are in use, and using v0 would avoid spilling register state > to memory. And using V0 register may stall masking pipeline and stop chaining for some microarchitectures. So we should try to not use V0 and register groups contained it as much as possible. We achieve this via moving V0 to the end of RA order.
2024-02-29[lldb][progress][NFC] Fix Doxygen information (#83502)Chelsea Cassanova1-0/+3
2024-02-29[libc] Allow libc to build on Red Hat (#83517)jameshu158691-4/+5
Currently, `libc` fails when building on redhat because the triple format uses `redhat` instead of `linux` (The same problem as openSUSE). This PR changes `libc` to accept `redhat` as a valid Linux triple. --------- Co-authored-by: Joseph Huber <huberjn@outlook.com>
2024-02-29Revert "XFAIL TestLocalVariables.py on Windows" (#83454)Alexander M1-1/+0
This reverts commit 3434472ed74141848634b5eb3cd625d651e22562. Closes #43097.
2024-02-29[libc] Ignore -Winclude-next-absolute-path warning in float-macros.h (#83513)lntue1-0/+1
2024-02-29[compiler-rt][Fuzzer] SetThreadName windows implementation new try. (#76761)David CARLIER1-2/+16
SetThreadDescription symbol needs to be dynamically loaded before usage. Then using a wide string buffer, since we re using a null terminated string, we can use MultiByteToWideChar -1 as 4th argument to finally set the thread name. Previously `SetThreadDescription` was called directly causing crash. It was reverted in dd3aa26fc8e9de37a39611f7a6a602bcb4153784
2024-02-29[HWASAN] Implement selective instrumentation based on profiling information ↵Kirill Stoimenov3-0/+81
(#83503)
2024-02-29Revert "[lldb] Add SBProcess methods for get/set/use address masks (#83095)"Jason Molenda10-328/+6
This reverts commit 9a12b0a60084b2b92f728e1bddec884a47458459. TestAddressMasks fails its first test on lldb-x86_64-debian, lldb-arm-ubuntu, lldb-aarch64-ubuntu bots. Reverting while investigating.