- Mar 15, 2024
-
-
Thurston Dang authored
MSan divides the virtual address space into APP, INVALID, SHADOW and ORIGIN memory. The allocator usually just steals a bit of the APP address space: typically the bottom portion of the PIE binaries section, which works because the Linux kernel maps from the top of the PIE binaries section. However, if ASLR is very aggressive, the binary may end up mapped in the same location where the allocator wants to live; this results in a segfault. This patch adds in a MappingDesc::ALLOCATOR type and enforces that the memory range for the allocator is not occupied by anything else. Since the allocator range information is not readily available in msan.h, we duplicate the information from msan_allocator.cpp. Note: aggressive ASLR can also lead to a different type of failure, where the PIE binaries/libraries are mapped entirely outside of the APP/ALLOCATOR sections; that will be addressed in a separate patch (https://github.com/llvm/llvm-project/pull/85142).
-
Alexey Bataev authored
-
yronglin authored
[LWG3772](https://wg21.link/LWG3772) already implemented with https://reviews.llvm.org/D141699 . Signed-off-by:
yronglin <yronglin777@gmail.com>
-
Aart Bik authored
-
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. Reland after fix has landed for circular modules #85309
-
Alexey Bataev authored
This reverts commit ea429e19 to fix issues revealed in https://lab.llvm.org/buildbot/#/builders/186/builds/15299 and https://lab.llvm.org/buildbot/#/builders/238/builds/8426.
-
Noah Goldstein authored
Bug was introduced in #82555 We where missing check that the constant was non-zero for signed + mul transform. Closes #85298
-
Noah Goldstein authored
-
Stephen Tozer authored
Fixes: https://github.com/llvm/llvm-project/issues/85254 Hardware loops inserts PHIs at the position `getFirstNonPhi()`, which is incorrect - instead, `getFirstNonPhiIt()` is required to not insert the PHI after any debug records that immediately follow the last existing PHI.
-
Peter Klausler authored
flang/module/__fortran_type_info.mod uses __fortran_builtins.mod, but it is also implicitly used when compiling __fortran_builtins.f90 (or anything else). If __fortran_type_info.mod finds an old __fortran_builtins.mod file, compilation can fail while building the new one. Break the dependence by *not* generating runtime derived type information for __fortran_builtins.f90.
-
Maksim Panchenko authored
Add MCPlusBuilder interface for creating two new branch types.
-
Krzysztof Parzyszek authored
Temporarily rename old clause list to `clauses2`, old clause iterator to `ClauseIterator2`. Change `findUniqueClause` to iterate over `omp::Clause` objects, modify all handlers to operate on 'omp::clause::xyz` equivalents. [Clause representation 2/6]
-
LLVM GN Syncbot authored
-
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.
-