- Feb 12, 2020
-
-
Saar Raz authored
We previously checked the constraints of instantiated function templates even in cases where PartialOverloading was true and not all template arguments have been deduced, which caused crashes in clangd (bug 44714). We now check if all arguments have been deduced before checking constraints in partial overloading scenarios.
-
Ayman Musa authored
[AggressiveInstCombine] Add test with baseline CHECKs for aggressive inst combine for ICmp instruction.
-
Sergej Jaskiewicz authored
Summary: In `std::filesystem::proximate` tests we assume that the current working directory's name is `fs.op.proximate`. This is fine when we're running the tests locally. However, if we're running those tests on a remote machine via SSH, the directory layout may be different. For example, currently we copy each test executable individually into a temporary directory on the target board using SCP, so the assumption about the working directory name doesn't necessarily hold. This patch is the only thing that is necessary for all libc++ tests to pass when run remotely. Reviewers: ldionne, EricWF, mclow.lists Reviewed By: ldionne, EricWF Subscribers: christof, dexonsmith, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D74348
-
Ayman Musa authored
Revert "[AggressiveInstCombine] Add support for ICmp instr that feeds a select intsr's condition operand." This reverts commit cf155150.
-
Ayman Musa authored
-
Lei Zhang authored
Thus far we have been using builtin func op to model SPIR-V functions. It was because builtin func op used to have special treatment in various parts of the core codebase (e.g., pass pipelines, etc.) and it's easy to bootstrap the development of the SPIR-V dialect. But nowadays with general op concepts and region support we don't have such limitations and it's time to tighten the SPIR-V dialect for completeness. This commits introduces a spv.func op to properly model SPIR-V functions. Compared to builtin func op, it can provide the following benefits: * We can control the full op so we can integrate SPIR-V information bits (e.g., function control) in a more integrated way and define our own assembly form and enforcing better verification. * We can have a better dialect and library boundary. At the current moment only functions are modelled with an external op. With this change, all ops modelling SPIR-V concpets will be spv.* ops and registered to the SPIR-V dialect. * We don't need to special-case func op anymore when creating ConversionTarget declaring SPIR-V dialect as legal. This is quite important given we'll see more and more conversions in the future. In the process, bumps a few FuncOp methods to the FunctionLike trait. Differential Revision: https://reviews.llvm.org/D74226
-
Mehdi Amini authored
Differential Revision: https://reviews.llvm.org/D74472
-
Ehud Katz authored
-
Ayman Musa authored
Differential Revision: https://reviews.llvm.org/D72837
-
Simon Pilgrim authored
The isNegatibleForFree/getNegatedExpression methods currently rely on a raw char value to indicate whether a negation is beneficial or not. This patch replaces the char return value with an NegatibleCost enum to more clearly demonstrate what is implied. It also renames isNegatibleForFree to getNegatibleCost to more accurately reflect whats going on. Differential Revision: https://reviews.llvm.org/D74221
-
Balázs Kéri authored
Reviewers: Szelethus Reviewed By: Szelethus Subscribers: xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, donat.nagy, Charusso, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D73359
-
Pavel Labath authored
This is simpler, faster, and sufficient to uniquely idenify a DIE.
-
Ayman Musa authored
Differential Revision: https://reviews.llvm.org/D74476
-
Martin Storsjö authored
-
stozer authored
This patch is a fix following the revert of 72ce7599 (https://reviews.llvm.org/rG72ce759928e6dfee6a9efa310b966c19722352ba) and fixes the failure that it caused. The above patch failed on the Thread Sanitizer buildbot with an out of memory error. After an investigation, the cause was identified as an explosion in debug intrinsics while running the Jump Threading pass on ModuleMap.ll. The above patched prevented debug intrinsics from being dropped when their Basic Block was deleted due to being "empty". In this case, one of the functions in ModuleMap.ll had (after many optimization passes) a very large number of debug intrinsics representing a set of repeatedly inlined variables. Previously the vast majority of these were silently dropped during Jump Threading when their blocks were deleted, but as of the above patch they survived for longer, causing a large increase in the number of debug intrinsics. These intrinsics were then repeatedly cloned by the Jump Threading pass as edges were threaded, multiplying the intrinsic count further. The memory consumed by this process spiralled out of control, crashing the buildbot that uses TSan (which has an estimated 5-10x memory overhead compared to non-sanitized builds). This patch adds RemoveRedundantDbgInstrs to the Jump Threading pass, in order to reduce the number of debug intrinsics down to a manageable amount in cases where many intrinsics for the same variable end up bunched together contiguously, as in this case. Differential Revision: https://reviews.llvm.org/D73054
-
Ehud Katz authored
With the fixed implementation of the "remainder" operation in rG9d0956eb, we can now add support to folding calls to it. Differential Revision: https://reviews.llvm.org/D69777
-
Jay Foad authored
-
James Henderson authored
This reduces the noise caused by adding cases earlier in the sequence. Reviewed by: dblaikie Differential Revision: https://reviews.llvm.org/D74402
-
Djordje Todorovic authored
This reverts commit rG9f6ff07f. Found a test failure on clang-with-thin-lto-ubuntu buildbot.
-
Liad Mordekoviz authored
This allows us better readability and compatibility with what GNU objdump prints. Fixes https://bugs.llvm.org/show_bug.cgi?id=43941 Reviewed by: jhenderson, MaskRay Differential Revision: https://reviews.llvm.org/D72992
-
David Green authored
-
Kadir Cetinkaya authored
-
Raphael Isemann authored
Sema::RequireCompleteTypeImpl is supposed to have an assert that checks that the SourceLocation that is passed in is always valid. It's currently commented out, but as soon as this assert goes active, nearly every LLDB expression will start crashing as we always pass in an invalid SourceLocation from the ASTResultSynthesizer. This patch just passes in the valid SourceLocation of the expression (which is the SourceLocation where the complete type is required) to prevent that from happening.
-
jasonliu authored
Summary: This is trying to implement the functionality proposed in: http://lists.llvm.org/pipermail/cfe-dev/2017-April/053417.html An exception can throw, but no cleanup is going to happen. A module compiled with exceptions on, can catch the exception throws from module compiled with -fignore-exceptions. The use cases for enabling this option are: 1. Performance analysis of EH instrumentation overhead 2. The ability to QA non EH functionality when EH functionality is not available. 3. User of EH enabled headers knows the calls won't throw in their program and wants the performance gain from ignoring EH construct. The implementation tried to accomplish that by removing any landing pad code that might get generated. Reviewed by: aaron.ballman Differential Revision: https://reviews.llvm.org/D72644
-
Florian Hahn authored
This causes a crash for the reproducer below enum { a }; enum b { c, d }; e; static _Bool g(struct f *h, enum b i) { i &&j(); return a; } static k(char h, enum b i) { _Bool l = g(e, i); l; } m(h) { k(h, c); g(h, d); } This reverts commit aadb635e. -
Clement Courbet authored
Summary: Right now the alignment of the lower half of a store is computed as align/2, which fails for unaligned stores (align = 1), and is overly pessimitic for, e.g. a 8 byte store aligned to 4 bytes. Fixes PR44851 Fixes PR44877 Reviewers: gchatelet, spatel, lebedev.ri Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D74311
-
Roman Lebedev authored
Summary: Currently, `SCEVExpander::isHighCostExpansionHelper()` has the following logic: ``` if (auto *UDivExpr = dyn_cast<SCEVUDivExpr>(S)) { // If the divisor is a power of two and the SCEV type fits in a native // integer (and the LHS not expensive), consider the division cheap // irrespective of whether it occurs in the user code since it can be // lowered into a right shift. if (auto *SC = dyn_cast<SCEVConstant>(UDivExpr->getRHS())) if (SC->getAPInt().isPowerOf2()) { if (isHighCostExpansionHelper(UDivExpr->getLHS(), L, At, BudgetRemaining, TTI, Processed)) return true; const DataLayout &DL = L->getHeader()->getParent()->getParent()->getDataLayout(); unsigned Width = cast<IntegerType>(UDivExpr->getType())->getBitWidth(); return DL.isIllegalInteger(Width); } ``` Since this test does not have a datalayout specified, `SCEVExpander::isHighCostExpansionHelper()` says that `[[TMP2:%.*]] = lshr exact i64 [[TMP1]], 5` is high-cost, and didn't perform it. But future patches will change that logic to solely rely on cost-model, without any such datalayout checks, so i think it is best to show that that change is ephemeral, and can already happen without costmodel changes. Reviewers: reames, fhahn, sanjoy, craig.topper, RKSimon Reviewed By: RKSimon Subscribers: javed.absar, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D73717 -
Djordje Todorovic authored
This patch enables the debug entry values feature. - Remove the (CC1) experimental -femit-debug-entry-values option - Enable it for x86, arm and aarch64 targets - Resolve the test failures - Leave the llc experimental option for targets that do not support the CallSiteInfo yet Differential Revision: https://reviews.llvm.org/D73534 -
Mehdi Amini authored
In the previous state, we were relying on forcing the linker to include all libraries in the final binary and the global initializer to self-register every piece of the system. This change help moving away from this model, and allow users to compose pieces more freely. The current change is only "fixing" the dialect registration and avoiding relying on "whole link" for the passes. The translation is still relying on the global registry, and some refactoring is needed to make this all more convenient. Differential Revision: https://reviews.llvm.org/D74461
-
Clement Courbet authored
-
Raphael Isemann authored
Beside these two functions just being wrappers around GetTypeName they are also just a leftover from migrating the CompilerType interface to ConstString.
-
Raphael Isemann authored
-
Marius Brehler authored
* Rename CMake target MLIROptMain to MLIROptLib: The target provides the main library * Rename CMake target MLIRMlirOptLib to MLIRMlirOptMain: The target provides the main() entry function At the moment, the Bazel configuration of TenorFlow maps the target MlirOptLib to "lib/Support/MlirOptMain.cpp" and MlirOptMain to "tools/mlir-opt/mlir-opt.cpp". This is the other way around in the CMake configuration. As discussed in the context of the pull request https://github.com/tensorflow/tensorflow/pull/36301, it seems useful to revise the naming in the MLIR repo. Differential Revision: https://reviews.llvm.org/D73778
-
Ehud Katz authored
Reimplement IEEEFloat::remainder() function. Fix PR3359. Differential Revision: https://reviews.llvm.org/D69776
-
Raphael Isemann authored
CompilerType doesn't implement logic.
-
Georgii Rymar authored
Now with the new functionality that allows creating "defines", it is possible to reduce this test (I tried to find another ones, but seems others were already fixed previously). Differential revision: https://reviews.llvm.org/D74392
-
Nicolai Hähnle authored
Summary: Consider: %r = call i32 @llvm.amdgcn.writelane(i32 0, i32 1, i32 2) This produces a value that is 0 on lane 1, and 2 everywhere else; i.e., it is divergent. Reported-by:
Marek Olsak <Marek.Olsak@amd.com> Reviewers: arsenm, foad, mareko Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, hiraditya, kerbowa, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D74400
-
Nicolai Hähnle authored
Summary: The method attempts to find loads that can be legally clustered by looking for loads consuming the same chain glue token. However, the old code looks at _all_ users of values produced by the chain node -- including uses of the loaded/returned value of volatile loads or atomics. This could lead to circular dependencies which then failed during scheduling. With this change, we filter out users by getResNo, i.e. by which SDValue value they use, to ensure that we only look at users of the chain glue token. This appears to be a rather old bug, which is perhaps surprising. However, the test case is actually quite fragile (i.e., it is hidden by fairly small changes), and the test _must_ use volatile loads for the bug to manifest. Reviewers: arsenm, bogner, craig.topper, foad Subscribers: MatzeB, jvesely, wdng, hiraditya, javed.absar, jfb, kerbowa, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D74253
-