- Jul 28, 2022
-
-
LLVM GN Syncbot authored
-
Liqiang Tao authored
This patch introduces the inline cost priority into the module inliner, which uses the same computation as InlineCost. Reviewed By: kazu Differential Revision: https://reviews.llvm.org/D130012
-
LLVM GN Syncbot authored
-
Liqiang Tao authored
This reverts commit bb7f62bb.
-
Florian Hahn authored
This reverts commit 5fb41342. This patch is causing crashes when building llvm-test-suite when optimizing for CPUs with AVX512. Reproducer crashing with llc: target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-apple-macosx" define i32 @test(<32 x i32> %0) #0 { entry: %1 = mul <32 x i32> %0, <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1> %2 = tail call i32 @llvm.vector.reduce.add.v32i32(<32 x i32> %1) ret i32 %2 } ; Function Attrs: nocallback nofree nosync nounwind readnone willreturn declare i32 @llvm.vector.reduce.add.v32i32(<32 x i32>) #1 attributes #0 = { "min-legal-vector-width"="0" "target-cpu"="skylake-avx512" } attributes #1 = { nocallback nofree nosync nounwind readnone willreturn }
-
Simon Pilgrim authored
This should now all be handled by SimplifyDemandedBits.
-
Chris Bieneman authored
This is pretty straightforward, it just adds a builtin to return a pointer to a resource handle. This maps to a dx intrinsic. The shape of this builtin and the underlying intrinsic will likely shift a bit as this implementation becomes more feature complete, but this is a good basis to get started. Depends on D128569. Differential Revision: https://reviews.llvm.org/D130016
-
Chris Bieneman authored
Most of the change here is fleshing out the HLSLExternalSemaSource with builder implementations to build the builtin types. Eventually, I may move some of this code into tablegen or a more managable declarative file but I want to get the AST generation logic ready first. This code adds two new types into the HLSL AST, `hlsl::Resource` and `hlsl::RWBuffer`. The `Resource` type is just a wrapper around a handle identifier, and is largely unused in source. It will morph a bit over time as I work on getting the source compatability correct, but for now it is a reasonable stand-in. The `RWBuffer` type is not ready for use. I'm posting this change for review because it adds a lot of infrastructure code and is testable. There is one change to clang code outside the HLSL-specific logic here, which addresses a behavior change introduced a long time ago in 967d4384. That change resulted in unintentionally breaking situations where an incomplete template declaration was provided from an AST source, and needed to be completed later by the external AST. That situation doesn't happen in the normal AST importer flow, but can happen when an AST source provides incomplete declarations of templates. The solution is to annotate template specializations of incomplete types with the HasExternalLexicalSource bit from the base template. Depends on D128012. Differential Revision: https://reviews.llvm.org/D128569
-
Sunho Kim authored
AIX platform was not supported but it was not explicitly checked in exception test as it was excluded by isPPC() check.
-
Simon Pilgrim authored
I'm actually trying to get rid of GetDemandedBits - but while dismantling it I noticed that we were altering opaque constants. Fixing that causes a FP_TO_INT_SAT regression that should be addressed separately - I'll raise a bug.
-
LLVM GN Syncbot authored
-
Liqiang Tao authored
This patch introduces the inline cost priority into the module inliner, which uses the same computation as InlineCost. Reviewed By: kazu Differential Revision: https://reviews.llvm.org/D130012
-
David Green authored
These vdup and vmov float16 intrinsics are being defined in both the general section and then again in fp16 under a !aarch64 flag. The vdup_lane intrinsics were being defined in both aarch64 and !aarch64 sections, so have been commoned. They are defined as macros, so do not give duplicate warnings, but removing the duplicates shouldn't alter the available intrinsics.
-
Simon Pilgrim authored
This patch allows SimplifyDemandedBits to call SimplifyMultipleUseDemandedBits in cases where the ISD::SRL source operand has other uses, enabling us to peek through the shifted value if we don't demand all the bits/elts. This is another step towards removing SelectionDAG::GetDemandedBits and just using TargetLowering::SimplifyMultipleUseDemandedBits. There a few cases where we end up with extra register moves which I think we can accept in exchange for the increased ILP. Differential Revision: https://reviews.llvm.org/D77804
-
Kevin P. Neal authored
Precommit tests for D112256 "[FPEnv][EarlyCSE] Add support for CSE of constrained FP intrinsics, take 2"
-
Amaury Séchet authored
It simplifies the code overall and removes the need for manual bookkeeping. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D130447
-
Sebastian Neubauer authored
outdir is defined in the line above, it will not exist in the install command, so it should not be escaped.
-
Amaury Séchet authored
It simplifies the code overall and removes the need for manual bookkeeping. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D130444
-
Alexander Timofeev authored
In the 2e29b013 we introduce a specific solving algorithm that analyzes the VGPR to SGPR copies use chains and either lowers the copy to v_readfirstlane_b32 or converts the whole chain to VALU forms. Same time we still have the code that blindly converts to VALU REG_SEQUENCE and PHIs in case they produce SGPR but have VGPRs input operands. In case the REG_SEQUENCE and PHIs are in the VGPR to SGPR copy use chain, and this chain was considered long enough to convert copy to v_readfistlane_b32, further lowering them to VALU leads to several kinds of issues. At first, we have v_readfistlane_b32 which is completely useless because most parts of its use chain were moved to VALU forms. Second, we may encounter subtle bugs related to the EXEC-dependent CF because of the weird mixing of SALU and VALU instructions. This change removes the code that moves REG_SEQUENCE and PHIs to VALU. Instead, we use the fact that both REG_SEQUENCE and PHIs have copy semantics. That is, if they define SGPR but have VGPR inputs, we insert VGPR to SGPR copies to make them pure SGPR. Then, the new copies are processed by the common VGPR to SGPR lowering algorithm. This is Part 2 in the series of commits aiming at the massive refactoring of the SIFixSGPRCopies pass. Reviewed By: rampitec Differential Revision: https://reviews.llvm.org/D130367
-
Sunho Kim authored
Add host exception support check utility flag. This is needed to not run tests that require exception support in few buildbots that lacks related symbols for some reason. Reviewed By: lhames Differential Revision: https://reviews.llvm.org/D129242
-
Sunho Kim authored
Fix "JIT session error: Symbols not found: [ DW.ref.__gxx_personality_v0 ] error" which happens when trying to use exceptions on ppc linux. To do this, it expands AutoClaimSymbols option in RTDyldObjectLinkingLayer to also claim weak symbols before they are tried to be resovled. In ppc linux, DW.ref symbols is emitted as weak hidden symbols in the later stage of MC pipeline. This means when using IRLayer (i.e. LLJIT), IRLayer will not claim responsibility for such symbols and RuntimeDyld will skip defining this symbol even though it couldn't resolve corresponding external symbol. Reviewed By: sgraenitz Differential Revision: https://reviews.llvm.org/D129175
-
Muhammad Usman Shahid authored
The patch mainly focuses on the lack of warnings for -Wtautological-compare. It works fine for positive numbers but doesn't for negative numbers. This is because the warning explicitly checks for an IntegerLiteral AST node, but -1 is represented by a UnaryOperator with an IntegerLiteral sub-Expr. For the below code we have warnings: if (0 == (5 | x)) {} but not for if (0 == (-5 | x)) {} This patch changes the analysis to not look at the AST node directly to see if it is an IntegerLiteral, but instead attempts to evaluate the expression to see if it is an integer constant expression. This handles unary negation signs, but also handles all the other possible operators as well. Fixes #42918 Differential Revision: https://reviews.llvm.org/D130510 -
Dmitry Preobrazhensky authored
Summary of changes: - Update FLAT LDS syntax (see https://reviews.llvm.org/D125126)
-
Dmitry Preobrazhensky authored
Correct validator to enable MIMG dst size checks. Differential Revision: https://reviews.llvm.org/D130512
-
Adrian Kuegel authored
This change adds convenience getters to builders. Differential Revision: https://reviews.llvm.org/D130696
-
Sanjay Patel authored
This works with any logic + extend: https://alive2.llvm.org/ce/z/vzsqQD The motivating case is from issue #56294, but that's still not optimal (it should simplify completely).
-
Sanjay Patel authored
-
Dmitry Preobrazhensky authored
Differential Revision: https://reviews.llvm.org/D130634
-
Nico Weber authored
-
chendewen authored
This patch adds a cost estimate for some missing sign extensions. ref: https://reviews.llvm.org/D14730 Reviewed By: dmgreen Differential Revision: https://reviews.llvm.org/D130565
-
Kirill Okhotnikov authored
Added a function and test, which can be used later for cosh/sinh and possibly for expf/expm1f. Differential Revision: https://reviews.llvm.org/D129215
-
Konstantin Varlamov authored
Avoid relying on `iterator_traits` and instead deduce the return type of dereferencing the iterator. Additionally, add a static check to reject iterators with incorrect `iterator_traits` at compile time. Differential Revision: https://reviews.llvm.org/D130538
-
Florian Hahn authored
At the moment, proveNoUnsignedWrapViaInduction may be called for the same AddRec a large number of times via getZeroExtendExpr. This can have a severe compile-time impact for very loop-heavy code. One one particular workload, LSR takes ~51s without this patch, almost exlusively in proveNoUnsignedWrapViaInduction. With this patch, the time in LSR drops to ~0.4s. If proveNoUnsignedWrapViaInduction failed to prove NUW the first time, it is unlikely to succeed on subsequent tries and the cost doesn't seem to be justified. Besides drastically improving compile-time in some excessive cases, this also has a slightly positive compile-time impact on CTMark: NewPM-O3: -0.07% NewPM-ReleaseThinLTO: -0.08% NewPM-ReleaseLTO-g: -0.06 https://llvm-compile-time-tracker.com/compare.php?from=b435da027d7774c24cdb8c88d09f6b771e07fb14&to=f2729e33e8284b502f6c35a43345272252f35d12&stat=instructions Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D130648
-
Haojian Wu authored
The solution is to favor the longest possible nest-name-specifier, and drop other alternatives by using the guard, per per C++ [basic.lookup.qual.general]. Motivated cases: ``` Foo::Foo() {}; // the constructor can be parsed as: // - Foo ::Foo(); // where the first Foo is return-type, and ::Foo is the function declarator // + Foo::Foo(); // where Foo::Foo is the function declarator ``` ``` void test() { // a very slow parsing case when there are many qualifers! X::Y::Z; // The statement can be parsed as: // - X ::Y::Z; // ::Y::Z is the declarator // - X::Y ::Z; // ::Z is the declarator // + X::Y::Z; // a declaration without declarator (X::Y::Z is decl-specifier-seq) // + X::Y::Z; // a qualifed-id expression } ``` Differential Revision: https://reviews.llvm.org/D130511 -
Martin Storsjö authored
[clang-tidy] Add CLANG_TIDY_CONFUSABLE_CHARS_GEN cmake cache variable to avoid building when cross compiling This is similar to the LLVM_TABLEGEN, CLANG_TABLEGEN and CLANG_PSEUDO_GEN cmake cache variables. Differential Revision: https://reviews.llvm.org/D129799
-
Martin Storsjö authored
Rename it to clang-tidy-confusable-chars-gen, to make its role clearer in a wider context. In cross builds, the caller might want to provide this tool externally (to avoid needing to rebuild it in the cross build). In such a case, having the tool properly namespaced makes its role clearer. This matches how the clang-pseudo-gen tool was renamed in a43fef05 / D126725. Differential Revision: https://reviews.llvm.org/D129798
-
Alexander Belyaev authored
Differential Revision: https://reviews.llvm.org/D130632
-
Kirill Okhotnikov authored
New exp2 function algorithm: 1) Improved performance: 8.176 vs 15.270 by core-math perf tool. 2) Improved accuracy. Only two special values left. 3) Lookup table size reduced twice. Differential Revision: https://reviews.llvm.org/D129005
-
David Spickett authored
DebugLocEntry assumes that it either contains 1 item that has no fragment or many items that all have fragments (see the assert in addValues). When EXPENSIVE_CHECKS is enabled, _GLIBCXX_DEBUG is defined. On a few machines I've checked, this causes std::sort to call the comparator even if there is only 1 item to sort. Perhaps to check that it is implemented properly ordering wise, I didn't find out exactly why. operator< for a DbgValueLoc will crash if this happens because the optional Fragment is empty. Compiler/linker/optimisation level seems to make this happen or not. So I've seen this happen on x86 Ubuntu but the buildbot for release EXPENSIVE_CHECKS did not have this issue. Add an explicit check whether we have 1 item. Reviewed By: aprantl Differential Revision: https://reviews.llvm.org/D130156
-
Daniel Bertalan authored
This hint instructs the linker to optimize an adrp+add+ldr sequence used for loading from a local symbol's address by loading directly if it's close enough, or with an adrp(p)+ldr sequence if it's not. This transformation is the same as what's done for ADRP_LDR_GOT_LDR when the symbol is local. The logic for acting on this hint is therefore moved to a new function which will be called from the existing applyAdrpLdrGotLdr() function. Differential Revision: https://reviews.llvm.org/D130505
-