- Jul 22, 2023
-
-
Nico Weber authored
Should maybe be 1 on linux, at least if is_clang. But just disabling it everywhere is good enough for now.
-
Nico Weber authored
-
Nico Weber authored
-
Daniil Dudkin authored
This patch adds supports for the reduction intrinsic for floating point minimum and maximum that have been added to LLVM by https://reviews.llvm.org/D152370. Related to: #63969 Reviewed By: dcaballe Differential Revision: https://reviews.llvm.org/D155869
-
Nuno Lopes authored
-
Nuno Lopes authored
These are used to create branch instructions. The condition is patched later
-
Phoebe Wang authored
Fixes root cause of #63017. The reason is similar to BUILD_VECTOR. We have legal vector type but still soft promote for scalar type. So we need to customize these scalar to vector nodes. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D155961
-
Matt Arsenault authored
Revert part of f407a739. Some of the HIP headers were using the f16 rcp inline, such that it breaks compiling code against non-top-of-tree headers. Need to wait for a few HIP releases to expire to fully remove these. Fixes #63981
-
Matt Arsenault authored
-
Matt Arsenault authored
We have to assume the input could be positive-zero. Makes alive2 happy.
-
Nuno Lopes authored
Used to construct full structs/vectors also, covert freeze undef -> freeze poison (same semantics)
-
Nuno Lopes authored
This is used in a phi node that is created for which only 1 value is accessed (the non-poison)
-
Fabian Mora authored
Currently, `ROCDL::GridDim*Op` is being translated to `__ockl_get_global_size`, however to match the meaning of `gpu.grid_dim` it should instead be translated to `__ockl_get_num_groups`. This change would also make it agree with the meaning of `gridDimx.*` in HIP, see: https://github.com/ROCm-Developer-Tools/hipamd/blob/develop/include/hip/amd_detail/amd_hip_runtime.h#L257 Difference between the functions: ``` __ockl_get_global_size = blockDim * numBlocks __ockl_get_num_groups = numBlocks ``` Reviewed By: krzysz00 Differential Revision: https://reviews.llvm.org/D156009
-
Benjamin Kramer authored
-
Phoebe Wang authored
Fixes #63017 Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D155952
-
Mark de Wever authored
Implements parts of - P2093R14 Formatted output - P2539R4 Should the output of std::print to a terminal be synchronized with the underlying stream? Depends on D150044 Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D155262 -
Fangrui Song authored
-
Matthias Springer authored
`changed` was not updated correctly when it was already set to "true" before calling `applyPatternsAndFoldGreedily`. Differential Revision: https://reviews.llvm.org/D155934
-
Matthias Springer authored
Add a transform that eliminates dead operations. This is useful after certain transforms (such as fusion) that create/clone new IR but leave the original IR in place. Differential Revision: https://reviews.llvm.org/D155954
-
Fangrui Song authored
There is a libstdc++ stl_map.h bug that is only back ported to 7.5. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78595#c13 ``` /tmp/opt/gcc-7.3.0/include/c++/7.3.0/bits/stl_tree.h:2091:28: error: no matching function for call to ‘std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, std::unique_ptr<llvm::vfs::detail::InMemoryNode> >, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, std::unique_ptr<llvm::vfs::detail::InMemoryNode> > >, std::less<std::__cxx11::basic_string<char> >, std::allocator<std::pair<const std::__cxx11::basic_string<char>, std::unique_ptr<llvm::vfs::detail::InMemoryNode> > > >::_M_get_insert_unique_pos(std::pair<llvm::StringRef, std::unique_ptr<llvm::vfs::detail::InMemoryNode> >::first_type&)’ = _M_get_insert_unique_pos(_KeyOfValue()(__v)); ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ ``` Just construct a std::string from StringRef to work around it.
-
Mehdi Amini authored
Instead of crashing, try to print a useful error message.
-
Valentin Clement authored
Reviewed By: razvanlupusoru Differential Revision: https://reviews.llvm.org/D155897
-
khei4 authored
Revert "Reapply: [MemCpyOpt] implement single BB stack-move optimization which unify the static unescaped allocas" revert because crash on chrome windows https://reviews.llvm.org/D153453#4524256 This reverts commit 569769b6.
-
Nathan Ridge authored
Differential Revision: https://reviews.llvm.org/D154471
-
Fangrui Song authored
When using -fsplit-lto-unit (explicitly specified or due to using -fsanitize=cfi/-fwhole-program-vtables), the emitted LLVM IR contains a module flag metadata `"EnableSplitLTOUnit"`. If a module contains both type metadata and `"EnableSplitLTOUnit"`, `ThinLTOBitcodeWriter.cpp` will write two modules into the bitcode file. Compiling the bitcode (not ThinLTO backend compilation) will lead to an error due to `parseIR` requiring a single module. ``` % clang -flto=thin a.cc -c -o a.bc % clang -c a.bc % clang -fsplit-lto-unit -flto=thin a.cc -c -o a.bc % clang -c a.bc error: Expected a single module 1 error generated. ``` There are multiple ways to have just one module in a bitcode file output: `-Xclang -fno-lto-unit`, not using features like `-fsanitize=cfi`, using `-fsanitize=cfi` with `-fno-split-lto-unit`. I think whether a bitcode input file contains 2 modules (internal implementation strategy) should not be a criterion to require an additional driver option when the user seek for a non-LTO compile action. Let's place the extra module (if present) into CodeGenOptions::LinkBitcodeFiles (originally for -cc1 -mlink-bitcode-file). Linker::linkModules will link the two modules together. This patch makes the following commands work: ``` clang -S -emit-llvm a.bc clang -S a.bc clang -c a.bc ``` Reviewed By: ormris Differential Revision: https://reviews.llvm.org/D154923
-
Richard Smith authored
- When the destination is a final class type that does not derive from the source type, the cast always fails and is now emitted as a null pointer or call to __cxa_bad_cast. - When the destination is a final class type that does derive from the source type, emit a direct comparison against the corresponding base class vptr value(s). There may be more than one such value in the case of multiple inheritance; check them all. For now, this is supported only for the Itanium ABI. I expect the same thing is possible for the MS ABI too, but I don't know what guarantees are made about vfptr uniqueness. Reviewed By: rjmccall Differential Revision: https://reviews.llvm.org/D154658
-
Med Ismail Bennani authored
This patch adds the ability to pass native types from the script interpreter to methods that use a {SB,}StructuredData argument. To do so, this patch changes the `ScriptedObject` struture that holds the pointer to the script object as well as the originating script interpreter language. It also exposes that to the SB API via a new class called `SBScriptObject`. This structure allows the debugger to parse the script object and convert it to a StructuredData object. If the type is not compatible with the StructuredData types, we will store its pointer in a `StructuredData::Generic` object. This patch also adds some SWIG typemaps that checks the input argument to ensure it's either an SBStructuredData object, in which case it just passes it throught, or a python object that is NOT another SB type, to provide some guardrails for the user. rdar://111467140 Differential Revision: https://reviews.llvm.org/D155161 Signed-off-by:Med Ismail Bennani <ismail@bennani.ma>
-
Sunil Srivastava authored
-
Sam McCall authored
Our use case is wanting to apply a spelling strategy to rewrite the spellings written in IWYU pragma private directives. Differential Revision: https://reviews.llvm.org/D155671
-
Felipe de Azevedo Piovezan authored
This rewrites DW_OP_addrx inside DWARFExpression as an DW_OP_addr so that we can update addresses that are originally located in the debug_addr section. The full discussion behind this can be found in https://discourse.llvm.org/t/dwarfexpression-and-dw-op-addrx/71627/12, but a summary follows. When SymbolFileDWARF::ParseVariableDIE creates DWARFExpressions for variables whose location is an OP_addr, it knows how to remap addresses appropriately in the DebugMap case. It then calls DWARFExpression::Update_DW_OP_addr, which updates the value associated with OP_addr. However, when we have an OP_addrx, the update function does nothing. This makes sense, as the DWARFExpression does not have a mutable view of the debug_addr section. In non-DebugMap flows this is not an issue, as the debug_addr contains the correct addresses of variables. In DebugMap flows, this is problematic because the work done by RelinkOSOAddress is lost. By updating the OP to OP_addr, we can also update the address as required, We also explored the alternative of relinking the debug_addr section when we are initializing OSOs (InitOSO). However, this creates an inconsistent story for users of DWARFExpression::GetLocation_DW_OP_addr. This function returns an address without telling callers whether that address came from an OP_addr or an OP_addrx. If we preemptively relink OP_addrx results without doing the same for OP_addr results, then callers can’t know whether the address they got was an executable address or an object file address. In other words, they can’t know whether they need to call LinkOSOFileAddress on those results or not. This patch addresses the majority of test failures when enabling DWARF 5 for MachO (over 200 test failures). Differential Revision: https://reviews.llvm.org/D155198
-
TatWai Chong authored
when operating integer type tensors, tosa elementwise multiplication requires the element type of result to be a 32-bit integer rather than the same type as inputs. Change-Id: Ifd3d7ebd879be5c6b2c8e23aa6d7ef41f39c6d41 Reviewed By: mgehre-amd Differential Revision: https://reviews.llvm.org/D154988
-
Evan Wilde authored
There are some trailing semicolons on namespaces in clang/lib/APINotes/APINotesFormat.h. These result in warnings while building and don't need to be there. Reviewed By: compnerd Differential Revision: https://reviews.llvm.org/D105049
-
Kazu Hirata authored
This patch fixes: llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp:1006:9: error: unused variable 'Ty' [-Werror,-Wunused-variable]
-
Jon Roelofs authored
... since they've always supported it. rdar://104359594 Differential revision: https://reviews.llvm.org/D155988
-
Philip Reames authored
This reverts commit cbf2a6ce. This was a precommited test for a change which is being abandoned.
-
Nathan Chancellor authored
This reverts commit 086ee995. This patch causes an infinite loop when building arch/mips/mm/c-r4k.c in the Linux kernel. See the comment in Phabricator for a reduced reproducer: https://reviews.llvm.org/rG086ee99564afbb11449c08ea2e094f7f49fadde5
-
Matt Arsenault authored
-
Matt Arsenault authored
Extends the new frexp scaled reciprocal to the general case. The reciprocal case is just the same thing when frexp of 1 is constant folded. Could probably clean up the code to rely on that constant folding. Improves results for the IEEE path for the default OpenCL division. We used to only emit the fdiv.fast intrinsic with a 2.5 ulp accuracy threshold with DAZ, which uses explicit range checks. This gives us a better fast option with the default IEEE behavior.
-
Matt Arsenault authored
NFC-ish. Does trigger some reordering of the fdiv scalarization. Also skips scalarizing in more cases where nothing was going to happen. We can still scalarize in some no-op edge cases. https://reviews.llvm.org/D155740
-
Richard Smith authored
Different requesting modules can have different lookup results, so don't cache results across modules. Fixes a regression introduced in reviews.llvm.org/D132779. Test case based on one provided by Jan Svoboda. Reviewed By: jansvoboda11 Differential Revision: https://reviews.llvm.org/D156000
-