- Mar 15, 2024
-
-
Lang Hames authored
Only platform specific darwin OS values (e.g. macosx, ios, watchos, ...) can be mapped to an LC_BUILD_VERSION platform. For all other values return an empty optional to indicate that the load command can't be constructed. Also fixes the simulator conditions to return the correct platform, and adds a testcase.
-
Farzon Lotfi authored
This change implements part 1 of 2 for #70095 - `hlsl_intrinsics.h` - add the `isinf` api - `Builtins.td` - add an hlsl builtin for `isinf`. - `CGBuiltin.cpp` add the ir generation for `isinf` intrinsic. - `SemaChecking.cpp` - add a non-math elementwise checks because this is a bool return. - `IntrinsicsDirectX.td` - add an `isinf` intrinsic. `DXIL.td` lowering is left, but changes need to be made there before we can support this case.
-
ManuelJBrito authored
Regenerate test checks for NewGVN.
-
Michael Jones authored
Reverts llvm/llvm-project#84991 Caused build failures
-
Michael Jones authored
A downstream overlay mode user ran into issues with the isnan macro not working in our sources with a specific libc configuration. This patch replaces the last direct includes of math.h with our internal math_macros.h, along with the necessary build system changes.
-
Farzon Lotfi authored
This change implements #70074 - `hlsl_intrinsics.h` - add the `rsqrt` api - `DXIL.td` add the llvm intrinsic to DXIL op lowering map. - `Builtins.td` - add an hlsl builtin for rsqrt. - `CGBuiltin.cpp` add the ir generation for the rsqrt intrinsic. - `SemaChecking.cpp` - reuse the one arg float only checks. - `IntrinsicsDirectX.td` -add an `rsqrt` intrinsic.
-
alx32 authored
For Mach-O, ld64 supports the `-fobjc-relative-method-lists` flag which changes the format in which method lists are generated. The format uses delta encoding vs the original direct-pointer encoding. This change adds support to `llvm-objdump` and `llvm-otool` for decoding/dumping of method lists in the delta format. Previously, if a binary with this information format was passed to the tooling, it would output invalid information, trying to parse the delta lists as pointer lists. After this change, the tooling will output correct information if a binary in this format is encountered. The output format is closest feasible match to XCode 15.1's otool output. Tests are included for both 32bit and 64bit binaries. The code style was matched as close as possible to existing implementation of parsing non-delta method lists. Diff between llvm-objdump and XCode 15.1 otool:  --------- Co-authored-by:
Alex B <alexborcan@meta.com>
-
Alex MacLean authored
Switch from `.weak` to `.common` linkage for common global variables where possible. The `.common` linkage is described in [PTX ISA 11.6.4. Linking Directives: .common](https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#linking-directives-common) > Declares identifier to be globally visible but “common”. > >Common symbols are similar to globally visible symbols. However multiple object files may declare the same common symbol and they may have different types and sizes and references to a symbol get resolved against a common symbol with the largest size. > >Only one object file can initialize a common symbol and that must have the largest size among all other definitions of that common symbol from different object files. > >.common linking directive can be used only on variables with .global storage. It cannot be used on function symbols or on symbols with opaque type.
-
Zaara Syeda authored
The following tests fail when built with Address and Undefined sanitizers: CodeGen/PowerPC/basic-toc-data-def.ll CodeGen/PowerPC/toc-data-large-array2.ll Subtarget may be null in emitGlobalVariable, for example in the testcase where we have no functions in the IR. The fix moves this function from PPCSubtarget to a static helper function. This only fails with sanitizers because the Subtarget is not used in the member function.
-
Andrzej Warzyński authored
This patch adds support for masked vectorisation of depthwise 1D WC convolutions,`linalg.depthwise_conv_1d_nwc_wc`. This is implemented by adding support for masking. Two major assumptions are made: * only the channel dimension can be dynamic/scalable (i.e. the trailing dim), * when specifying vector sizes to use in the vectoriser, only the size corresponding to the channel dim is effectively used (other dims are inferred from the context). In terms of scalable vectorisation, this should be sufficient to cover all practical cases (i.e. making arbitrary dim scalable wouldn't make much sense). As for more generic cases with dynamic shapes (e.g. W or N dims being dynamic), more work would be needed. In particular, one would have to consider the filter and input/output tensors separately. -
Maksim Panchenko authored
Refactor MCPlusBuilder's create{Instruction}() functions that used to return bool. We almost never check the return value as we rely on llvm_unreachable() to detect unimplemented functionality. There were a couple of cases that checked the return value, but they would hit the unreachable condition first (at least in debug builds) before the return value gets checked. -
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
-