- Mar 02, 2022
-
-
Valentin Clement authored
This patch enables dynamic array lowering and use the funcationality inside some IO tests. This patch is part of the upstreaming effort from fir-dev branch. Depends on D120743 Reviewed By: PeteSteinfeld, schweitz Differential Revision: https://reviews.llvm.org/D120744 Co-authored-by:
Eric Schweitz <eschweitz@nvidia.com> Co-authored-by:
Jean Perier <jperier@nvidia.com> Co-authored-by:
V Donaldson <vdonaldson@nvidia.com>
-
Krystian Kuzniarek authored
Follow up to 8f310d19. Differential Revision: https://reviews.llvm.org/D120618
-
Björn Schäpers authored
In the presence of pp branches we parse the token stream multiple times. Thus the token already has the type set. It's best just not to assert on any type in the parser. Fixes https://github.com/llvm/llvm-project/issues/54019 Differential Revision: https://reviews.llvm.org/D120621
-
Björn Schäpers authored
In the presence of pp branches we parse the token stream multiple times. Thus the token already has the type set. It's best just not to assert on any type in the parser. Fixes https://github.com/llvm/llvm-project/issues/54019 Differential Revision: https://reviews.llvm.org/D120512
-
Björn Schäpers authored
We have a little problem. TokenAnnotator::resetTokenMetadata() resets the type, except for a (growing) whitelist. This is because the TokenAnnotator visits some tokens multiple times. E.g. trying to identify if a < is an operator less or a template opener. And in some runs, which are bascially "reverted" the types are reset. On the other hand, if the parser does already know the type, it should be able to set it, without it being reset. So we introduce the ability to set a type and make that final. Differential Revision: https://reviews.llvm.org/D120511
-
David Tenty authored
AIX's system header provides these C++ overloads for compatibility with older XL C++ implementations, but they can be disabled by defining __LIBC_NO_CPP_MATH_OVERLOADS__ since AIX 7.2 TL 5 SP 3. Since D109078 landed clang will define this macro when using libc++ on AIX and we already run the lit tests with it too. This change will enable the overloads in libc++'s math.h and we'll continue to require the compiler to define the macro going forward. Reviewed By: ldionne, jsji, EricWF Differential Revision: https://reviews.llvm.org/D102172 co-authored-by:
Jason Liu <jasonliu.development@gmail.com>
-
Cameron McInally authored
Use PatFrags to commute the multiplication operands of an AArch64ISD::FMA_PRED node, allowing unpredicated FMLS instructions to match. Reviewed by: paulwalker-arm Differential Revision: https://reviews.llvm.org/D120570
-
Valentin Clement authored
This patch enables the lowering of the print, read and write IO statements. This patch is part of the upstreaming effort from fir-dev branch. Reviewed By: PeteSteinfeld, schweitz Differential Revision: https://reviews.llvm.org/D120743 Co-authored-by:
Eric Schweitz <eschweitz@nvidia.com> Co-authored-by:
Jean Perier <jperier@nvidia.com> Co-authored-by:
V Donaldson <vdonaldson@nvidia.com> Co-authored-by:
Kiran Chandramohan <kiran.chandramohan@arm.com>
-
Peter Klausler authored
An assumed-type actual argument that corresponds to an assumed-rank dummy argument shall be assumed-shape or assumed-rank. Differential Revision: https://reviews.llvm.org/D120750
-
River Riddle authored
The Func has a large number of legacy dependencies carried over from the old Standard dialect, which was pervasive and contained a large number of varied operations. With the split of the standard dialect and its demise, a lot of lingering dead dependencies have survived to the Func dialect. This commit removes a large majority of then, greatly reducing the dependence surface area of the Func dialect.
-
River Riddle authored
The last remaining operations in the standard dialect all revolve around FuncOp/function related constructs. This patch simply handles the initial renaming (which by itself is already huge), but there are a large number of cleanups unlocked/necessary afterwards: * Removing a bunch of unnecessary dependencies on Func * Cleaning up the From/ToStandard conversion passes * Preparing for the move of FuncOp to the Func dialect See the discussion at https://discourse.llvm.org/t/standard-dialect-the-final-chapter/6061 Differential Revision: https://reviews.llvm.org/D120624
-
Brian Cain authored
These printf()s fail to compile like so on hexagon: .../tools/llvm-top/libcxx/test/std/utilities/charconv/charconv.msvc/test.cpp:94:23: error: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Werror,-Wformat] printf("%u ", elem); ~~ ^~~~ %lu .../tools/llvm-top/libcxx/test/std/utilities/charconv/charconv.msvc/test.cpp:569:56: error: format specifies type 'unsigned int' but the argument has type 'uint32_t' (aka 'unsigned long') [-Werror,-Wformat] fprintf(stderr, "%s failed for 0x%08X\n", msg, bits); ~~~~ ^~~~ %08lX .../tools/llvm-top/libcxx/test/std/utilities/charconv/charconv.msvc/test.cpp:1096:43: error: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Werror,-Wformat] printf("Randomized test cases: %u\n", PrefixesToTest * Fractions); ~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~ %lu Differential Revision: https://reviews.llvm.org/D120532 -
Craig Topper authored
This adds tests for i8 through i128 with intrinsic and select forms. Covering rv32 and rv64 with the base ISA, Zbb, and Zbt. Some Zbb tests already covered part of this, but not all. FIXMEs have been added for some obviously suboptimal codegen.
-
serge-sans-paille authored
Estimation on the impact on preprocessor output: before: 1065307662 after: 1064800684 Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup Differential Revision: https://reviews.llvm.org/D120741
-
serge-sans-paille authored
This is a followup to 344f8ec3048b6eeef94569800acb012f794ad372 It should fix https://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-expensive/21961/console
-
rdzhabarov authored
Fix unused var compiler warning. Reviewed By: Mogball Differential Revision: https://reviews.llvm.org/D120759
-
Craig Topper authored
Many of these test cases had a single space before 'ret' while every other instruction had two space indentation. I did not audit any other tests for this problem.
-
Arthur O'Dwyer authored
Notably the following ctors remain non-explicit because they are used as implicit conversions in too many places: * __debug_less(_Compare&) * __map_iterator(_TreeIterator) * __map_const_iterator(_TreeIterator) * __hash_map_iterator(_HashIterator) * __hash_map_const_iterator(_HashIterator) Differential Revision: https://reviews.llvm.org/D119894
-
Fangrui Song authored
-
Martin Storsjö authored
These tests are hit hard by a bug that is fixed in a newer version of UCRT. Add a test for the specific bug, and XFAIL the tests if that bug is present (as it is in CI). Split out hex formatting of floats to separate test files, that are excluded with `XFAIL: msvc`. (Based on reading the C standard for printf formatting, it seems like this isn't necessarily a proper bug in printf, but just a case of differing optional behaviour.) Differential Revision: https://reviews.llvm.org/D120022
-
Martin Storsjö authored
This was suggested in the review of https://reviews.llvm.org/D120022. Also indent the code for the compilation test one step compared to the surrounding expression. Differential Revision: https://reviews.llvm.org/D120469
-
Mircea Trofin authored
-
Mark de Wever authored
All supported compilers have implemented this feature. Therefore use the language version instead of the feature macro. Reviewed By: #libc, philnik, ldionne, Quuxplusone Differential Revision: https://reviews.llvm.org/D119865
-
Aart Bik authored
Reviewed By: bixia Differential Revision: https://reviews.llvm.org/D120756
-
Arthur O'Dwyer authored
-
Arthur O'Dwyer authored
Incidentally, this removes some unqualified ADL calls to `begin` and `end`. Differential Revision: https://reviews.llvm.org/D119687
-
Nicolas Miller authored
NOTE: this is a follow-up commit with the missing clang-side changes. This patch adds builtins and intrinsics for the f16 and f16x2 variants of the ex2 instruction. These two variants were added in PTX7.0, and are supported by sm_75 and above. Note that this isn't wired with the exp2 llvm intrinsic because the ex2 instruction is only available in its approx variant. Running ptxas on the assembly generated by the test f16-ex2.ll works as expected. Differential Revision: https://reviews.llvm.org/D119157
-
Jakub Chlanda authored
This patch adds builtins/intrinsics for the following variants of FMA: NOTE: follow-up commit with the missing clang-side changes. - f16, f16x2 - rn - rn_ftz - rn_sat - rn_ftz_sat - rn_relu - rn_ftz_relu - bf16, bf16x2 - rn - rn_relu ptxas (Cuda compilation tools, release 11.0, V11.0.194) is happy with the generated assembly. Differential Revision: https://reviews.llvm.org/D118977
-
Jakub Chlanda authored
Adds support for the following builtins: abs, neg: - .bf16, - .bf16x2 min, max - {.ftz}{.NaN}{.xorsign.abs}.f16 - {.ftz}{.NaN}{.xorsign.abs}.f16x2 - {.NaN}{.xorsign.abs}.bf16 - {.NaN}{.xorsign.abs}.bf16x2 - {.ftz}{.NaN}{.xorsign.abs}.f32 Differential Revision: https://reviews.llvm.org/D117887 -
Zequan Wu authored
- Print simple TypeIndex - Print error message when type doesn't exist. Differential Revision: https://reviews.llvm.org/D120692
-
Bixia Zheng authored
[mlir][sparse] Extend convertToMLIRSparseTensor to support permutation and more general sparsity values. Previously, convertToMLIRSparseTensor assumes identity storage ordering and all compressed dimensions. This change extends the function with two parameters for users to specify the storage ordering and the sparsity of each dimension. Modify PyTACO to reflect this change. Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D120643
-
Michał Górny authored
Add an explicit LIBCXX_CXX_ABI=system-libcxxabi option for linking to system-installed libc++abi. This fixes the ability to link against one when building libcxx via the runtimes build, as otherwise the build system insists on linking into in-tree targets. Differential Revision: https://reviews.llvm.org/D119539
-
Jorge Gorbe Moya authored
-
William S. Moses authored
As discussed in https://reviews.llvm.org/D119743 scf.parallel would continuously stack allocate since the alloca op was placd in the wsloop rather than the omp.parallel. This PR is the second stage of the fix for that problem. Specifically, we now introduce an alloca scope around the inlined body of the scf.parallel and enable a canonicalization to hoist the allocations to the surrounding allocation scope (e.g. omp.parallel). Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D120423
-
Craig Topper authored
This lowers VECTOR_SPLICE of scalable vectors to a slidedown follow by a slideup. Fixed vectors are encouraged to use shufflevector instruction. The equivalent patch for fixed vectors is D119039. I've used a tail agnostic slidedown and limited the VL to only the elements that will not be overwritten by the slideup. The slideup uses VLMax for its VL. It unfortunately uses tail undisturbed policy but it isn't required as there is no tail. We just need the merge operand to carry the bits for the lower portion of the result. Care was taken to ensure that either the slideup or slidedown will be able to use a .vi instruction when the immediate is small. Which one uses the immediate depends on the sign of the immediate. Reviewed By: frasercrmck, ABataev Differential Revision: https://reviews.llvm.org/D119303
-
Craig Topper authored
Instead of passing an InstCmpInt * and a bool just pass the predicate from the caller. I'm considering moving the similar FCmp functions from InstCombine over here and this makes the interface consistent with what is used for FCmp. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D120609
-
Tong Zhang authored
Currently adding attribute no_sanitize("bounds") isn't disabling -fsanitize=local-bounds (also enabled in -fsanitize=bounds). The Clang frontend handles fsanitize=array-bounds which can already be disabled by no_sanitize("bounds"). However, instrumentation added by the BoundsChecking pass in the middle-end cannot be disabled by the attribute. The fix is very similar to D102772 that added the ability to selectively disable sanitizer pass on certain functions. In this patch, if no_sanitize("bounds") is provided, an additional function attribute (NoSanitizeBounds) is attached to IR to let the BoundsChecking pass know we want to disable local-bounds checking. In order to support this feature, the IR is extended (similar to D102772) to make Clang able to preserve the information and let BoundsChecking pass know bounds checking is disabled for certain function. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D119816 -
Malhar Jajoo authored
Essentially removed the "use omp_lib_kinds" statement and replaced it with import to maintain consistency (and avoid compilation error in case the omp_lib_kinds.mod file is not accessible) in header file. The import is required to access entities in host scoping unit. Differential Revision: https://reviews.llvm.org/D120707
-
Louis Dionne authored
This must have been missed in 368faaca.
-
Siva Chandra Reddy authored
New methods to the Atomic class have been added as required. Futex related types have been consolidated at a common place. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D120705
-