aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-05-03[clang] CTAD: fix the aggregate deduction guide for alias templates.users/hokein/fix-ctad-aggregate-baseHaojian Wu3-60/+23
For alias templates, the way we construct their aggregate deduction guides is not following the standard way. We should do the same thing as we do for implicit deduction guides.
2024-05-03Refactor: Extract the core deduction-guide construction implementation from ↵Haojian Wu1-187/+203
DeclareImplicitDeductionGuidesForTypeAlias We move the core implementation to a dedicate function, so that it can be reused in other places.
2024-05-02LLDB Debuginfod tests and a fix or two (#90622)Kevin Frei12-17/+519
I'm taking yet another swing at getting these tests going, on the hypothesis that the problems with buildbots & whatnot are because they're not configured with CURL support, which I've confirmed would cause the previous tests to fail. (I have no access to an ARM64 linux system, but I did repro the failure on MacOS configured without CURL support) So, the only difference between this diff and [previous](https://github.com/llvm/llvm-project/pull/85693) [diffs](https://github.com/llvm/llvm-project/pull/87676) that have already been approved is that I've added a condition to the tests to only run if Debuginfod capabilities should be built into the binary. I had done this for these tests when they were [Shell tests](https://github.com/llvm/llvm-project/pull/79181) and not API tests, but I couldn't find a direct analog in any API test, so I used the "plugins" model used by the intel-pt tests as well. --------- Co-authored-by: Kevin Frei <freik@meta.com>
2024-05-02[SLP][X86] Add test coverage for rint/lrint/llrint fp callsSimon Pilgrim1-0/+394
2024-05-02[CostModel][X86] Add test coverage for rint/lrint/llrint fp callsSimon Pilgrim4-0/+960
2024-05-02[HLSL] Shore up floating point conversions (#90222)Chris B4-19/+507
This PR fixes bugs in HLSL floating conversions. HLSL always has `half`, `float` and `double` types, which promote in the order: `half`->`float`->`double` and convert in the order: `double`->`float`->`half` As with other conversions in C++, promotions are preferred over conversions. We do have floating conversions documented in the draft language specification (https://microsoft.github.io/hlsl-specs/specs/hlsl.pdf [Conv.rank.float]) although the exact language is still in flux (https://github.com/microsoft/hlsl-specs/pull/206). Resolves #81047
2024-05-02[SamplePGO] Handle FS discriminators in SampleProfileMatcher (#90858)Krzysztof Pszeniczny3-8/+10
Currently the code uses FunctionSamples::getCallSiteIdentifier which will sometimes incorrectly guess that FSAFDO discriminators are probe based and will convert them incorrectly. This change doesn't affect builds which don't use FSAFDO, it only fixes sample profile matching with FS discriminators. The test for this is manually updated to use discriminator value 15, which is a perfectly valid base discriminator in the FS world, but satisfies `isPseudoProbeDiscriminator`, so `getBaseDiscriminatorFromDiscriminator` will incorrectly extract the probe index from it. Note: this change only affects how the base discriminators will be extracted when doing stale profile matching in the IR-level sample profile loader. It doesn't add stale profile matching to the MIR-level FS profile loader pass.
2024-05-02[RISCV] Detect empty extension name after parsing MajorVersion in ↵Craig Topper2-0/+12
parseNormalizedArchString. (#90790) If the string is just a version, we will end up adding an empty string as an extension which crashes in the compare function for the std::map.
2024-05-02Reapply "[clang][Interp] Create full type info for dummy pointers"Timm Bäder6-56/+33
This reverts commit 6195e228eb2a7085fac53603f534d2401ab1ac39.
2024-05-02[clang] NFC: cxx_status mark P0522R0 as unreleasedMatheus Izvekov1-2/+2
Addressing post-commit review on #89807
2024-05-02Revert#2 "[RemoveDIs] Load into new debug info format by default in LLVM ↵Stephen Tozer19-186/+154
(#89799)" Reverted following probably-causing failures on some clang buildbots: https://lab.llvm.org/buildbot/#/builders/245/builds/24037 This reverts commit a12622543de15df45fb9ad64e8ab723289d55169.
2024-05-02[WebAssembly] Sort target features (NFC) (#90777)Heejin Ahn7-239/+241
2024-05-02[RISCV] Make parseNormalizedArchString only accept [a-z0-9_]. (#90815)Craig Topper2-7/+10
Previously we only rejected upper case characters. We should instead reject anything except lower case, numbers, and underscore. Other characters will likely confuse the extension sorting.
2024-05-02[AMDGPU] Group multiple single use producers under one single use ↵Scott Egerton2-25/+639
instruction. (#90713) Previously each single use producer would be marked with a "S_SINGLEUSE_VDST 1" instruction. This patch adds support for larger immediates that encode multiple single use producers into one S_SINGLEUSE_VDST instruction.
2024-05-02[mlir][sparse] Support explicit/implicit value for complex type (#90771)Yinying Li6-9/+42
2024-05-02[Clang] Remove bogus assert in are[Lax]CompatibleSveTypes()Sander de Smalen1-10/+0
This caused an assertion failure for the following input: __SVInt32_t bar(__SVInt32_t x); void foo(__SVInt32_t x) { return bar(x); }
2024-05-02[RISCV] Add smstateen extension (#90818)Craig Topper7-0/+22
2024-05-02[flang][cuda] Compute matching distance in generic resolution (#90774)Valentin Clement (バレンタイン クレメン)2-14/+125
Implement the matching distance as described here: https://docs.nvidia.com/hpc-sdk/archive/24.3/compilers/cuda-fortran-prog-guide/index.html#cfref-var-attr-unified-data Generic resolved to the smallest distance.
2024-05-02NFC: fix clang format spacing and documentation (#90775)Lei Huang2-28/+27
Some minor fixes to clean up tabs and language in code documentation.
2024-05-02[SDPatternMatch] Add m_CondCode, m_NoneOf, and some SExt improvements (#90762)Min-Yih Hsu2-10/+76
- Add m_CondCode to match the ISD::CondCode value from CondCodeSDNode - Add m_NoneOf combinator - m_SExt now recognizes sext_inreg
2024-05-02[lldb][test][FreeBSD] Remove xfails from TestGDBRemoteLoad (#84026)David Spickett1-9/+0
Fixes #48758 These are now passing on AArch64 FreeBSD 14.
2024-05-02SystemZ: Handle gr128 to fp128 copies in copyPhysReg (#90861)Matt Arsenault2-0/+65
2024-05-02[AArch64] Avoid vector interleave instructions when NEON and SVE are ↵Sander de Smalen3-33/+127
unavailable (#90723) As the summary suggests, the code incorrectly assumes that it can use NEON or SVE instructions to implement an interleaved load/store operation, even when both features are unavailable in the selected runtime mode.
2024-05-02Reapply "[RemoveDIs] Load into new debug info format by default in LLVM ↵Stephen Tozer19-154/+186
(#89799)" Fixes the broken tests in the original commit: 2f01fd99eb8c8ab3db9aba72c4f00e31e9e60a05 This will probably break some downstream tools that don't already handle debug records. If your downstream code breaks as a result of this change, the simplest fix is to convert the module in question to the old debug format before you process it, using `Module::convertFromNewDbgValues()`. For more information about how to handle debug records or about what has changed, see the migration document: https://llvm.org/docs/RemoveDIsDebugInfo.html This reverts commit 00821fed09969305b0003d3313c44d1e761a7131.
2024-05-02[llvm][AArch64] Fix Arm 32 bit build warnings (#90862)David Spickett1-3/+3
https://github.com/llvm/llvm-project/pull/84173 added uses of std::labs on an int64_t which leads to this warning on Arm 32 bit: ``` /home/david.spickett/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:16655:12: warning: absolute value function 'labs' given an argument of type 'long long' but has parameter of type 'long' which may cause truncation of value [-Wabsolute-value] return std::labs(Imm / 4) <= 16; ^ /home/david.spickett/llvm-project/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:16655:12: note: use function 'std::abs' instead return std::labs(Imm / 4) <= 16; ^~~~~~~~~ std::abs ``` Since int64_t is "long long" on Arm, not "long". Use std::abs instead since it has versions for "long" and "long long", we'll pick up the right one at compile time (https://en.cppreference.com/w/cpp/numeric/math/abs).
2024-05-02[clang][Interp][NFC] Make a test array smallerTimm Bäder1-3/+3
The large size doesn't add anything here, at least not with the test in its current form.
2024-05-02[offload] - Add omp as a dependency for clang-bootstrap-deps (#90793)estewart082-5/+15
If openmp is on the LLVM_ENABLE_PROJECTS list and offload is on LLVM_ENABLE_RUNTIMES list when using CLANG_ENABLE_BOOTSTRAP, then the runtimes will be configured before the openmp project. This will throw a cannot find libomp.so dependency error. Add omp as a dependency when this is the case. Update offload cmake for detection of LIBOMP_HAVE_VERSION_SCRIPT.
2024-05-02[llvm][ADT] Fix Arm 32 bit compilation warning in lazy atomic pointerDavid Spickett1-1/+1
LazyAtomicPointer.h:36:49: warning: implicit conversion from 'unsigned long long' to 'uintptr_t' (aka 'unsigned int') changes value from 18446744073709551615 to 4294967295 [-Wconstant-conversion] static constexpr uintptr_t getBusy() { return -1ULL; } On 32 bit Arm ULL is an unsigned long long which is 8 bytes, but uintptr_t is 4 bytes. Instead of using a value, use the macro UINTPTR_MAX that will be the correctly sized value.
2024-05-02[RISCV] Add list of supported profiles to -print-supported-extensions (#90757)Craig Topper2-0/+17
I tried also printing the -march they correspond to, but it seemed overly verbose and caused line wraps. It might be better if we remove the versions numbers from the string or did a more intelligent line wrap.
2024-05-02[gn build] Port c2d892668b7fLLVM GN Syncbot1-0/+1
2024-05-02Reapply "[clang][Interp] Fix locals created in ExprWithCleanups"Timm Bäder3-44/+67
This reverts commit 427c5bfd39ebb9d008b621370579444fbf2a60d7.
2024-05-02[analyzer] Remove untrusted buffer size warning in the TaintPropagation ↵Daniel Krupp6-94/+78
checker (#68607) Before this commit the the checker alpha.security.taint.TaintPropagation always reported warnings when the size argument of a memcpy-like or malloc-like function was tainted. However, this produced false positive reports in situations where the size was tainted, but correctly performed bound checks guaranteed the safety of the call. This commit removes the rough "always warn if the size argument is tainted" heuristic; but it would be good to add a more refined "warns if the size argument is tainted and can be too large" heuristic in follow-up commits. That logic would belong to CStringChecker and MallocChecker, because those are the checkers responsible for the more detailed modeling of memcpy-like and malloc-like functions. To mark this plan, TODO comments are added in those two checkers. There were several test cases that used these sinks to test generic properties of taint tracking; those were adapted to use different logic. As a minor unrelated change, this commit ensures that strcat (and its wide variant, wcsncat) propagates taint from the first argument to the first argument, i.e. a tainted string remains tainted if we concatenate it with another string. This change was required because the adapted variant of multipleTaintedArgs is relying on strncat to compose a value that combines taint from two different sources.
2024-05-02[gn] port dcbf0fcd0d55 (SBLanguages.h python)Nico Weber2-11/+9
2024-05-02[libc++] Remove a few __has_foo defines in __config (#90511)Louis Dionne1-16/+2
All the compilers we support implement those macros or builtins, so it's not useful to have a fallback to 0 when they're not implemented.
2024-05-02[AMDGPU] Modernize some syntax in SILoadStoreOptimizer. NFC.Jay Foad1-32/+17
Use structured bindings and similar.
2024-05-02[Inline][Cloning] Drop incompatible attributes from `NewFunc`Antonio Frighetto2-0/+44
Performing `instSimplify` while cloning is unsafe due to incomplete remapping (as reported in #87534). Ideally, `instSimplify` ought to reason on the updated newly-cloned function, after returns have been rewritten and callee entry basic block / call-site have been fixed up. This is in contrast to `CloneAndPruneIntoFromInst` behaviour, which is inherently expected to clone basic blocks, with pruning on top of – if any –, and not actually fixing up returns / CFG, which should be up to the Inliner. We may solve this by letting `instSimplify` work on the newly-cloned function, while maintaining old function attributes, so as to avoid inconsistencies between the yet-to-be-solved return type, and new function ret type attributes.
2024-05-02Reapply "[Inline][Cloning] Defer simplification after phi-nodes resolution"Antonio Frighetto4-61/+39
Original commit: a61f9fe31750cee65c726fb51f1b14e31e177258 Multiple 2-stage buildbots were reporting failures. These issues have been addressed separately. Fixes: https://github.com/llvm/llvm-project/issues/87534.
2024-05-02Fix test HipStdPar/global-var.llYaxun (Sam) Liu1-0/+1
It requires amdgpu registered target.
2024-05-02[clang][Sema] Re-use existing BinaryOperator if possible (#90625)Youngsuk Kim3-6/+6
First round of Sema checks were run at initial parsing step. Creating a new BinaryOperator instance (with the re-built LHS or RHS) will trigger another round of Sema checks, which can lead to duplicate diagnostic warning messages. All we want here is to replace the LHS or RHS with a NonOdrUse version. Don't create a new BinaryOperator, but simply replace the LHS or RHS of the given BinaryOperator. Fixes #45783
2024-05-02[Flang] Get fir::SequenceType from hlfir::ExprType before getShape. (#90055)Daniel Chen1-4/+7
This PR is to fix issue #88889 . Because the type of an actual argument of an array expression of character has type of `hlfir::ExprType`, we need to transform it to `fir::SequenceType` before calling `getBoxTypeWithNewShape`. Calling `hlfir::ExprType::getShape` inside of `getBoxTypeWithNewShape` will introduce a circular dependency on FIRDialect and HLFIRDialect libraries.
2024-05-02[Pass] Add `pre-isel-intrinsic-lowering` to pass registry (#90851)paperchalice6-0/+11
This was removed due to avoid circular dependency between `CodeGen` and `Passes`, but now I realized this is no longer a problem since `CodeGenPassBuilder` is moved into `Passes`.
2024-05-02[clang][Interp] Fix ignored RequiresExprsTimm Bäder2-0/+6
Also ConceptSpecializationExpr, although I don't have a test case at hand for those.
2024-05-02[HipStdPar] Fix globle variable (#90627)Yaxun (Sam) Liu2-0/+12
HipStdParAcceleratorCodeSelectionPass changes linkage of global variables to extern_weak, which does not allow initializer. An extern_weak global variable with initializer will cause llvm-as and llc to fail.
2024-05-02[SLP]Fix PR90780: insert cast instruction for PHI nodes after all phi nodes.Alexey Bataev2-1/+42
Need to check if the vectorized value is a PHINode before insert casting instruction and insert it after all phis to generate the code correctly.
2024-05-02[compiler-rt] Fix CMake configure on Windows (#90843)Omair Javaid1-1/+5
CMake configure compiler-rt got broken as a result of following commit: d3925e65a7ab88eb0ba68d3ab79cd95db5629951 This patch fixes the break by porting the above commit for clang-cl. This problem was not caught on Windows buildbots beacuase it appeared when compiler-rt was included via LLVM_ENABLE_PROJECTS while buildbots include compiler-rt project using LLVM_ENABLE_RUNTIMES flag.
2024-05-02[OpenACC] Implement SubArray Parsing/Sema (#90796)Erich Keane12-42/+1131
This implementation takes quite a bit from the OMP implementation of array sections, but only has to enforce the rules as applicable to OpenACC. Additionally, it does its best to create an AST node (with the assistance of RecoveryExprs) with as much checking done as soon as possible in the case of instantiations.
2024-05-02SystemZ: Add some tests for fp128 atomics with soft-float (#90826)Matt Arsenault3-50/+168
2024-05-02[Clang] Prevent null pointer dereference in ↵smanna121-8/+10
Sema::​CodeCompleteQualifiedId() (#90490) The null pointer dereference issue seems happening with in the expression NNS->getAsType(). Although dyn_cast_or_null<TemplateTypeParmType>() correctly handles null pointers, it doesn’t prevent the subsequent dereferencing operation. The fix ensures that NNS pointer is not null before calling the getAsType() method, thus preventing potential runtime errors caused by attempting to access a null pointer.
2024-05-02SystemZ: Add missing predicate for bitconvert patterns (#90715)Matt Arsenault1-0/+2
2024-05-02[mlir] use irdl as matcher description in transform (#89779)Oleksandr "Alex" Zinenko14-27/+302
Introduce a new Transform dialect extension that uses IRDL op definitions as matcher descriptors. IRDL allows one to essentially define additional op constraits to be verified and, unlike PDL, does not assume rewriting will happen. Leverage IRDL verification capability to filter out ops that match an IRDL definition without actually registering the corresponding operation with the system.