- Mar 11, 2021
-
-
Nikita Popov authored
If we encounter a degenerate select node where both operands are the same, then we can continue negating the condition while swapping operands, resulting in an infinite loop. Avoid this by bailing out if both operands are the same. Fixes https://bugs.llvm.org/show_bug.cgi?id=49509. Differential Revision: https://reviews.llvm.org/D98340
-
Martin Storsjö authored
When building builtins, the toolchain might not yet be at a stage when linking a test application works yet, as builtins aren't available. Therefore set CMAKE_TRY_COMPILE_TARGET_TYPE to STATIC_LIBRARY, to avoid failing the compiler sanity check. Setting CMAKE_TRY_COMPILE_TARGET_TYPE to STATIC_LIBRARY has the risk of making checks for library availability succeed falsely (e.g. indicating that libs would be available that really aren't, as the tests don't do any linking), but the builtins library doesn't try to link against any external libraries (and only produces static libraries anyway), so it should be safe here. This avoids having to set CMAKE_C_COMPILER_WORKS when bootstrapping a cross toolchain, when building the builtins. Differential Revision: https://reviews.llvm.org/D91334
-
Simon Pilgrim authored
Revert rGcd938ab162b0ac560dd0e9fee290980c7e0e47e5 "[X86] canonicalizeShuffleWithBinOps - add X86ISD::PSHUFB handling." Investigating an issue reported by @bkramer, possibly when the PSHUFB mask generates zero elements.
-
Arnamoy Bhattacharyya authored
-
Kadir Cetinkaya authored
-
Kadir Cetinkaya authored
This enables unifying command line flags with config options in clangd internals. This patch changes behaviour in 2 places: - BackgroundIndex was previously disabled when -remote-index was provided. After this patch, it will be enabled but all files will have bkgindex policy set to Skip. - -index-file was loaded at startup (at least load was initiated), now the load will happen through ProjectAwareIndex with first index query. Unfortunately this doesn't simplify any options initially, as - CompileCommandsDir is also used by clangd --check workflow, which doesn't use configs. - EnableBackgroundIndex option controls whether the component will be created at all, which implies creation of extra threads registering a listener for compilation database discoveries. Differential Revision: https://reviews.llvm.org/D98029
-
Kadir Cetinkaya authored
Explicit specifier can only be mentioned on the in-line declaration of a constructor, so don't carry it over to the definition. Differential Revision: https://reviews.llvm.org/D98164
-
Simon Pilgrim authored
Fixes PR49451
-
Tres Popp authored
verifyCompatibleShapes is not transitive. Create an n-ary version and update SameOperandShapes and SameOperandAndResultShapes traits to use it. Differential Revision: https://reviews.llvm.org/D98331
-
Sam McCall authored
Also give CanonicalIncludes a less powerful interface (canonicalizes symbols vs headers separately) so we can cache its results better. Prior to this: - path->uri conversions were not consistently cached, this is particularly cheap when we start from a FileEntry* (which we often can) - only a small fraction of header-to-include calculation was cached This is a significant speedup at least for dynamic indexing of preambles. On my machine, opening XRefs.cpp: ``` PreambleCallback 1.208 -> 1.019 (-15.7%) BuildPreamble 5.538 -> 5.214 (-5.8%) ``` Differential Revision: https://reviews.llvm.org/D98371
-
Serguei Katkov authored
Recently gc.result has been marked with readnone instead of readonly and this opens a door for different optimization to duplicate gc.result. Statepoint lowering is not ready to see several gc.results. The problem appears when there are gc.results with one located in the same basic block and another located in other basic block. In this case we need both export VR and fill local setValue. Note that this case is not sufficient optimization done before CodeGen. It is evident that local gc.result dominates all other gc.results and it is handled by GVN and EarlyCSE. But anyway, even if IR is not optimal Backend should not crash on a valid IR. Reviewers: reames, dantrushin Reviewed By: dantrushin Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D98393
-
Julian Gross authored
Buffer hoisting moves allocs upwards although it has dependency within its nested region. This patch fixes this issue. https://bugs.llvm.org/show_bug.cgi?id=49142 Differential Revision: https://reviews.llvm.org/D98248
-
Simon Pilgrim authored
Fix MSVC "'type cast': conversion from 'unsigned int' to 'const llvm::CallBase *' of greater size" warning. NFCI.
-
Thomas Preud'homme authored
As pointed out by Joel E. Denny in D97845, the OverflowErrorStr variable is misnamed because the error is raised for any parsing error. Note that in FileCheck proper this only happens in case of (under|over)flow because the regex will ensure a number in the correct format is matched. Reviewed By: jdenny Differential Revision: https://reviews.llvm.org/D98342
-
Simon Pilgrim authored
It wasn't taking into account that QueryingAA was a pointer.
-
Simon Pilgrim authored
-
David Spickett authored
This moves code that sets the architecture name and Float ABI into two new functions in ToolChains/Arch/ARM.cpp. Greatly simplifying ComputeLLVMTriple. Some light refactoring in setArchNameInTriple to move local variables closer to their first use. Reviewed By: ostannard Differential Revision: https://reviews.llvm.org/D98253
-
Sven van Haastregt authored
-
Jay Foad authored
Differential Revision: https://reviews.llvm.org/D98356
-
Nikita Popov authored
Relative to the previous implementation, this always uses aliasesUnknownInst() instead of aliasesPointer() to correctly handle atomics. The added test case was previously miscompiled. ----- Even when MemorySSA-based LICM is used, an AST is still populated for scalar promotion. As the AST has quadratic complexity, a lot of time is spent in this step despite the existing access count limit. This patch optimizes the identification of promotable stores. The idea here is pretty simple: We're only interested in must-alias mod sets of loop invariant pointers. As such, only populate the AST with loop-invariant loads and stores (anything else is definitely not promotable) and then discard any sets which alias with any of the remaining, definitely non-promotable accesses. If we promoted something, check whether this has made some other accesses loop invariant and thus possible promotion candidates. This is much faster in practice, because we need to perform AA queries for O(NumPromotable^2 + NumPromotable*NumNonPromotable) instead of O(NumTotal^2), and NumPromotable tends to be small. Additionally, promotable accesses have loop invariant pointers, for which AA is cheaper. This has a signicant positive compile-time impact. We save ~1.8% geomean on CTMark at O3, with 6% on lencod in particular and 25% on individual files. Conceptually, this change is NFC, but may not be so in practice, because the AST is only an approximation, and can produce different results depending on the order in which accesses are added. However, there is at least no impact on the number of promotions (licm.NumPromoted) in test-suite O3 configuration with this change. Differential Revision: https://reviews.llvm.org/D89264
-
Pavel Labath authored
It is superseded by dwarf5-implicit-const.s (added in D98197), which tests it more thoroughly.
-
Augusto Noronha authored
Save and restore previous terminal after setting the terminal for checking if terminal supports colors. The call to "set_curterm" inside the "terminalHasColors" function breaks the EditLine configuration on some Linux distributions, causing certain characters that have functions bound to them to not show up and backspace to stop deleting characters (only visually). This patch ensures that term struct is restored after the routine for cheking if terminal supports colors is done, which fixes the aforementioned issue. Reviewed By: labath Differential Revision: https://reviews.llvm.org/D95230
-
Christian Sigg authored
Clean-up after D98279, remove one call to createConvertGPUKernelToBlobPass(). Depends On D98203 Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D98360
-
Nikita Popov authored
These are incompatible with opaque pointers. This is in preparation of dropping this API on the IRBuilder side as well. Instead explicitly pass the loaded type.
-
Oliver Stannard authored
The paciasp and autiasp instructions are only accepted by recent compilers, but have the same encoding as hint instructions, so we can use the hint menmonic to support older compilers.
-
Djordje Todorovic authored
By using the original-di check with debugify in the combination with the llvm/utils/llvm-original-di-preservation.py it becomes very user friendly tool. An example of the HTML page with the issues related to debug info can be found at [0]. [0] https://djolertrk.github.io/di-checker-html-report-example/ Differential Revision: https://reviews.llvm.org/D82546
-
Frederik Gossen authored
Canonicalize `is_broadcastable` to constant true if fewer than 2 unique shape operands. Eliminate redundant operands, otherwise. Differential Revision: https://reviews.llvm.org/D98361
-
Christian Sigg authored
If MLIR_CUDA_RUNNER_ENABLED, register a 'gpu-to-cubin' conversion pass to mlir-opt. The next step is to switch CUDA integration tests from mlir-cuda-runner to mlir-opt + mlir-cpu-runner and remove mlir-cuda-runner. Depends On D98279 Reviewed By: herhut, rriddle, mehdi_amini Differential Revision: https://reviews.llvm.org/D98203
-
David Blaikie authored
For locally scoped lambdas like this there's no particular benefit to explicitly listing captures - or avoiding capturing this. Switch to [&] and make it all easier to maintain. (& driveby change std::function to llvm::function_ref)
-
Olivier Goffart authored
Commit 1b04bdc2 added support for capturing the 'this' pointer in a SEH context (__finally or __except), But the case in which the 'this' pointer is part of a lambda capture was not handled properly Differential Revision: https://reviews.llvm.org/D97687
-
Fangrui Song authored
This avoids the `__NR_gettimeofday` syscall number, which does not exist on 32-bit musl (it has `__NR_gettimeofday_time32`). This switched Android to `clock_gettime` as well, which should work according to the old code before D96925. Tested on Alpine Linux x86-64 (musl) and FreeBSD x86-64. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D98121
-
Petr Hosek authored
This is no longer needed, we can add __llvm_profile_runtime directly to llvm.compiler.used or llvm.used to achieve the same effect. Differential Revision: https://reviews.llvm.org/D98325
-
Fangrui Song authored
All check-tsan tests fail on aarch64-*-linux because HeapMemEnd() > ShadowBeg() for the following code path: ``` #if defined(__aarch64__) && !HAS_48_BIT_ADDRESS_SPACE ProtectRange(HeapMemEnd(), ShadowBeg()); ``` Restore the behavior before D86377 for aarch64-*-linux.
-
Leonard Chan authored
This makes all the license filenames uniform across subprojects. Differential Revision: https://reviews.llvm.org/D98380
-
Craig Topper authored
The vXi64 test cases no longer crash on rv32.
-
Matthias Springer authored
This test operates on two hardware-vector-sized vectors and utilizes vp2intersect and mask.compress. PHAB_REVIEW=D98099
-
Craig Topper authored
This errors, but doesn't give source location. We'd need to pass the Record through several layers to get to the location. Reviewed By: jrtc27 Differential Revision: https://reviews.llvm.org/D98379
-
Craig Topper authored
I think we were missing some build_vector or other support and skipped these test cases. They work now but don't generate optimal code.
-
David Blaikie authored
Accidental commit. This reverts commit 60238f29.
-
David Blaikie authored
-