- Apr 18, 2024
-
-
Krystian Stasiowski authored
[Clang][Sema] Warn when 'exclude_from_explicit_instantiation' attribute is used on local classes and members thereof (#88777) A local class and its members declared in a function template are instantiated alongside the definition of that template. It therefore does not make sense to apply the `exclude_from_explicit_instantiation` attribute to such declarations, and this patch adds a warning to diagnose these cases (in addition to ignoring the attribute). (The motivation for this patch is to fix a failing test in libc++ for #84050. In particular, line 199 in `include/__memory/uses_allocator_construction.h` in libc++ contains the expression `this->__value_` (reduced to https://godbolt.org/z/KqEerKWPd) which will be looked up prior to instantiation once #84050 lands (the lookup context is the current instantiation). `_LIBCPP_HIDE_FROM_ABI` includes `__attribute__((exclude_from_explicit_instantiation))`, which in the reduced example results in `Local` being instantiated with `Local::operator A` as its `DeclContext`)
-
Matthias Springer authored
Move the documentation of the ownership-based buffer deallocation pass to a separate file. Also improve the documentation a bit and insert a figure that explains the `bufferization.dealloc` op (copied from the tutorial at the LLVM Dev Summit 2023).
-
Alexey Bataev authored
Need to use proper index variable to fix a crash.
-
Matt Devereau authored
This reverts commit e90bc9cf.
-
Christian Ulmann authored
This commit improves LLVM dialect's Mem2Reg interfaces to support promotions of partial loads from larger memory slots. To support this, the Mem2Reg interface methods are extended with additional data layout parameters. The data layout is required to determine type sizes to produce correct conversion sequences. Note: There will be additional followups that introduce a similar functionality for stores, and there are plans to support accesses into the middle of memory slots.
-
Orlando Cazalet-Hyams authored
Part 1 of fix for issue https://github.com/llvm/llvm-project/issues/54624 Split from PR #87623. Clang front end changes to follow. Use DICompositeType to represent the template alias, using its extraData field as a tuple of DITemplateParameter to describe the template parameters. Added template-alias.ll - Check DWARF emission. Modified frame-types.s - Check llvm-symbolizer understands the DIE.
-
David Spickett authored
This reverts commit 16f18876. This broke Libcxx Picolib testing at the install step, and builds for Windows builtins. Revert while we figure out the cause.
-
Martin Storsjö authored
This extends on the case from 9c970d5e; if a section is marked discardable, it won't be mapped into memory at runtime, so there's no point in creating runtime pseudo relocations for such sections.
-
Martin Storsjö authored
It turns out that the previous name is vaguely misleading. When operating on a def file like "symbolname == dllname", that is supposed to make an import library entry, that when the symbol "symbolname" links against this, it imports the DLL symbol "dllname" from the referenced DLL. This doesn't need to involve any alias, and it doesn't need to imply that "dllname" is available on its own as a separate symbol in the import library at all. GNU dlltool implements import libraries in the form of "long import library", where each member is a regular object file with section chunks that compose the relevant .idata section pieces. There, this kind of import renaming does not involve any form of aliases, but the right .idata section just gets a different string than the symbol name.
-
Nashe Mncube authored
A bug was found where mops instructions were being generated that aliased the source and size registers. This is unpredictable behaviour. This patch uses the earlyclobber constraint on the input source register so that it doesn't alias with the size register. Also a test is introduced which checks affected instructions can't violate this constraint.
-
Matthew Devereau authored
This patch enables constant folding for 128 bit floating-point logf calls. This is achieved by querying if the host system has the logf128() symbol available with a CMake test. If so, replace the runtime call with the compile time value returned from logf128.
-
Ramkumar Ramachandra authored
In the process of collecting instructions to scalarize, LoopVectorize uses faulty reasoning whereby it also adds instructions that will be scalar after vectorization. If an instruction satisfies isScalarAfterVectorization() for the given VF, it should not be appended to InstsToScalarize. Add this extra guard, fixing a crash. Fixes #55096.
-
Aiden Grossman authored
This patch defines SYS_gettid as __NR_gettid if SYS_gettid is not available to avoid compile time errors due to SYS_gettid not being defined. This happens with certain libcs (like bionic) that do not define SYS_gettid.
-
Timm Bäder authored
-
David Spickett authored
Reverts llvm/llvm-project#88965 This caused a test suite failure: https://lab.llvm.org/buildbot/#/builders/185/builds/6583 NOEXE: test-suite::aarch64-acle-fmv-features.test ``` /home/tcwg-buildbot/worker/clang-aarch64-lld-2stage/test/test-suite/SingleSource/UnitTests/AArch64/acle-fmv-features.c:98:1: error: redefinition of 'check_sha1' 98 | CHECK(sha1, { | ^ /home/tcwg-buildbot/worker/clang-aarch64-lld-2stage/test/test-suite/SingleSource/UnitTests/AArch64/acle-fmv-features.c:36:17: note: expanded from macro 'CHECK' 36 | static void check_##X(void) { \ | ^ <scratch space>:150:1: note: expanded from here 150 | check_sha1 | ^ ``` I presume that the useless features need to be removed from the fmv test as well.
-
Chuanqi Xu authored
Although we want to treat the module initializer as a transparent concept to users, but it shows that people need to understand the concept to understand how to understand and distribute modules. So it is better to mention this too.
-
David Spickett authored
https://discourse.llvm.org/t/running-lldb-in-a-container/76801/4 found that the obvious way to use this variable doesn't work, despite what our docs and examples say. Perhaps in the past it did but now you need to use ";" as a separator to make sure the final command line works properly. For example "-A foo" becomes "-A foo" when python goes to run the runner script. The script sees this as one command line element, not two. What you actually want is "-A;foo" which we convert to "-A" "foo" which the script sees as one option and one value for that option. The "Script:" printout from dotest is misleading here because it does `" ".join(cmd)` so it looks like it's ok but in fact it's not. I'm not changing that format though because printing the command as a Python list is not useful outside of this specific situation.
-
Guray Ozen authored
This PR add `TmaDescriptorBuilder` - class simplifies TMA generation. - Makes the code ready to support various Tma configurations - removes strings and use the enums from `mlir.nvgpu.ENUMs`. - Example "swizzle = swizzle_128b, l2promo=none, oob=zero, interleave=none" to enums in `mlir.nvgpu` dialects. - Enums have string equivalent that are used during the IR writing and generation (see `TmaDescriptorBuilder::tensormap_descriptor_ty`). - Improves readability and abstracts out TMA descriptor builders in reusable component. --------- Co-authored-by:Manish Gupta <manigupta@google.com>
-
Jie Fu authored
llvm-project/clang/lib/Serialization/ASTWriter.cpp:5077:59: error: lambda capture 'SemaRef' is not used [-Werror,-Wunused-lambda-capture] auto AddEmittedDeclRefOrZero = [this, &SemaDeclRefs, &SemaRef](Decl *D) { ~~~^~~~~~~ 1 error generated. -
Durgadoss R authored
The first argument to the nvvm_shfl_sync_* family of intrinsics is the thread_mask (aka member_mask). This patch renames the corresponding operand in the Op to reflect the same i.e. `dst` -> `thread_mask`. While we are there, add summary and description for this Op. Signed-off-by:Durgadoss R <durgadossr@nvidia.com>
-
Chuanqi Xu authored
module purview For, ``` export module A; static int impl() { ... } export int func() { return impl(); } ``` Previously, even with reduced BMI, the function `impl` will be emitted into the BMI. After the patch, the static entities in module purview won't get emitted eagerly. Now the static entities may only be emitted if required. Note that, this restriction is actually more relaxed than the language standard required. The language spec said, the program is ill-formed if any TU-local entities get exposed. However, we can't do this since there are many static entities in the headers of existing libraries. Forbidding that will cause many existing program fail immediately. Another note here is, we can't do this for non-static non-exported entities, they can be used for other module units within the same module. -
Isha Agarwal authored
Updated cet test to: -Check different modules based on different cet options -Added negative tests also --------- Signed-off-by:Isha Agarwal <isha.agarwal@intel.com>
-
Pavel Labath authored
It breaks expression evaluation on arm, and the x86 breakage has been fixed in 6cea7c49. This reverts commit 915c84b1.
-
Guray Ozen authored
-
martinboehme authored
Reverts llvm/llvm-project#88865 There were failing tests in the CI that I didn't notice. Sorry.
-
Pierre van Houtryve authored
We take the terminator from EntryBB and put it in ComputeEnd. Make sure we also move the DT edges, we previously only did it assuming a non-conditional branch. Fixes SWDEV-453943
-
martinboehme authored
See also discussion in #88726.
-
Mike Weller authored
Fix `bugprone-forwarding-reference-overload` so it doesn't report a constructor that is deleted.
-
Nikita Popov authored
Fix build after 1baa3850.
-
Nikita Popov authored
In #88217 a large set of matchers was changed to only accept poison values in splats, but not undef values. This is because we now use poison for non-demanded vector elements, and allowing undef can cause correctness issues. This patch covers the remaining matchers by changing the AllowUndef parameter of getSplatValue() to AllowPoison instead. We also carry out corresponding renames in matchers. As a followup, we may want to change the default for things like m_APInt to m_APIntAllowPoison (as this is much less risky when only allowing poison), but this change doesn't do that. There is one caveat here: We have a single place (X86FixupVectorConstants) which does require handling of vector splats with undefs. This is because this works on backend constant pool entries, which currently still use undef instead of poison for non-demanded elements (because SDAG as a whole does not have an explicit poison representation). As it's just the single use, I've open-coded a getSplatValueAllowUndef() helper there, to discourage use in any other places.
-
Chuanqi Xu authored
ASTWrite would write some special records for the consumer of the AST can get the information easily. This is fine. But currently all the special records are written eagerly, which is conflicting with reduced BMI. In reduced BMI, we hope to write things as less as possible. It is not a goal for reduced BMI to retain all the informations. So in this patch we won't record the special declarations eagerly before we starting write. But only writing the sepcial records after we writes decls and types, then only the reached declarations will be collected.
-
Chuanqi Xu authored
ASTWriter::WriteASTCore ASTWriter::WriteASTCore is a big function and slightly hard to read. This patch extracts the logics to force emitting special declarations and writing special records for these declarations into member functions. This is helpful to improve the readability and also helpful for the following patch to write special declarations lazily.
-
Dmitrii Agibov authored
-
Vassil Vassilev authored
Fixes #56517.
-
Timm Bäder authored
This can happen in C.
-
Andreas Jonson authored
Rename has/dropPoisonGeneratingFlagsOrMetadata to has/dropPoisonGeneratingAnnotations and make it also handle nonnull, align and range return attributes on calls, similar to the existing handling for !nonnull, !align and !range metadata.
-
Craig Topper authored
-
Timm Bäder authored
Fixes the Codegen/CSKY/csky-hard-abi.c test
-
Nikita Popov authored
-
Nikita Popov authored
The llvm.smix should be llvm.smin.
-