- Mar 15, 2024
-
-
Alexey Bataev authored
The instruction itself can be considered good for minbitwidth casting, even if one of the operand checks returns false. Reviewers: RKSimon Reviewed By: RKSimon Pull Request: https://github.com/llvm/llvm-project/pull/84363
-
Daniel Kiss authored
Reverts llvm/llvm-project#82763 because caused a regressions with inlining. See https://github.com/llvm/llvm-project/pull/84494#issuecomment-1996047458
-
Philip Reames authored
Cutting down on diff in an upcoming change.
-
Slava Zakharin authored
Avoid referencing executionEnvironment in the device code, since environment.cpp is not part of the CUDA build yet. This is a temporary fix before #85182 is merged.
-
Romaric Jodin authored
Add a clspv switch in gen_convert.cl This is needed as Vulkan SPIR-V does not respect the assumptions needed to have the generic convert.cl compliant on many platforms. It is needed because of the conversion of TYPE_MAX and TYPE_MIN. Depending on the platform the behaviour can vary, but most of them just do not convert correctly those 2 values. Because of that, we also need to avoid having explicit function for simple conversions because it allows llvm to optimise the code, thus removing some of the added checks that are in fact needed.
-
Craig Topper authored
We can treat a shift by constant as a multiply by a power of 2 and we can treat an or disjoint as a 'add nsw nuw'. I've added a helper struct similar to a struct used in ScalarEvolution.cpp to represent the opcode, operands, and NSW/NUW flags for normal add/sub/mul and shl/or that are being treated as mul/add. I don't think we need to teach cloneIVUser about this. It will continue to clone them using cloneBitwiseIVUser. After the cloning we will ask for the SCEV expression for the cloned IV user and verify that it matches the AddRec returned by getExtendedOperandRecurrence. Since SCEV also knows how to convert shl to mul and or disjoint to add nsw nuw, this should usually match. If it doesn't match, the cloned IV user will be deleted.
-
Craig Topper authored
Use a normal min/max reduction that doesn't propagate nans and force the result to nan at the end if any elements were nan.
-
dyung authored
This reverts commit 6f3f659c. This change is causing TSAN failures on a bot as reported in #85188: https://lab.llvm.org/buildbot/#/builders/247/builds/15279
-
Nikolas Klauser authored
This also moves `__all` from `sfinae_helpers.h` to `conjunction.h`.
-
Valentin Clement (バレンタイン クレメン) authored
Reverts llvm/llvm-project#85135 There is an issue with module file generation in flang build.
-
Cyndy Ishida authored
-
Thorsten Schütt authored
-
Stephen Tozer authored
Dexter currently supports Visual Studio 2015/2017/2019, but not 2022; this patch adds support for 2022.
-
Maksim Panchenko authored
Reset operand list whenever we create a new instruction via a parameter passed by reference. Most functions were already doing this, but there are several places missing the reset. Potentially, if we don not clear the list it could lead to invalid instruction operands. But the existing code is unaffected.
-
Lang Hames authored
This member switched from an optional to a vector in 0f252e7b.
-
Ulrich Weigand authored
This reverts commit 611c62b3.
-
Jay Foad authored
Removing the extension to FullWidth should make them much more efficient in the 64-bit case, because 65-bit APInts use a separate allocation for their bits.
-
Valentin Clement (バレンタイン クレメン) authored
Comparing c_ptr type for equality or inequality is raising an error. ``` not yet implemented: intrinsic module procedure: c_ptr_eq ``` or this one for inequality ``` not yet implemented: intrinsic module procedure: c_ptr_ne ``` This patch adds a lowering for them and fix the `__fortran_builtins.f90` module for inequality.
-
Stanislav Mekhanoshin authored
-
Krzysztof Parzyszek authored
…ctive The function `ActOnOpenMPTargetParallelForSimdDirective` gets the number of capture levels for OMPD_target_parallel_for, whereas the intended directive is OMPD_target_parallel_for_simd.
-
Paschalis Mpeis authored
getArithmeticInstrCost is used by both LoopVectorizer and SLPVectorizer to compute the cost of frem, which becomes a call cost on AArch64 when TLI has a vector library function. Add tests that do SLP vectorization for code that contains 2x double and 4x float frem instructions.
-
Ulrich Weigand authored
Code in plugins-nextgen reading ELF files is currently hard-coded to assume a 64-bit little-endian ELF format. Unfortunately, this assumption is even embedded in the interface between GlobalHandler and Utils/ELF routines, which use ELF64LE types. To fix this, I've refactored the interface to use generic types, in particular by using (a unique_ptr to) ObjectFile instead of ELF64LEObjectFile, and ELFSymbolRef instead of ELF64LE::Sym. This allows properly templating over multiple ELF format variants inside Utils/ELF; specifically, this patch adds support for 64-bit big-endian ELF files in addition to 64-bit little-endian files.
-
Heejin Ahn authored
These are Wasm only functions so they are better be within `WebAssembly` namespace rather than the `llvm` namespace which includes the whole LLVM. Also this removes `extern` keywords which are not strictly necessary.
-
Hans Wennborg authored
The calls are already musttail.
-
Mark de Wever authored
When calling setbuf(nullptr, 0) before performing file operations it should set the file to unbuffered mode. Currently the code avoids buffering internally, but the underlying stream still can buffer. This is addressed by disabling the buffering of the underlying stream. Fixes: https://github.com/llvm/llvm-project/issues/60509
-
Fangrui Song authored
This reverts commit bbc0f99f (https://reviews.llvm.org/D157663). With this change, `-g` for the next major release 19.1 will generate R_RISCV_SET_ULEB128/R_RISCV_SUB_ULEB128 relocations, which require lld>=18 or binutils>=2.41. binutils 2.41 is relatively new, but GCC has been producing R_RISCV_SET_ULEB128/R_RISCV_SUB_ULEB128 for some time now.
-
Fangrui Song authored
#69295 demoted Defined symbols relative to discarded sections. If such a symbol is unreferenced, the desired behavior is to eliminate it from .symtab just like --gc-sections discarded definitions. Linux kernel's CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y configuration expects that the unreferenced `unused` is not emitted to .symtab (https://github.com/ClangBuiltLinux/linux/issues/2006). For relocations referencing demoted symbols, the symbol index restores to 0 like older lld (`R_X86_64_64 0` in `discard-section.s`). Fix #85048
-
Krzysztof Parzyszek authored
-
Mark de Wever authored
-
Lang Hames authored
No testcase: I'm still thinking about the best way to test this.
-
Felipe de Azevedo Piovezan authored
Some languages may create artificial functions that have no real user code, even though there is line table information for them. One such case is with coroutine code that receives the CoroSplitter transformation in LLVM IR. That code transformation creates many different Functions, cloning one Instruction into many Instructions in many different Functions and copying the associated debug locations. It would be difficult to make that pass delete debug locations of cloned instructions in a language agnostic way (is it even possible?), but LLDB can ignore certain locations by querying its Language APIs and having it decide based on, for example, mangling information.
-
Valentin Clement (バレンタイン クレメン) authored
Expose patterns so they can be reused in other passes.
-
Ingo Müller authored
There were two problems: * The `%s` argument to `FileCheck` was repeated. * A single dash for `-check-prefix` was used but we need two dashes.
-
Florian Mayer authored
-
Krzysztof Parzyszek authored
In file included from ../llvm-project/flang/lib/Lower/OpenMP/Clauses.cpp:9: ../llvm-project/flang/lib/Lower/OpenMP/Clauses.h:195:17: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces] 195 | return Clause{id, specific, source}; | ^~~~~~~~~~~~ | { }
-
- Mar 14, 2024
-
-
Jason Molenda authored
Darwin AArch64 application processors are run with Top Byte Ignore mode enabled so metadata may be stored in the top byte, it needs to be ignored when reading/writing memory. David Spickett handled this already in the base class Process::ReadMemory but ProcessMachCore overrides that method (to avoid the memory cache) and did not pick up the same change. I add a test case that creates a pointer with metadata in the top byte and dereferences it with a live process and with a corefile. rdar://123784501
-
Timm Bäder authored
... when doing binary operations on them.
-
Timm Bäder authored
-
Jonas Paulsson authored
The depths of the Root and the NewRoot are to be compared in MachineCombiner::improvesCriticalPathLen(), and while the call to BlockTrace.getInstrCycles(*Root) includes the Depth of a PHI, for some reason PHI nodes have been ignored in getOperandDef(). This patch removes the special handling of PHIs in getOperandDef() so that Root and NewRoot get a fair comparison. This does not affect loop headers as MachineTraceMetrics handles that case by ignoring incoming PHI edges.
-
Sam McCall authored
This enables clang and external nullability checkers to make use of these annotations on nullable C++ class types like unique_ptr. These types are recognized by the presence of the _Nullable attribute. Nullable standard library types implicitly receive this attribute. Existing static warnings for raw pointers are extended to smart pointers: - nullptr used as return value or argument for non-null functions (`-Wnonnull`) - assigning or initializing nonnull variables with nullable values (`-Wnullable-to-nonnull-conversion`) It doesn't implicitly add these attributes based on the assume_nonnull pragma, nor warn on missing attributes where the pragma would apply them. I'm not confident that the pragma's current behavior will work well for C++ (where type-based metaprogramming is much more common than C/ObjC). We'd like to revisit this once we have more implementation experience. Support can be detected as `__has_feature(nullability_on_classes)`. This is needed for back-compatibility, as previously clang would issue a hard error when _Nullable appears on a smart pointer. UBSan's `-fsanitize=nullability` will not check smart-pointer types. It can be made to do so by synthesizing calls to `operator bool`, but that's left for future work. Discussion: https://discourse.llvm.org/t/rfc-allowing-nonnull-etc-on-smart-pointers/77201/26
-