1. Mar 16, 2020
  2. Mar 15, 2020
    • Benjamin Kramer's avatar
      5cc9dea7
    • Benjamin Kramer's avatar
      [AVR] Make helper functions static. NFC. · caef4a81
      Benjamin Kramer authored
      caef4a81
    • Sander de Smalen's avatar
      [Clang][SVE] Parse builtin type string for scalable vectors · 5087ace6
      Sander de Smalen authored
      This patch adds 'q' to mean 'scalable vector' in the builtin
      type string, and for SVE will return the matching builtin
      type as defined in the C/C++ language extensions for SVE.
      
      This patch also adds some scaffolding to generate the arm_sve.h
      header file, and some builtin definitions (+CodeGen) to be able
      to implement some simple masked load intrinsics that use the
      ACLE types, such as:
      
       svint8_t test_svld1_s8(svbool_t pg, const int8_t *base) {
         return svld1_s8(pg, base);
       }
      
      Reviewers: efriedma, rjmccall, rovka, rsandifo-arm, rengolin
      
      Reviewed By: efriedma
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D75298
      5087ace6
    • Sander de Smalen's avatar
      [TypeSize] Allow returning scalable size in implicit conversion to uint64_t · 8105935d
      Sander de Smalen authored
      This patch removes compiler runtime assertions that ensure the implicit
      conversion are only guaranteed to work for fixed-width vectors.
      
      With the assert it would be impossible to get _anything_ to build until
      the
      entire codebase has been upgraded, even when the indiscriminate uses of
      the size as uint64_t would work fine for both scalable and fixed-width
      types.
      
      This issue will need to be addressed differently, with build-time errors
      rather than assertion failures, but that effort falls beyond the scope
      of this patch.
      
      Returning the scalable size and avoiding the assert in getFixedSize()
      is a temporary stop-gap in order to use LLVM for compiling and using
      the SVE ACLE intrinsics.
      
      Reviewers: efriedma, huntergr, rovka, ctetreau, rengolin
      
      Reviewed By: efriedma
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D75297
      8105935d
    • Simon Pilgrim's avatar
      [DAG] MatchRotate - Add funnel shift by variable support · 56418042
      Simon Pilgrim authored
      Followup to D75114, this patch reuses the existing MatchRotate ROTL/ROTR rotation pattern code to also recognize the more general FSHL/FSHR funnel shift patterns when we have variable shift amounts, matched with MatchFunnelPosNeg which acts in an (almost) equivalent manner to MatchRotatePosNeg.
      56418042
    • Florian Hahn's avatar
      [ValueLattice] Add singlecrfromundef lattice value. · 650f363b
      Florian Hahn authored
      This patch adds a new singlecrfromundef lattice value, indicating a
      single element constant range which was merge with undef at some point.
      Merging it with another constant range results in overdefined, as we
      won't be able to replace all users with a single value.
      
      This patch uses a ConstantRange instead of a Constant*, because regular
      integer constants are represented as single element constant ranges as
      well and this allows the existing code working without additional
      changes.
      
      Reviewers: efriedma, nikic, reames, davide
      
      Reviewed By: efriedma
      
      Differential Revision: https://reviews.llvm.org/D75845
      650f363b
    • River Riddle's avatar
      [mlir] Add support for generating dialect declarations via tablegen. · 429d792f
      River Riddle authored
      Summary: This generates the class declarations for dialects using the existing 'Dialect' tablegen classes.
      
      Differential Revision: https://reviews.llvm.org/D76185
      429d792f
    • Juneyoung Lee's avatar
      27f30392
    • Juneyoung Lee's avatar
      [CodeGenPrepare] Freeze condition when transforming select to br · 10aa7ea9
      Juneyoung Lee authored
      Summary:
      This is a simple fix for CodeGenPrepare that freezes branch condition when transforming select to branch.
      If it is not freezed, instsimplify or the later pipeline can potentially exploit undefined behavior.
      
      The diff shows optimized form becase D75859 and D76048 already made a few changes to CodeGenPrepare for optimizing freeze(cmp).
      
      Reviewers: jdoerfert, spatel, lebedev.ri, efriedma
      
      Reviewed By: lebedev.ri
      
      Subscribers: hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D76179
      10aa7ea9
    • Lang Hames's avatar
      [ORC] Remove an undefined static method from LLJIT. · 049bb95c
      Lang Hames authored
      Fixes http://llvm.org/PR44255. Thanks to Raoul Gough for finding the bug!
      049bb95c
    • Lang Hames's avatar
    • Lang Hames's avatar
      [ORC] Print symbol flags and materializer name in ExecutionSession::dump. · 981f017c
      Lang Hames authored
      The extra information can be helpful in diagnosing JIT bugs.
      981f017c
    • Lang Hames's avatar
      [JITLink][MachO] Re-apply b64afadf, MachO linker-private support, with fixes. · 9c9eb60b
      Lang Hames authored
      Global symbols with linker-private prefixes should be resolvable across object
      boundaries, but internal symbols with linker-private prefixes should not.
      9c9eb60b
    • Sriraman Tallam's avatar
      Basic Block Sections Support. · 4dfe92e4
      Sriraman Tallam authored
      This is the first in a series of patches to enable Basic Block Sections
      in LLVM.
      
      We introduce a new compiler option, -fbasicblock-sections=, which places every
      basic block in a unique ELF text section in the object file along with a
      symbol labeling the basic block. The linker can then order the basic block
      sections in any arbitrary sequence which when done correctly can encapsulate
      block layout, function layout and function splitting optimizations. However,
      there are a couple of challenges to be addressed for this to be feasible:
      
      1) The compiler must not allow any implicit fall-through between any two
         adjacent basic blocks as they could be reordered at link time to be
         non-adjacent. In other words, the compiler must make a fall-through
         between adjacent basic blocks explicit by retaining the direct jump
         instruction that jumps to the next basic block. These branches can only
         be removed later by the linker after the blocks have been reordered.
      2) All inter-basic block branch targets would now need to be resolved by
         the linker as they cannot be calculated during compile time. This is
         done using static relocations which bloats the size of the object files.
         Further, the compiler tries to use short branch instructions on some ISAs
         for branch offsets that can be accommodated in one byte. This is not
         possible with basic block sections as the offset is not determined at
         compile time, and long branch instructions have to be used everywhere.
      3) Each additional section bloats object file sizes by tens of bytes. The
         number of basic blocks can be potentially very large compared to the
         size of functions and can bloat object sizes significantly. Option
         fbasicblock-sections= also takes a file path which can be used to
         specify a subset of basic blocks that needs unique sections to keep
         the bloats small.
      4) Debug Info and CFI need special handling and will be presented as
         separate patches.
      
      Basic Block Labels
      
      With -fbasicblock-sections=labels, or when a basic block is placed in a
      unique section, it is labelled with a symbol. This allows easy mapping of
      virtual addresses from PMU profiles back to the corresponding basic blocks.
      Since the number of basic blocks is large, the labeling bloats the symbol
      table sizes and the string table sizes significantly. While the binary size
      does increase, it does not affect performance as the symbol table is not
      loaded in memory during run-time. The string table size bloat is kept very
      minimal using a unary naming scheme that uses string suffix compression.
      The basic blocks for function foo are named "a.BB.foo", "aa.BB.foo", ...
      This turns out to be very good for string table sizes and the bloat in the
      string table size for a very large binary is ~8 %. The naming also allows
      using the --symbol-ordering-file option in LLD to arbitrarily reorder the
      sections.
      
      Differential Revision: https://reviews.llvm.org/D68063
      4dfe92e4
    • Sriraman Tallam's avatar
      Test commit. · 2efeff6a
      Sriraman Tallam authored
      2efeff6a
    • Lang Hames's avatar
      Revert "[JITLink][MachO] Treat linker private symbols as hidden rather than private." · a7d187d9
      Lang Hames authored
      This reverts commit b64afadf.
      
      Reverting while I investigate bot failures.
      a7d187d9
    • Craig Topper's avatar
      [X86] Add avx512f only command lines to the vector add/sub saturation tests. NFC · 1ffc5074
      Craig Topper authored
      Gives us coverage of splitting the v32i16/v64i8 when we have
      avx512f and not avx512bw.
      
      Considering making v32i16/v64i8 a legal type on avx512f which
      needs this test coverage.
      1ffc5074
    • Lang Hames's avatar
      [JITLink][MachO] Treat linker private symbols as hidden rather than private. · b64afadf
      Lang Hames authored
      Linker-private symbols should be resolvable across object file boundaries.
      b64afadf