aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-07-25Clear release notes for 18.xllvmorg-18-initTobias Hieta8-1772/+3
2023-07-25Bump trunk version to 18.0.0gitTobias Hieta4-4/+4
2023-07-25[Clang] use unsigned integer constants in unit-test | fixes build error on ↵Kai Stierand1-2/+2
ppc64le-lld-multistage-test Fixes: /home/buildbots/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1526:11: warning: comparison of integer expressions of different signedness: ‘const unsigned int’ and ‘const int’ [-Wsign-compare] /home/buildbots/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1526:11: warning: comparison of integer expressions of different signedness: ‘const long unsigned int’ and ‘const int’ [-Wsign-compare] Reviewed By: cor3ntin Differential Revision: https://reviews.llvm.org/D156224
2023-07-25Revert "[OpenMP] Add the `ompx_attribute` clause for target directives"Aaron Ballman22-489/+105
This reverts commit ef9ec4bbcca2fa4f64df47bc426f1d1c59ea47e2. The changes broke several bots: https://lab.llvm.org/buildbot/#/builders/176/builds/3408 https://lab.llvm.org/buildbot/#/builders/198/builds/4028 https://lab.llvm.org/buildbot/#/builders/197/builds/8491 https://lab.llvm.org/buildbot/#/builders/197/builds/8491
2023-07-25HIP: Directly call nearbyint builtinsMatt Arsenault2-10/+10
2023-07-25AMDGPU: Remove trailing whitespace from documentationMatt Arsenault1-4/+4
2023-07-25AMDGPU: Correctly expand f64 sqrt intrinsicMatt Arsenault13-881/+5932
rocm-device-libs and llpc were avoiding using f64 sqrt intrinsics in favor of their own expansions. Port the expansion into the backend. Both of these users should be updated to call the intrinsic instead. The library and llpc expansions are slightly different. llpc uses an ldexp to do the scale; the library uses a multiply. Use ldexp to do the scale instead of the multiply. I believe v_ldexp_f64 and v_mul_f64 are always the same number of cycles, but it's cheaper to materialize the 32-bit integer constant than the 64-bit double constant. The libraries have another fast version of sqrt which will be handled separately. I am tempted to do this in an IR expansion instead. In the IR we could take advantage of computeKnownFPClass to avoid the 0-or-inf argument check.
2023-07-25AMDGPU: Add more sqrt f64 lowering testsMatt Arsenault2-303/+2727
Almost all permutations of the flags are potentially relevant.
2023-07-25HIP: Directly call rint builtinsMatt Arsenault2-30/+30
2023-07-25[Sema] Fix handling of functions that hide classesJohn Brawn2-32/+409
When a function is declared in the same scope as a class with the same name then the function hides that class. Currently this is done by a single check after the main loop in LookupResult::resolveKind, but this can give the wrong result when we have a using declaration in multiple namespace scopes in two different ways: * When the using declaration is hidden in one namespace but not the other we can end up considering only the hidden one when deciding if the result is ambiguous, causing an incorrect "not ambiguous" result. * When two classes with the same name in different namespace scopes are both hidden by using declarations this can result in incorrectly deciding the result is ambiguous. There's currently a comment saying this is expected, but I don't think that's correct. Solve this by checking each Decl to see if it's hidden by some other Decl in the same scope. This means we have to delay removing anything from Decls until after the main loop, in case a Decl is hidden by another that is removed due to being non-unique. Differential Revision: https://reviews.llvm.org/D154503
2023-07-25Attributor: Fix typoMatt Arsenault1-1/+1
2023-07-25[FuncSpec][NFC] Leave a comment for future improvements.Alexandros Lamprineas1-0/+3
Adds a TODO for checking inlinining opportunities while traversing the users of the specialization arguments. This was brought up in the review of D154852.
2023-07-25[RISCV] Remove zvk uimm constraints4vtomat6-25/+21
Since the spec doesn't describe these behaviors as invalid, the llvm-mc should just make them take care by hardware. Differential Revision: https://reviews.llvm.org/D155669
2023-07-25Revert "[OpenMP] [OMPT] [7/8] Invoke tool-supplied callbacks before and ↵Michael Halkenhaeuser14-457/+83
after target launch and data transfer operations" This reverts commit 00ccfcf9a6ee61c56cbe01d1e01b074797465fa4.
2023-07-25[SVE] Add vselect(mla/mls) patterns for cases where a multiplicand is used ↵Paul Walker3-129/+128
for the false lanes. Differential Revision: https://reviews.llvm.org/D155972
2023-07-25[FuncSpec] Add Phi nodes to the InstCostVisitor.Alexandros Lamprineas3-7/+143
This patch allows constant folding of PHIs when estimating the user bonus. Phi nodes are a special case since some of their inputs may remain unresolved until all the specialization arguments have been processed by the InstCostVisitor. Therefore, we keep a list of dead basic blocks and then lazily visit the Phi nodes once the user bonus has been computed for all the specialization arguments. Differential Revision: https://reviews.llvm.org/D154852
2023-07-25[bazel] Bazel fix for 69bd7fae2b037c6538d531f39c25c160d8e6ff87Dmitry Chernenkov1-0/+1
2023-07-25[bazel][mlir] Port ca9a3354d04b15366088d7831b40f891e3d77b95Goran Flegar1-0/+14
2023-07-25[NFC][clang] Fix static analyzer concernsPodchishchaeva, Mariya1-0/+3
EHScopeStack doesn't seem to be intended for copy. It frees memory in the destructor and doesn't have user-written copy c'tor and assignment operator, so delete them to avoid using default ones which would do wrong. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D156133
2023-07-25[clang][analyzer] Improved documentation for TaintPropagation CheckerDaniel Krupp1-35/+215
The usage of the taint analysis is described through a command injection attack example. It is explained how to make a variable sanitized through configuration. Differential Revision: https://reviews.llvm.org/D145229
2023-07-25Revert rGfae7b98c221b5b28797f7b56b656b6b819d99f27 "[Support] Change ↵Simon Pilgrim7-37/+25
SetVector's default template parameter to SmallVector<*, 0>" This is failing on Windows MSVC builds: llvm\unittests\Support\ThreadPool.cpp(380): error C2440: 'return': cannot convert from 'Vector' to 'std::vector<llvm::BitVector,std::allocator<llvm::BitVector>>' with [ Vector=llvm::SmallVector<llvm::BitVector,0> ]
2023-07-25[gn build] Port 6084ee742064LLVM GN Syncbot1-0/+1
2023-07-25[docs] Add llvm & clang release notes for LoongArchWeining Lu2-0/+7
Differential Revision: https://reviews.llvm.org/D156195
2023-07-25[lld][ELF] Support LoongArchWANG Xuerui29-26/+2064
This adds support for the LoongArch ELF psABI v2.00 [1] relocation model to LLD. The deprecated stack-machine-based psABI v1 relocs are not supported. The code is tested by successfully bootstrapping a Gentoo/LoongArch stage3, complete with common GNU userland tools and both the LLVM and GNU toolchains (GNU toolchain is present only for building glibc, LLVM+Clang+LLD are used for the rest). Large programs like QEMU are tested to work as well. [1]: https://loongson.github.io/LoongArch-Documentation/LoongArch-ELF-ABI-EN.html Reviewed By: MaskRay, SixWeining Differential Revision: https://reviews.llvm.org/D138135
2023-07-25[Clang][SVE] Permit specific predicate-as-counter registers in inline assemblyDavid Sherwood2-2/+21
This patch adds the predicate-as-counter registers pn0-pn15 to the list of supported registers used when writing inline assembly. Tests added to clang/test/CodeGen/aarch64-sve-inline-asm.c Differential Revision: https://reviews.llvm.org/D156115
2023-07-25[Clang] Fix crash in CIndex, when visiting a static_assert without messageKai Stierand3-7/+85
After implementation of "[Clang] Implement P2741R3 - user-generated static_assert messages" (47ccfd7a89e2a9a747a7114db18db1376324799c) the c indexer crashes when handling a `static_assert` w/o any message. This is caused by using `dyn_cast` to get the literal string, which isn't working on `nullptr`. Reviewed By: cor3ntin Differential Revision: https://reviews.llvm.org/D156053
2023-07-25[mlir][ArmSME] Add tile load op and extend tile store tile size supportCullen Rhodes12-66/+1069
This extends the existing 'arm_sme.tile_store' op to support all tile sizes and adds a new op 'arm_sme.tile_load', as well as lowerings from vector -> custom ops and custom ops -> intrinsics. Currently there's no lowering for i128. Depends on D154867 Reviewed By: awarzynski, dcaballe Differential Revision: https://reviews.llvm.org/D155306
2023-07-25[JITLink][PowerPC] Pre-commit test for D155925. NFC.Kai Luo3-0/+67
2023-07-25[clang][driver][NFC] Call IsARMBigEndain function only for isARM and isThumb.Simi Pallipurath2-4/+6
IsARMBIgEndian function returns true only if: 1. The triples are either arm or thumb and the commandline has the option -mbig-endian 2. The triples are either armeb or thumbeb. Missing the checking of arm or thumb triples in the first case pass through the --be8 endian flag to linker For AArch64 as well which is not expected. This is the regression happened from the previous patch https://reviews.llvm.org/D154786. It is better to refactor to only call IsARMBigEndian for isARM and isthumb satisfying conditions which keeps ARM and AArch64 separate. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D155808
2023-07-25[RISCV] Merge rv32/rv64 vector narrowing integer right shift intrinsic tests ↵Jim Lin4-4592/+728
that have the same content. NFC.
2023-07-25[AMDGPU] Remove unused variable 'CNI' in /AMDGPUMachineCFGStructurizer.cpp (NFC)Jie Fu1-3/+0
/Users/jiefu/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUMachineCFGStructurizer.cpp:2603:10: error: variable 'CNI' set but not used [-Werror,-Wunused-but-set-variable] auto CNI = CI; ^ 1 error generated.
2023-07-25[Support] Change SetVector's default template parameter to SmallVector<*, 0>Fangrui Song7-25/+37
Similar to D156016 for MapVector.
2023-07-25Revert "[LV] Re-use existing broadcast value for live-ins."Martin Storsjö19-587/+742
This reverts commit eea9258648ce73507f6f85c395de978af659d498. That commit triggered crashes in the following testcase: $ cat reduced.c typedef struct { int a[8] } b; typedef struct { b *c; short d } e; void f() { int g; char *h; e *i = f; short j = i->d; int a = i->c->a[0]; for (;;) for (; g < a; g++) { *h = j * i->d >> 8; h++; } } $ clang -target aarch64-linux-gnu -w -c -O2 reduced.c
2023-07-25[DAGCombiner] Minor improvements to foldAndOrOfSETCC. NFCCraig Topper1-5/+4
Reduce the scope of some variables. Replace an if with an assertion. Reviewed By: kmitropoulou Differential Revision: https://reviews.llvm.org/D156140
2023-07-24[RISCV] Don't print a tab after mnemonics that don't have operands.Craig Topper1-1/+1
Reviewed By: wangpc Differential Revision: https://reviews.llvm.org/D156200
2023-07-25[RISCV] Match ext_vl+sra_vl/srl_vl+trunc_vector_vl to vnsra.wv/vnsrl.wvLiaoChunyu4-0/+236
similar to D117454, try to add vl patterns and testcases. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D155466
2023-07-25[X86] Support -march=graniterapids-d and update -march=graniterapidsFreddy Ye16-12/+62
Reviewed By: pengfei, RKSimon, skan Differential Revision: https://reviews.llvm.org/D155798
2023-07-25[AMDGPU] Allow vector access types in PromoteAllocaToVectorpvanhout3-32/+480
Depends on D152706 Solves SWDEV-408279 Reviewed By: #amdgpu, arsenm Differential Revision: https://reviews.llvm.org/D155699
2023-07-25[AMDGPU] Use SSAUpdater in PromoteAllocapvanhout10-341/+570
This allows PromoteAlloca to not be reliant on a second SROA run to remove the alloca completely. It just does the full transformation directly. Note PromoteAlloca is still reliant on SROA running first to canonicalize the IR. For instance, PromoteAlloca will no longer handle aggregate types because those should be simplified by SROA before reaching the pass. Reviewed By: #amdgpu, arsenm Differential Revision: https://reviews.llvm.org/D152706
2023-07-24Don't perform dynamic_cast optimization at -O0.Richard Smith3-5/+7
It seems preferable to avoid this optimization under -O0, and we're not set up to emit speculative references to vtables at -O0 in general anyway. For #64088.
2023-07-24[OpenMP] Add the `ompx_attribute` clause for target directivesJohannes Doerfert22-105/+489
CUDA and HIP have kernel attributes to tune the code generation (in the backend). To reuse this functionality for OpenMP target regions we introduce the `ompx_attribute` clause that takes these kernel attributes and emits code as if they had been attached to the kernel fuction (which is implicitly generated). To limit the impact, we only support three kernel attributes: `amdgpu_waves_per_eu`, for AMDGPU `amdgpu_flat_work_group_size`, for AMDGPU `launch_bounds`, for NVPTX The existing implementations of those attributes are used for error checking and code generation. `ompx_attribute` can be attached to any executable target region and it can hold more than one kernel attribute. Differential Revision: https://reviews.llvm.org/D156184
2023-07-24[Support] Change MapVector's default template parameter to SmallVector<*, 0>Fangrui Song4-10/+11
SmallVector<*, 0> is often a better replacement for std::vector : both the object size and the code size are smaller. (SmallMapVector uses SmallVector as well, but it is not common.) clang size decreases by 0.0226%. instructions:u decreases 0.037% when compiling a sqlite3 amalgram. Reviewed By: JDevlieghere Differential Revision: https://reviews.llvm.org/D156016
2023-07-24[mlir-tblgen] Fix IWYUFangrui Song1-0/+1
Right now std::vector is instantiated with an incomplete element type, which is ok but best to avoid.
2023-07-24[BOLT] Add blocks order kind to YAML profile headerAmir Ayupov4-3/+20
Specify blocks order used in YAML profile. Needed to ensure profile backwards compatibility with pre-D155514 DFS order by default. Reviewed By: #bolt, maksfb Differential Revision: https://reviews.llvm.org/D156176
2023-07-24[mlir] Fix for MSVC bool splat issue encountered.Kevin Gleason3-2/+22
When building MLIR using bazel on windows with MSVC2019, bool splats were being created incorrectly: ``` dense<[true,true,true,true]> : tensor<4xi1> -(parse with mlir-opt)-> dense<[true, false, false, false]> : tensor<4xi1> ``` Appears that a Windows bazel build produces a corrupt DenseIntOrFPElementsAttr. Unable to repro using MSVC and cmake. Issue first discovered here: https://github.com/google/jax/issues/16394 Added test point for reproduction: ``` $ bazel test @llvm-project//mlir/unittests:ir_tests --test_arg=--gtest_filter=DenseSplatTest.BoolSplatSmall ``` Differential Revision: https://reviews.llvm.org/D155745
2023-07-25test/.../print-dot-dom.ll: Avoid writing to cwd of test by creating/cding ↵David Blaikie1-0/+3
into %t instead The cwd of the test might not be writable.
2023-07-25ADT: ArrayRef: Assert that begin <= endDavid Blaikie1-1/+3
This came up in the context of #63169 - if this assert were in place it would've been much easier to reduce the test case.
2023-07-25Revert "[C++20] [Modules] Use CanonicalType for base classes"Chuanqi Xu3-47/+195
Close https://github.com/llvm/llvm-project/issues/64091 This reverts commit f82df0b285acd8a7115f0bfc55ce44474251c2d1 and add a test from https://github.com/llvm/llvm-project/issues/64091
2023-07-25[X86] Update features for sierraforest, grandridgeFreddy Ye3-138/+18
Reviewed By: pengfei Differential Revision: https://reviews.llvm.org/D155784
2023-07-24Add new option -fkeep-persistent-storage-variables to Clang release notesZheng Qian1-0/+5
This patch updates the Clang release notes with the new option -fkeep-persistent-storage-variables added in bb6ab91b1dcd. Reviewed By: hubert.reinterpretcast Differential Revision: https://reviews.llvm.org/D155501