summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [libc++][TZDB] Implements time_zone::to_sys.upstream/users/mordante/time_zone__to_sys_chooseMark de Wever2024-05-037-3/+264
| | | | | | | This implements the overload with the choose argument and adds this enum. Implements parts of: - P0355 Extending chrono to Calendars and Time Zones
* [libc++][TZDB] Implements time_zone::to_sys.upstream/users/mordante/time_zone__to_sys_throwingMark de Wever2024-05-0223-44/+987
| | | | | | | | This implements the throwing overload and the exception classes throw by this overload. Implements parts of: - P0355 Extending chrono to Calendars and Time Zones
* Address review comments.upstream/users/mordante/get_info_local_timeMark de Wever2024-04-242-69/+42
|
* [libc++][TZDB] Implements time zone get_info(local_time).Mark de Wever2024-04-245-0/+1489
| | | | | Implements parts of: - P0355 Extending to Calendars and Time Zones
* [libc++][TZDB] Fixes reverse time lookups. (#89502)Mark de Wever2024-04-232-4/+91
| | | | | | Testing with the get_info() returning a local_info revealed some issues in the reverse lookup. This needed an additional quirk. Also the skipping when not in the current continuation optimization was wrong. It prevented merging two sys_info objects.
* [libc] Make fenv and math tests preserve fenv_t state (#89658)Roland McGrath2024-04-2382-129/+471
| | | | | | | | | | | | This adds a new test fixture class FEnvSafeTest (usable as a base class for other fixtures) that ensures each test doesn't perturb the `fenv_t` state that the next test will start with. It also provides types and methods tests can use to explicitly wrap code under test either to check that it doesn't perturb the state or to save and restore the state around particular test code. All the fenv and math tests are updated to use this so that none can affect another. Expectations that code under test and/or tests themselves don't perturb state can be added later.
* [hwasan] Add test for hwasan pass with fixed shadow (#89813)Thurston Dang2024-04-231-0/+229
| | | | | | | | | This test records the current behavior of HWASan, which doesn't utilize the fixed shadow intrinsics of https://github.com/llvm/llvm-project/commit/365bddf634993d5ea357e9715d8aacd7ee40c4b5 It is intended to be updated in future work ("Optimize outlined memaccess for fixed shadow on Aarch64"; https://github.com/llvm/llvm-project/pull/88544)
* [RISCV] Use SHL_ADD in remaining strength reduce cases for MUL (#89789)Philip Reames2024-04-234-12/+12
| | | | | | | | | | | | The interesting bit is the zext folding. This is the first case where we end up with a profitable fold of shNadd (zext x), y to shNadd.uw x, y. See zext_mul68 from rv64zba.ll. The test differences are cases where we can legally fold (only because there's no one use check). These are not profitable or harmful, but we can't a oneuse check without breaking the zext_mul68 case. Note that XTHeadBa doesn't appear to have the equivalent patterns so this only shows up in Zba.
* [clang] coroutine: generate valid mangled name in ↵Haojian Wu2024-04-234-13/+11
| | | | | CodeGenFunction::generateAwaitSuspendWrapper (#89731) Fixes https://github.com/llvm/llvm-project/issues/89723
* [libc] Generate docs for `setjmp.h` (#89542)Rajveer Singh Bharadwaj2024-04-233-0/+32
| | | | | Resolves #88065 Added macros and functions.
* [NFC][msan] Add DebugInstrumentInstruction DEBUG_COUNTERVitaly Buka2024-04-231-0/+10
|
* [NFC][msan] Fix typo in commentVitaly Buka2024-04-231-1/+1
|
* [lldb/test] Add basic ld.lld --debug-names tests (#88335)Fangrui Song2024-04-232-0/+10
| | | | | Test that ld.lld --debug-names (#86508) built per-module index can be consumed by lldb. This has uncovered a bug during the development of the lld feature.
* [flang] Remove hardcoded bits from AddDebugInfo. (#89231)Abid Qadeer2024-04-238-59/+121
| | | | | | | | | | | | | This PR adds following options to the AddDebugInfo pass. 1. IsOptimized flag. 2. Level of debug info to generate. 3. Name of the source file This enables us to remove the hard coded values from the code. It also allows us to test the pass with different options. The tests have been modified to take advantage of that. The calling convention flag and producer name have also been improved.
* [CodeGen][TII] Allow reassociation on custom operand indices (#88306)Min-Yih Hsu2024-04-233-47/+114
| | | | | | This opens up a door for reusing reassociation optimizations on target-specific binary operations with non-standard operand list. This is effectively a NFC.
* [libc++][doc] Updates module build instructions. (#89413)Mark de Wever2024-04-231-7/+70
| | | | | | | | | | | CMake has landed experimental support for using the Standard modules. This will be part of the CMake 3.30 release. This updates the build instructions to use modules with CMake. The changes have been tested locally. --------- Co-authored-by: Will Hawkins <whh8b@obs.cr>
* [DebugInfo] Report errors when DWARFUnitHeader::applyIndexEntry fails (#89156)Alex Langford2024-04-235-11/+152
| | | | | | Motivation: LLDB is able to report errors about these scenarios whereas LLVM's DWARF parser only gives a boolean success/fail. I want to migrate LLDB to using LLVM's DWARFUnitHeader class, but I don't want to lose some of the error reporting, so I'm adding it to the LLVM class first.
* [libc++][CI] Removes clang-tidy references. (#89092)Mark de Wever2024-04-231-9/+0
| | | | | | The clang-tidy selection has been made automatic recently so this is not longer needed. Thanks to Louis for spotting this.
* [llvm-exegesis] Add support for alderlake (#88967)Aiden Grossman2024-04-232-0/+22
| | | This patch adds the PFM counter definitions for Intel alderlake CPUs.
* [libc++][chrono] Fixes format output of negative values. (#89408)Mark de Wever2024-04-234-0/+220
| | | | | | | | | | | When trying to express a time before the epoch (e.g. "one nanosecond before 00:01:40 on 1900-01-01") the date would be shown as: 1900-01-01 00:01:39.-00000001 After this patch, that time would be correctly shown as: 1900-01-01 00:01:39.999999999
* [libc++][ranges] export `std::ranges::range_adaptor_closure` (#89793)Xiaoyang Liu2024-04-231-1/+3
| | | | This patch exports the `std::ranges::range_adaptor_closure` class template implemented in #89148 from the C++ Modules file.
* [flang][cuda] Remove restriction on device subprogram (#89677)Valentin Clement (バレンタイン クレメン)2024-04-232-16/+6
| | | | Newer version allow `pure`, `elemental` and `recursive` on device subprogram.
* [NFC][InstrProf] Increment valid profile stat in populateCoverage (#89660)Ellis Hoag2024-04-231-0/+1
| | | | | | | | We increment `NumOfCSPGOFunc` and `NumOfPGOFunc` in `PGOUseFunc::readCounters()` already. We should do the same in `PGOUseFunc::populateCoverage`. https://github.com/llvm/llvm-project/blob/83bc7b57714dc2f6b33c188f2b95a0025468ba51/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp#L1331
* [AArch64] Match ZIP and UZP starting from undef elements. (#89578)David Green2024-04-233-42/+49
| | | | | | | In case the first element of a zip/uzp mask is undef, the isZIPMask and isUZPMask functions have a 50% chance of picking the wrong "WhichResult", meaning they don't match a zip/uzp where they could. This patch alters the matching code to first check for the first non-undef element, to try and get WhichResult correct.
* [VectorCombine][X86] shuffle-of-binops.ll - adjust no matching operand test ↵Simon Pilgrim2024-04-231-6/+6
| | | | | | to use FDIV Use of FDIV allows us to show a definite cost improvement with #88899
* [AArch64][GISel] Avoid scalarizing G_IMPLICIT_DEF and G_FREEZE in the ↵Dhruv Chawla2024-04-2313-167/+227
| | | | | | | | | | | | | | | | Legalizer (#88469) It does not make sense to scalarize G_FREEZE as it leads to the generation of pairs of G_UNMERGE_VALUES and G_BUILD_VECTORs which are difficult to optimize especially when operations like G_TRUNC operate before G_FREEZE but after G_UNMERGE_VALUES. Instead, it is better to legalize G_FREEZE like any other vector type would be, as it gets lowered to a COPY during instruction selection anyways. This is an issue that was encountered when looking at the TSVC benchmark, where the legalization of G_FREEZE would cause generation of unnecessary MOVs that adversely affected the performance.
* [VectorCombine][AArch64] shuffletoidentity.ll - regenerate checksSimon Pilgrim2024-04-231-1/+1
| | | | Reduce diffs in #88899
* [NVPTX] Improve support for rsqrt.approx (#89417)Alex MacLean2024-04-237-0/+145
| | | | | | | Complete support for rsqrt.approx with rsqrt.approx.f64 ([PTX ISA 9.7.3.17. Floating Point Instructions: rsqrt.approx.ftz.f64](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#floating-point-instructions-rsqrt-approx-ftz-f64)). Additionally, add support for folding `sqrt` into `rsqrt`, with an optional flag to disable.
* Revert "[mlir][linalg] Add runtime verification for linalg ops" (#89780)Ryan Holt2024-04-239-549/+33
| | | Reverts llvm/llvm-project#89342 due to build failure
* [RISCV] Add test coverage for mul (zext), 2^N + 2/4/8 [nfc]Philip Reames2024-04-231-0/+19
|
* [X86] pr34592.ll - add O3 codegen run for comparisonSimon Pilgrim2024-04-231-41/+70
|
* [X86] pr34592.ll - add nounwind to remove cfi noiseSimon Pilgrim2024-04-231-5/+1
|
* [mlir] Update comment about `propertiesAttr` (NFC) (#89634)Jeff Niu2024-04-231-3/+6
| | | | The comment is misleading because `propertiesAttr` is not actually ignored when the operation isn't unregistered.
* Reapply "[RISCV] Implement RISCVISD::SHL_ADD and move patterns into combine ↵Philip Reames2024-04-2311-138/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#89263)" Changes since original commit: * Rebase over improved test coverage for theadba * Revert change to use TargetConstant as it appears to prevent the uimm2 clause from matching in the XTheadBa patterns. * Fix an order of operands bug in the THeadBa pattern visible in the new test coverage. Original commit message follows: This implements a RISCV specific version of the SHL_ADD node proposed in https://github.com/llvm/llvm-project/pull/88791. If that lands, the infrastructure from this patch should seamlessly switch over the to generic DAG node. I'm posting this separately because I've run out of useful multiply strength reduction work to do without having a way to represent MUL X, 3/5/9 as a single instruction. The majority of this change is moving two sets of patterns out of tablgen and into the post-legalize combine. The major reason for this is that I have an upcoming change which needs to reuse the expansion logic, but it also helps common up some code between zba and the THeadBa variants. On the test changes, there's a couple major categories: * We chose a different lowering for mul x, 25. The new lowering involves one fewer register and the same critical path, so this seems like a win. * The order of the two multiplies changes in (3,5,9)*(3,5,9) in some cases. I don't believe this matters. * I'm removing the one use restriction on the multiply. This restriction doesn't really make sense to me, and the test changes appear positive.
* clang/win: Add a flag to disable default-linking of compiler-rt libraries ↵Nico Weber2024-04-236-4/+41
| | | | | | | | | | | | | (#89642) For ASan, users already manually have to pass in the path to the lib, and for other libraries they have to pass in the path to the libpath. With LLVM's unreliable name of the lib (due to LLVM_ENABLE_PER_TARGET_RUNTIME_DIR confusion and whatnot), it's useful to be able to opt in to just explicitly passing the paths to the libs everywhere. Follow-up of sorts to https://reviews.llvm.org/D65543, and to #87866.
* [mlir][linalg] Add runtime verification for linalg ops (#89342)Ryan Holt2024-04-239-33/+549
| | | | | | This commit implements runtime verification for LinalgStructuredOps using the existing `RuntimeVerifiableOpInterface`. The verification checks that the runtime sizes of the operands match the runtime sizes inferred by composing the loop ranges with the op's indexing maps.
* [libc++][ranges] P2387R3: Pipe support for user-defined range adaptors (#89148)Xiaoyang Liu2024-04-237-20/+186
| | | | | | | | | | | | | | | | | | | | | | | This patch finalizes the std::ranges::range_adaptor_closure class template from https://wg21.link/P2387R3. // [range.adaptor.object], range adaptor objects template<class D> requires is_class_v<D> && same_as<D, remove_cv_t<D>> class range_adaptor_closure { }; The current implementation of __range_adaptor_closure was introduced in ee44dd8062a26541808fc0d3fd5c6703e19f6016 and has served as the foundation for the range adaptors in libc++ for a while. This patch keeps its implementation, with the exception of the following changes: - __range_adaptor_closure now includes the missing constraints `is_class_v<D> && same_as<D, remove_cv_t<D>>` to restrict the type of class that can inherit from it. (https://eel.is/c++draft/ranges.syn) - The operator| of __range_adaptor_closure no longer requires its first argument to model viewable_range. (https://eel.is/c++draft/range.adaptor.object#1) - The _RangeAdaptorClosure concept is refined to exclude cases where T models range or where T has base classes of type range_adaptor_closure<U> for another type U. (https://eel.is/c++draft/range.adaptor.object#2)
* [VPlan] Add scalar inferencing support for Not and Or insns (#89160)Patrick O'Neill2024-04-232-0/+71
| | | | | Fixes #87394. PR: https://github.com/llvm/llvm-project/pull/89160
* [SystemZ][z/OS] Make z/OS personality function known (#89679)Kai Nacke2024-04-234-1/+18
| | | | | This change adds the z/OS personality function to the list of known EH personality functions. It enables removing of the EH data/labels if the personality function is not invoked.
* Reapply "[Clang][Sema] placement new initializes typedef array with correct ↵mahtohappy2024-04-234-2/+47
| | | | | | | | | | | | | | | | | | | | | | | | | size (#83124)" (#89036) When in-place new-ing a local variable of an array of trivial type, the generated code calls 'memset' with the correct size of the array, earlier it was generating size (squared of the typedef array + size). The cause: typedef TYPE TArray[8]; TArray x; The type of declarator is Tarray[8] and in SemaExprCXX.cpp::BuildCXXNew we check if it's of typedef and of constant size then we get the original type and it works fine for non-dependent cases. But in case of template we do TreeTransform.h:TransformCXXNEWExpr and there we again check the allocated type which is TArray[8] and it stays that way, so ArraySize=(Tarray[8] type, alloc Tarray[8*type]) so the squared size allocation. ArraySize gets calculated earlier in TreeTransform.h so that if(!ArraySize) condition was failing. fix: I changed that condition to if(ArraySize). fixes https://github.com/llvm/llvm-project/issues/41441 --------- Co-authored-by: erichkeane <ekeane@nvidia.com>
* [RISCV] Add additional mul strength reduction coverage with xtheadbaPhilip Reames2024-04-231-0/+177
|
* [SLP]Fix PR89635: do not try to vectorize single-gather alternate node.Alexey Bataev2024-04-232-1/+30
| | | | | | No need to try to vectorize single gather/buildvector with alternate opcode graph, it is not profitable. In other cases, need to use last instruction for inserting the vectorized code.
* [AMDGPU] Fix GFX12 encoding of s_wait_event export_ready (#89622)Jay Foad2024-04-232-8/+4
| | | | As well as flipping the sense of the bit, GFX12 moved it from bit 0 to bit 1 in the encoded simm16 operand.
* [gn build] Port 70d3ddb280eaLLVM GN Syncbot2024-04-231-1/+1
|
* [RemoveDIs][MLIR] Don't process debug records in the LLVM-IR translator (#89735)Stephen Tozer2024-04-232-4/+8
| | | | | | | | | | We are almost ready to enable the use of debug records everywhere in LLVM by default; part of the prep-work for this means ensuring that every tool supports them. Every tool in the `llvm/` project supports them, front-ends that use the `DIBuilder` will support them, and as far as I can tell, the only other tool in the LLVM repo that needs to support them but doesn't is `mlir-translate`. This patch trivially unblocks them by converting from debug records to debug intrinsics before translating a module.
* [libc++] Add some private headers to libcxx.imp (#89568)Takuto Ikuta2024-04-231-4/+9
| | | | | | https://github.com/llvm/llvm-project/pull/78295 dropped private headers in top level directory from libcxx.imp. This PR re-adds them to libcxx.imp.
* [Frontend][OpenMP] Add functions for checking construct type (#87258)Krzysztof Parzyszek2024-04-234-2/+58
| | | | Implement helper functions to identify leaf, composite, and combined constructs.
* AtomicExpand: Emit or with constant on RHSMatt Arsenault2024-04-238-75/+75
| | | | This will save later code from commuting it.
* [VPlan] Ignore incoming values with constant false mask. (#89384)Florian Hahn2024-04-233-12/+16
| | | | | | | | | | Ignore incoming values with constant false masks when trying to simplify VPBlendRecipes. As a follow-on optimization, we should also be able to drop all incoming values with false masks by creating a new VPBlendRecipe with those operands dropped. PR: https://github.com/llvm/llvm-project/pull/89384
* [Clang][Parser] Don't always destroy template annotations at the end of a ↵Younan Zhang2024-04-234-1/+49
| | | | | | | | | | | | | | | | | | | | | declaration (#89494) Since [6163aa9](https://github.com/llvm/llvm-project/commit/6163aa96799cbad7f2f58e02c5bebee9647056a5#diff-3a7ef0bff7d2b73b4100de636f09ea68b72eda191b39c8091a6a1765d917c1a2), we have introduced an optimization that almost always destroys TemplateIdAnnotations at the end of a function declaration. This doesn't always work properly: a lambda within a default template argument could also result in such deallocation and hence a use-after-free bug while building a type constraint on the template parameter. This patch adds another flag to the parser to tell apart cases when we shouldn't do such cleanups eagerly. A bit complicated as it is, this retains the optimization on a highly templated function with lots of generic lambdas. Note the test doesn't always trigger a conspicuous bug/crash even with a debug build. But a sanitizer build can detect them, I believe. Fixes https://github.com/llvm/llvm-project/issues/67235 Fixes https://github.com/llvm/llvm-project/issues/89127