- May 13, 2020
-
-
Craig Topper authored
Avoids crash when using i128. Gives better error than 'scalar-to-vector conversion failed' for other types.
-
Eli Friedman authored
It sounds like an interesting idea in theory, but nothing is actually taking advantage of it, and specifying/implementing the edge cases is painful. So just forbid it. Differential Revision: https://reviews.llvm.org/D79814
-
Alina Sbirlea authored
Summary: Analyses that are statefull should not be retrieved through a proxy from an outer IR unit, as these analyses are only invalidated at the end of the inner IR unit manager. This patch disallows getting the outer manager and provides an API to get a cached analysis through the proxy. If the analysis is not stateless, the call to getCachedResult will assert. Reviewers: chandlerc Subscribers: mehdi_amini, eraman, hiraditya, zzheng, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D72893
-
Alina Sbirlea authored
Summary: Update check to include the check for unreachable. Basic blocks ending in unreachable are special cased, as these blocks may be already unswitched. Before this patch this check is only done for the default destination. The condition for the exit cases and the default case must be the same, because we should never leave edges from the switch instruction to a basic block that we are unswitching. In PR45355 we still have a remaining edge (that we're attempting to remove from the DT) because its the default edge to an unreachable-terminated block where we unswitch a case edge to that block. Resolves PR45355. Reviewers: chandlerc Subscribers: hiraditya, uabelho, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D78279
-
Matt Arsenault authored
-
Craig Topper authored
It was previously trying to use the 64-bit class, but 80 isn't evenly divisible by 64 so it will trigger a crash.
-
Craig Topper authored
[X86] Make the if statement structure for inline assembly constraints 'l', 'r', 'q', 'Q', and 'R' the same. These did similar things but had slight differences. For example 'Q' didn't allow f64, but the others did.
-
Pete Steinfeld authored
Summary: Before making this change, whenever I ran "check-flang", I'd get an error message like: llvm-lit: /mnt/c/GitHub/f18/c751/flang/build/bin/../../../llvm/utils/lit/lit/main.py:252: warning: Failed to delete temp directory '/tmp/lit_tmp_gOKUIh' With this change, there's no such message in the output, and the temp directory is successfully removed. Note that my working environment is on Windows 10 running Windows Subsystem for Linux using the Ubuntu app. I'm running Python version 2.7.1. Earlier versions of Python do not contain `shutil`. It may be that this module was available on Windows systems later than other platforms. Upgrading my version of Python made the problem go away I don't believe that timing was a problem since inserting a long delay didn't fix things. So I added some text to the error message recommending that the user upgrade their version of Python if they run into this problem. Reviewers: yln, DavidTruby Subscribers: delcypher, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D79861
-
Erik Pilkington authored
rdar://27527445
-
Eli Friedman authored
Use Align instead of using MaybeAlign; all the operations in question have known alignment. For getSliceAlign() in particular, in the cases where we used to return None, it would be converted back to an Align by IRBuilder, so there's no functional change there. Split off from D77454. Differential Revision: https://reviews.llvm.org/D79205
-
Craig Topper authored
I'm hoping this will restore some compile time lost by D75936 and D75937. Differential Revision: https://reviews.llvm.org/D79813
-
Sylvain Audi authored
In D49466, sys::path::replace_path_prefix was used instead startswith for -f[macro/debug/file]-prefix-map options. However those were reverted later (commit rG3bb24bf25767ef5bbcef958b484e7a06d8689204) due to broken Windows tests. This patch restores those replace_path_prefix calls. It also modifies the prefix matching to be case-insensitive under Windows. Differential Revision : https://reviews.llvm.org/D76869
-
Simon Pilgrim authored
-
Anna Thomas authored
Updated the comments on the code as well to reflect what the preconditions on VFABI::getVectorVariantNames are.
-
Huber, Joseph authored
Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D79359
-
Amy Huang authored
Summary: This implements searching for function symbols and public symbols by address. More specifically, -Implements NativeSession::findSymbolByAddress for function symbols and public symbols. I think data symbols are also searched for, but isn't implemented in this patch. -Adds classes for NativeFunctionSymbol and NativePublicSymbol -Adds a '-use-native-pdb-reader' option to llvm-symbolizer, for testing purposes. Reviewers: rnk, amccarth, labath Subscribers: mgorny, hiraditya, MaskRay, rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D79269
-
Benjamin Kramer authored
Fixes a -Wunused-variable warning in Release builds.
-
Joel E. Denny authored
Sometimes you want to disable a FileCheck directive without removing it entirely, or you want to write comments that mention a directive by name. The `COM:` directive makes it easy to do this. For example, you might have: ``` ; X32: pinsrd_1: ; X32: pinsrd $1, 4(%esp), %xmm0 ; COM: FIXME: X64 isn't working correctly yet for this part of codegen, but ; COM: X64 will have something similar to X32: ; COM: ; COM: X64: pinsrd_1: ; COM: X64: pinsrd $1, %edi, %xmm0 ``` Without this patch, you need to use some combination of rewording and directive syntax mangling to prevent FileCheck from recognizing the commented occurrences of `X32:` and `X64:` above as directives. Moreover, FileCheck diagnostics have been proposed that might complain about the occurrences of `X64` that don't have the trailing `:` because they look like directive typos: <http://lists.llvm.org/pipermail/llvm-dev/2020-April/140610.html> I think dodging all these problems can prove tedious for test authors, and directive syntax mangling already makes the purpose of existing test code unclear. `COM:` can avoid all these problems. This patch also updates the small set of existing tests that define `COM` as a check prefix: - clang/test/CodeGen/default-address-space.c - clang/test/CodeGenOpenCL/addr-space-struct-arg.cl - clang/test/Driver/hip-device-libs.hip - llvm/test/Assembler/drop-debug-info-nonzero-alloca.ll I think lit should support `COM:` as well. Perhaps `clang -verify` should too. Reviewed By: jhenderson, thopre Differential Revision: https://reviews.llvm.org/D79276
-
Reid Kleckner authored
This reverts commit eef95f27. The new assertion about branch propability sums does not hold.
-
Russell Gallop authored
Was failing here: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/32320
-
David Green authored
Under MVE a vdup will always take a gpr register, not a floating point value. During DAG combine we convert the types to a bitcast to an integer in an attempt to fold the bitcast into other instructions. This is OK, but only works inside the same basic block. To do the same trick across a basic block boundary we need to convert the type in codegenprepare, before the splat is sunk into the loop. This adds a convertSplatType function to codegenprepare to do that, putting bitcasts around the splat to force the type to an integer. There is then some adjustment to the code in shouldSinkOperands to handle the extra bitcasts. Differential Revision: https://reviews.llvm.org/D78728
-
Carl Ritson authored
Summary: When removing barrier edges on exports then dependencies need to be propagated. Reviewers: foad Reviewed By: foad Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, kerbowa, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D79855
-
David Green authored
Similar to fmul/fadd, we can sink a splat into a loop containing a fma in order to use more register instruction variants. For that there are also adjustments to the sinking code to handle more than 2 arguments. Differential Revision: https://reviews.llvm.org/D78386
-
Pierre-vh authored
This patch adds a new TTI hook to allow targets to tell LSR that a chain including some instruction is already profitable and should not be optimized. This patch also adds an implementation of this TTI hook for ARM so LSR doesn't optimize chains that include the VCTP intrinsic. Differential Revision: https://reviews.llvm.org/D79418
-
Simon Wallis authored
Summary: In the assembler or inline assembler, attempting to use an invalid fixup type gives a crash with a segmentation fault. __attribute__((naked)) void foo(void) { __asm__("mov r9, :lower16:bar(prel31)"); } This should give a proper error message when building for ARM or Thumb. This brings it in line with AARCH64. This fixes all 8 instances of llvm_unreachable("Unsupported Modifier"); in ARM/MCTargetDesc/ARMELFObjectWriter.cpp. A test is provided for each instance. Reviewers: llvm-commits, MarkMurrayARM Reviewed By: MarkMurrayARM Subscribers: kristof.beyls, hiraditya, danielkiss Tags: #llvm Differential Revision: https://reviews.llvm.org/D79782 Change-Id: I6971ba37f129cc453568fe71514ccb2ac9d16831
-
Sjoerd Meijer authored
This was reverted because of a miscompilation. At closer inspection, the problem was actually visible in a changed llvm regression test too. This one-line follow up fix/recommit will splat the IV, which is what we are trying to avoid if unnecessary in general, if tail-folding is requested even if all users are scalar instructions after vectorisation. Because with tail-folding, the splat IV will be used by the predicate of the masked loads/stores instructions. The previous version omitted this, which caused the miscompilation. The original commit message was: If tail-folding of the scalar remainder loop is applied, the primary induction variable is splat to a vector and used by the masked load/store vector instructions, thus the IV does not remain scalar. Because we now mark that the IV does not remain scalar for these cases, we don't emit the vector IV if it is not used. Thus, the vectoriser produces less dead code. Thanks to Ayal Zaks for the direction how to fix this.
-
Ehud Katz authored
This is a reimplementation of the `orderNodes` function, as the old implementation didn't take into account all cases. Fix PR41509 Differential Revision: https://reviews.llvm.org/D79037
-
Dmitry Preobrazhensky authored
See bug 45830: https://bugs.llvm.org/show_bug.cgi?id=45830 Reviewers: arsenm, rampitec Differential Revision: https://reviews.llvm.org/D79585
-
Martin Storsjö authored
Windows doesn't properly support pass plugins (as a shared library can't have undefined references, which pass plugins assume, being loaded into a host process that contains provides them), thus disable building it and the corresponding test. This matches what was done for the passes unit test in bc8e4421. Differential Revision: https://reviews.llvm.org/D79771
-
Qiu Chaofan authored
A lot of tests under PowerPC are using fast flag, while fast is just alias of 7 fast-math flags. This change makes test points clearer. mc-instrlat.ll and sms-iterator.ll keeps unchanged since they are not testing fast-math behavior. (one for machine combiner crash, one for machine pipeliner bug) Reviewed By: steven.zhang, spatel Differential Revision: https://reviews.llvm.org/D78989
-
Victor Campos authored
Summary: In TableGen's instruction selection table generator, references to register classes were handled by generating a matcher table entry in the form of "EmitStringInteger, MVT::i32, 'RegisterClassID'". This ID is in fact the enum integer value corresponding to the register class. However, both the table generator and the table consumer (SelectionDAGISel) assume that this ID is less than or equal to 127, i.e. at most 7 bits. Values greater than this threshold cause completely wrong behaviours in the instruction selection process. This patch adds a check to determine if the enum integer value is greater than the limit of 127. In finding so, the generator emits an "EmitInteger" instead, which properly supports values with arbitrary sizes. Commit f8d044bb fixed the very same bug for register subindices. The present patch now extends this cover to register classes. Reviewers: rampitec Reviewed By: rampitec Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D79705
-
Simon Atanasyan authored
The problem is found by the D79276 on the following builder: http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/23489
-
Sourabh Singh Tomar authored
This fixes failures on windows bot specifically: http://lab.llvm.org:8011/builders/lld-x86_64-win/builds/445 and http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/ builds/32314 * TEST 'LLVM :: DebugInfo/X86/Fortran-DIModule.ll' FAILED * Script: -- : 'RUN: at line 2'; c:\ps4-buildslave2\lld-x86_64-win\build\bin\llc.exe -mtriple=x86_64-pc-windows-gnu c:\ps4-buildslave2\lld-x86_64-win\llvm-project\llvm\test\DebugInfo\X86\Fortran-DIModule.ll -filetype=obj -o - | c:\ps4-buildslave2\lld-x86_64-win\build\bin\llvm-dwarfdump.exe - | c:\ps4-buildslave2\lld-x86_64-win\build\bin\filecheck.exe c:\ps4-buildslave2\lld-x86_64-win\llvm-project\llvm\test\DebugInfo\X86\Fortran-DIModule.ll -- Exit Code: 1 error: command failed with exit status: 1
-
Sourabh Singh Tomar authored
This patch extends DIModule Debug metadata in LLVM to support Fortran modules. DIModule is extended to contain File and Line fields, these fields will be used by Flang FE to create debug information necessary for representing Fortran modules at IR level. Furthermore DW_TAG_module is also extended to contain these fields. If these fields are missing, debuggers like GDB won't be able to show Fortran modules information correctly. Reviewed By: aprantl Differential Revision: https://reviews.llvm.org/D79484
-
Yevgeny Rouban authored
Hide the method that allows setting probability for particular edge and introduce a public method that sets probabilities for all outgoing edges at once. Setting individual edge probability is error prone. More over it is difficult to check that the total probability is 1.0 because there is no easy way to know when the user finished setting all the probabilities. Reviewers: yamauchi, ebrevnov Tags: #llvm Differential Revision: https://reviews.llvm.org/D79396
-
Qiu Chaofan authored
xsnegdp, xsabsdp and xsnabsdp can be used to operate on f32 operand. This patch adds the missing patterns since we prefer VSX instructions when available. Reviewed By: steven.zhang Differential Revision: https://reviews.llvm.org/D75344
-
Sam Parker authored
Fix the assumption that all bitcasts of the same type sizes are free. We now only assume that bitcasts between ints and ptrs of the same size are free. This allows TTImpl to just call the concrete implementation of getCastInstrCost. Differential Revision: https://reviews.llvm.org/D78918
-
Qiu Chaofan authored
Legalizer should respect both command-line options or SDNode-level fast-math flags. Also, this patch propagates other flags during custom simplifying. Reviewed By: steven.zhang Differential Revision: https://reviews.llvm.org/D79074
-
Kang Zhang authored
Summary: The ppc-early-ret pass use the addReg() to add operand to the new instruction, it can't reserve the flag of old operand. This has caused machine verfications failed. This patch use add() to instead of addReg(). Reviewed By: steven.zhang Differential Revision: https://reviews.llvm.org/D77997
-
Stephen Neuendorffer authored
We need to avoid declaring dependencies on strings which are valid LINK_LIBS and not valid targets. Previously, we used if(TARGET) to check this condition. However, if(TARGET) checks whether a target has been created (in the cmake subdirectory traversal order) and not whether it *will* be created. This results in annoying directory ordering problems. This patch changes the check to more explicitly eliminate problematic libraries (namely -lpthread) using a REGEX. Differential Revision: https://reviews.llvm.org/D79837
-