- Aug 26, 2022
-
-
Philip Reames authored
The fact that we silently accept unrecognized intrinsic names is sometimes a bit annoying.
-
- Aug 25, 2022
-
-
Philip Reames authored
-
Craig Topper authored
This optimizes xors that appear due to legalizing setge/setle which require an xor with 1. This reduces the number of xors and may allow the xor to fold with a beqz or bnez. Differential Revision: https://reviews.llvm.org/D132614
-
Simon Pilgrim authored
Most of our cost model tables have been created assuming cost kind == recip-throughput. But we're starting to see passes wanting to get accurate costs for the other kinds as well. Some of these can be determined procedurally (e.g. codesize by default could just be the split count after type legalization), but others are going to need to be handled in cost tables - this is especially true for x86 which has so many ISA combinations. I've created a 'CostKindCosts' struct which can hold cost values for the 4 cost kinds, defaulting to -1U for unknown cost, this can be used with the existing CostTblEntryT/CostTableLookup template code. I've also added a [TargetCostKind] accessor to make it much easier to look up individual <Optional> costs. This just changes the ISD::SELECT costs to check the effect (and also to check that the ISD::SETCC are correctly handled for default/None cost kinds) - the plan would be to slowly extend this and move the CostKindTblEntry type somewhere generic to allow other targets to use it once its matured. I'm also going to resurrect D103695 so that it can help with latency/codesize/sizelatency coverage testing. For sizelatency - IIRC the definition was vague to let it be target specific - I've tried to use typical uop counts so they're comparable to MicroOpBufferSize etc. REAPPLIED: Added early out to prevent getCmpSelInstrCost being used for anything but generic integer/float scalar/vector types - getTypeLegalizationCost can't handle the "exotic" TypeID enums that some passes attempt to get a costs for (aggregates etc.). Differential Revision: https://reviews.llvm.org/D132216
-
Michael Buch authored
This test would previously expect one of the parameters to have an incorrect DW_AT_location. Stepping through `fun` with a debugger would then no reflect updates to one of the parameters. With a recent change to Clang's DeadArgumentEliminationPass (see `879f5118`) the generated DWARF does not contain a location for `parama`, and stepping through the function with `lldb` works as expected. Differential Revision: https://reviews.llvm.org/D132664
-
Daniel Bertalan authored
We now re-use the existing needsBinding() helper to determine if a branch has to go through a stub. The logic for determining which type of binding is needed is moved inside StubsSection::addEntry(). This is an NFC refactor that simplifies my diff that adds support for chained fixups. Differential Revision: https://reviews.llvm.org/D132476
-
Sanjay Patel authored
This test was added with 6cf6c053, but then made useless with D4238 / d1bea693. We still need a test to make sure transforms are not conflicting when matching a constant expression.
-
Jon Chesterfield authored
The cuda plugin maps TARGET_ALLOC_HOST onto cuMemAllocHost which is page locked host memory. Fine grain HSA memory is not necessarily page locked but has the same read/write from host or device semantics. The cuda plugin does this per-gpu and this patch makes it accessible from any gpu, but it can be locked down to match the cuda behaviour if preferred. Enabling tests requires an equivalent to // RUN: %libomptarget-compile-run-and-check-nvptx64-nvidia-cuda for amdgpu which doesn't seem to be in use yet. Reviewed By: jhuber6 Differential Revision: https://reviews.llvm.org/D132660
-
John Ericson authored
This reverts commit ad8c34bc.
-
Jakub Kuderski authored
This covers the scalar and 1-D vector case. I haven't implemented conversion for the multidimensional vector case yet because the current LLVM conversion infrastructure (`handleMultidimensionalVectors`) does not seem to support ops with multiple results. Reviewed By: Mogball Differential Revision: https://reviews.llvm.org/D132613
-
Nicolai Hähnle authored
v2: - fix Windows build issues Differential Revision: https://reviews.llvm.org/D129127
-
Jakub Kuderski authored
Based on @Mogball's feedback in https://reviews.llvm.org/D132613. Reviewed By: dcaballe Differential Revision: https://reviews.llvm.org/D132627
-
David Majnemer authored
The linker is supposed to detect when an object with /kernel is linked with another object which is not compiled with /kernel. The linker detects this by checking bit 30 in @feat.00.
-
Ben Langmuir authored
* Factor module map and module file path functions out * Use a secondary mapping to lookup module deps by ID instead of the preprocessor module map. * Sink DirectPrebuiltModularDeps into MDC. Differential Revision: https://reviews.llvm.org/D132617
-
Benjamin Kramer authored
This reverts commit 45846854. This triggers an assertion failure during Clang selfhost Unknown type! UNREACHABLE executed at llvm/lib/CodeGen/ValueTypes.cpp:548! *** SIGABRT received by PID 6107 (TID 6107) on cpu 218 from PID 6107; stack trace: *** @ 0x556c8827c2d1 64 llvm::llvm_unreachable_internal() @ 0x556c82a5542a 32 llvm::MVT::getVT() @ 0x556c82a54a28 80 llvm::EVT::getEVT() @ 0x556c7dda1526 80 llvm::TargetLoweringBase::getValueType() @ 0x556c8174dd38 112 llvm::BasicTTIImplBase<>::getTypeLegalizationCost() @ 0x556c81755e72 144 llvm::X86TTIImpl::getCmpSelInstrCost() @ 0x556c8174cadf 512 llvm::TargetTransformInfoImplCRTPBase<>::getInstructionCost() @ 0x556c84ab4dd2 32 llvm::TargetTransformInfo::getInstructionCost() @ 0x556c82ead283 1968 llvm::sinkRegion()
-
Mats Petersson authored
The SUM function does appear to be safe to use, so remove the experimental flag for the SUM operation. Reviewed By: vzakhari, awarzynski Differential Revision: https://reviews.llvm.org/D132567
-
Simon Pilgrim authored
Eventually this will be part of the cost table lookup
-
Matt Devereau authored
Add some missing patterns for ld1rq's scalar + scalar addressing mode. Also, adds the scalar + imm and scalar + scalar addressing modes for the patterns added in https://reviews.llvm.org/D130010 Differential Revision: https://reviews.llvm.org/D130993
-
Louis Dionne authored
Differential Revision: https://reviews.llvm.org/D132595
-
Benjamin Kramer authored
clang/lib/Basic/Targets/X86.h:293:8: warning: 'shouldEmitFloat16WithExcessPrecision' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] bool shouldEmitFloat16WithExcessPrecision() const { ^ clang/include/clang/Basic/TargetInfo.h:915:16: note: overridden virtual function is here virtual bool shouldEmitFloat16WithExcessPrecision() const { return false; } ^ -
Guillaume Chatelet authored
Differential Revision: https://reviews.llvm.org/D132638
-
Zahira Ammarguellat authored
Differential Revision: https://reviews.llvm.org/D113107
-
Timm Bäder authored
Implement pointer references, dereferences and assignments. Differential Revision: https://reviews.llvm.org/D132111
-
Tres Popp authored
This is similar to math.round, but rounds to even instead of rounding away from zero in the case of halfway values. This CL also adds lowerings to libm and to the LLVM intrinsic. Differential Revision: https://reviews.llvm.org/D132375
-
Benjamin Kramer authored
-
Benjamin Kramer authored
-
Simon Pilgrim authored
Most of our cost model tables have been created assuming cost kind == recip-throughput. But we're starting to see passes wanting to get accurate costs for the other kinds as well. Some of these can be determined procedurally (e.g. codesize by default could just be the split count after type legalization), but others are going to need to be handled in cost tables - this is especially true for x86 which has so many ISA combinations. I've created a 'CostKindCosts' struct which can hold cost values for the 4 cost kinds, defaulting to -1U for unknown cost, this can be used with the existing CostTblEntryT/CostTableLookup template code. I've also added a [TargetCostKind] accessor to make it much easier to look up individual <Optional> costs. This just changes the ISD::SELECT costs to check the effect (and also to check that the ISD::SETCC are correctly handled for default/None cost kinds) - the plan would be to slowly extend this and move the CostKindTblEntry type somewhere generic to allow other targets to use it once its matured. I'm also going to resurrect D103695 so that it can help with latency/codesize/sizelatency coverage testing. For sizelatency - IIRC the definition was vague to let it be target specific - I've tried to use typical uop counts so they're comparable to MicroOpBufferSize etc. Differential Revision: https://reviews.llvm.org/D132216
-
zhongyunde authored
Update three changes: 1.Split the Load/Store resources into two, Ld0St and Ld1, since only one of them is capable of stores. 2.Integer ADD and SUB instructions have different latencies and processor resource usage (pipeline) when they have a shift of zero vs. non-zero, refer to D8043 3.The throughout of scalar DIV instruction. Reviewed By: dmgreen, bryanpkc Differential Revision: https://reviews.llvm.org/D132529
-
Max Kazantsev authored
Since SCEV learned to look through single value phis with 20d798bd, whenever we add a new input to a Phi, we should make sure that the old cached value is dropped. Otherwise, it may lead to various miscompiles, such as breach of dominance as shown in the bug https://github.com/llvm/llvm-project/issues/57335
-
Nico Weber authored
This reverts commit 94c00c10. bc39d7bd was reverted in 0f28d485.
-
Sockke authored
[clang-tidy] Ignore other members in a union if any member of it is initialized in cppcoreguidelines-pro-type-member-init If a union member is initialized, the other members of the union are still suggested to be initialized in this check. This patch fixes this behavior. Reference issue: https://github.com/llvm/llvm-project/issues/54748 Reviewed By: njames93 Differential Revision: https://reviews.llvm.org/D127293
-
Felipe de Azevedo Piovezan authored
When setting a breakpoint upon throwing exceptions, LLDB only searches for the libc++abi code inside dylibs named: 1. libc++abi.dylib 2. libSystem.B.dylib However, this fails to account for libs with a version number. For example, when building the libcxx and libcxxabi runtimes, the following dylibs are generated: build/lib/libc++abi.1.0.dylib build/lib/libc++abi.1.dylib -> libc++abi.1.0.dylib build/lib/libc++abi.dylib -> libc++abi.1.dylib If we are debugging a program linked against any of the "versioned" libs, the breakpoint doesn't work. This commit adds these names to the search list. Differential Revision: https://reviews.llvm.org/D132598
-
isuckatcs authored
Prior to this patch when the analyzer encountered a non-POD 0 length array, it still invoked the constructor for 1 element, which lead to false positives. This patch makes sure that we no longer construct any elements when we see a 0 length array. Differential Revision: https://reviews.llvm.org/D131501
-
Felipe de Azevedo Piovezan authored
The variables LLDB_USING_LIBCPP and LLDB_USING_LIBSTDCPP are no longer used anywhere. Differential Revision: https://reviews.llvm.org/D132596
-
Dmitry Preobrazhensky authored
Differential Revision: https://reviews.llvm.org/D132549
-
Dmitry Preobrazhensky authored
Update assembler tests for FLAT instructions; remove redundant gfx11_asm_flat_mnemonic.s. Differential Revision: https://reviews.llvm.org/D132556
-
ZHU Zijia authored
Update `llvm/test/CodeGen/RISCV/branch-relaxation.ll` with `update_llc_test_checks.py`, according to https://reviews.llvm.org/D130560#3746417: >>! In D130560#3746417, @luismarques wrote: >>>! In D130560#3746379, @luismarques wrote: >> The tests don't seem to have been properly updated with >> `update_llc_test_checks.py`. >> `llvm/test/CodeGen/RISCV/branch-relaxation.ll` contains RV64 RUN >> lines but the corresponding CHECK lines are missing in >> some functions. > > Looking more closely at this, I guess you tried to only include the > `CHECK-RV64` and `CHECK-RV32` checks when relevant. That's a good > instinct but I guess it goes a bit against how we normally use > `update_llc_test_checks.py`. My understanding of the trade-off of > using that tool is that the test updates are much easier, even if > sometimes the CHECKs aren't as tight as something more tailormade. Reviewed By: luismarques Differential Revision: https://reviews.llvm.org/D132625
-
Martin Storsjö authored
When an object file contains an export directive, we normally do some amount of deferred processing of them at the end of the linking process. The -includeoptional option was handled after this, and any object files (defining new exports) weren't handled. Move the handling of the -includeoptional into the same late loop which does the fixups for e.g. export directives. Ideally, this would also be done for object files that are pulled in by the wrap options, and for mingw autoimports, but those changes require more modifications, to make them safe for potentially being executed multiple times. This fixes https://github.com/llvm/llvm-project/issues/57243. Differential Revision: https://reviews.llvm.org/D132361
-
Martin Storsjö authored
Check whether `F_OK` et al are defined before redefining them; mingw headers do define them, so check before providing the windows fallback defines. Also check `_WIN32` instead of `WIN32`; this is how it's consistently done in the rest of llvm. (The former is a compiler builtin define, while the latter isn't, but it's commonly set by e.g. build systems.) Differential Revision: https://reviews.llvm.org/D132481
-