1. Jun 10, 2020
    • Sam McCall's avatar
      [clangd] Disable new errs()-tie behavior, it's racy. · 4e3a44d4
      Sam McCall authored
      Reviewers: hokein
      
      Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D81538
      4e3a44d4
    • Frederik Gossen's avatar
      [MLIR][Standard] Make the `dim` operation index an operand. · 904f91db
      Frederik Gossen authored
      Allow for dynamic indices in the `dim` operation.
      Rather than an attribute, the index is now an operand of type `index`.
      This allows to apply the operation to dynamically ranked tensors.
      The correct lowering of dynamic indices remains to be implemented.
      
      Differential Revision: https://reviews.llvm.org/D81551
      904f91db
    • Louis Dionne's avatar
      [libc++] Install locales in the build bot Docker images · 756db308
      Louis Dionne authored
      This allows running the locale tests on the build bots.
      756db308
    • Mikhail Maltsev's avatar
      [libcxx] Fix std::vector construct_iter_iter.pass.cpp test (C++98/03) · 4e94bdce
      Mikhail Maltsev authored
      The test is failing on 32-bit targets in C++03 mode. Clang produces
      the following warning: 'integer literal is too large to be represented
      in type 'long' and is subject to undefined behavior under C++98,
      interpreting as 'unsigned long'; this literal will have type 'long
      long' in C++11 onwards [-Wc++11-compat]' which is promoted to an error
      and causes the test to fail.
      
      There have been no changes in the test itself since 2019, so it looks
      like the diagnostic has been updated.
      
      Differential Revision: https://reviews.llvm.org/D81559
      4e94bdce
    • Kuter Dinel's avatar
      Reland: [Attributor] Split the Attributor::run() into multiple functions. · 70330edc
      Kuter Dinel authored
      Summary:
      This patch splits the Attributor::run() function into multiple
      functions.
      
      Simple Logic changes to make this possible:
        # Moved iteration count verification earlier.
        # NumFinalAAs get set a little bit later.
      
      Reviewers: jdoerfert, sstefan1, uenoku
      
      Reviewed By: jdoerfert
      
      Subscribers: hiraditya, uenoku, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D81022
      70330edc
    • Peter Smith's avatar
      [ELF][AArch64] Correct relocation codes for R_<CLS>_PLT32 · 60f5b0ec
      Peter Smith authored
      The relocation codes for R_<CLS>_PLT32 are incorrectly in the dynamic
      relocation range that starts at 1024 for AArch64 and 180 for AArch64_32.
      
      Correct these so that they start at the next available static relocation
      code in the non-TLS range. The R_<CLS>_PLT32 description is currently in
      unpublished so this change corrects LLVM to match the values that will
      appear in the final ELF for the 64-bit Arm Architecture document.
      
      Differential Revision: https://reviews.llvm.org/D81410
      60f5b0ec
    • Pavel Labath's avatar
      [lldb/Utility] Remove m_ieee_quad from Scalar · 040eca77
      Pavel Labath authored
      This field is unused (the only way to change its value is via a
      constructor which is never called), and as far as I can tell it has been
      unused since it was introduced in D12100. It also has some soundness
      issues -- e.g.  operator= does not reinitialize it, but uses the old
      value from the overwritten object.
      
      It sounds like this class should be able to support different floating
      point semantics, but if that is needed, it would be better to start
      afresh -- probably by passing in an APFloat::fltSemantics object instead
      of a bool flag.
      040eca77
    • Ronald Wampler's avatar
      Create a warning flag for 'warn_conv_*_not_used' · ae451454
      Ronald Wampler authored
      These warnings are grouped under '-Wclass-conversion' to be compatiable with GCC 9.
      
      Differential Revision: https://reviews.llvm.org/D78442
      ae451454
    • Marco Elver's avatar
      [KernelAddressSanitizer] Make globals constructors compatible with kernel [v2] · d3f89314
      Marco Elver authored
      [ v1 was reverted by c6ec352a due to
        modpost failing; v2 fixes this. More info:
        https://github.com/ClangBuiltLinux/linux/issues/1045#issuecomment-640381783 ]
      
      This makes -fsanitize=kernel-address emit the correct globals
      constructors for the kernel. We had to do the following:
      
      * Disable generation of constructors that rely on linker features such
        as dead-global elimination.
      
      * Only instrument globals *not* in explicit sections. The kernel uses
        sections for special globals, which we should not touch.
      
      * Do not instrument globals that are prefixed with "__" nor that are
        aliased by a symbol that is prefixed with "__". For example, modpost
        relies on specially named aliases to find globals and checks their
        contents. Unfortunately modpost relies on size stored as ELF debug info
        and any padding of globals currently causes the debug info to cause size
        reported to be *with* redzone which throws modpost off.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=203493
      
      Tested:
      * With 'clang/test/CodeGen/asan-globals.cpp'.
      
      * With test_kasan.ko, we can see:
      
        	BUG: KASAN: global-out-of-bounds in kasan_global_oob+0xb3/0xba [test_kasan]
      
      * allyesconfig, allmodconfig (x86_64)
      
      Reviewed By: glider
      
      Tags: #clang, #llvm
      
      Differential Revision: https://reviews.llvm.org/D81390
      d3f89314
    • gbreynoo's avatar
      [lld][test] Expand testing for dynamic-list and export-dynamic · be44b792
      gbreynoo authored
      - Expanded testing for --dynamic-list and --export-dynamic
      - Fixed invalid-dynamic-list.test
      
      Differential Revision: https://reviews.llvm.org/D80311
      be44b792
    • Sander de Smalen's avatar
      [AArch64][SVE] Change pointer type of struct load/store intrinsics. · a0e3ceea
      Sander de Smalen authored
      Instead of loading from e.g. `<vscale x 16 x i8>*`, load from element
      pointer `i8*`. This is more in line with the other load/store
      intrinsics for SVE.
      
      Reviewers: fpetrogalli, c-rhodes, rengolin, efriedma
      
      Reviewed By: efriedma
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D81458
      a0e3ceea
    • Louis Dionne's avatar
    • Pavel Labath's avatar
      [lldb/Makefile.rules] Apply CFLAGS_EXTRAS after debug-info mode flags · 539b47c9
      Pavel Labath authored
      This makes it possible to conditionally override some of these flags via
      CFLAGS_EXTRAS. It should be NFC right now, but this seems the logical
      order in which to apply these things, and I am going to make use of this
      in another patch.
      539b47c9
    • Georgii Rymar's avatar
      [yaml2obj] - Introduce a 10 Mb limit of the output by default and a --max-size option. · 3c123acf
      Georgii Rymar authored
      Multiple times we faced an issue of huge outputs due to unexpected behavior
      or incorrect test cases. The last one was https://reviews.llvm.org/D80629#2073066.
      
      This patch limits the output to 10 Mb for ELF and introduces the --max-size to change this
      limit.
      
      I've tried to keep the implementation non-intrusive.
      
      The current logic we have is that we prepare section content in a buffer first and write
      it to the output later. This patch checks the available limit on each writing attempt to this buffer
      and stops writing when the limit is reached and raises the internal error flag.
      Later, this flag is is checked before the actual writing to a file happens and
      an error is reported.
      
      Differential revision: https://reviews.llvm.org/D81258
      3c123acf
    • Louis Dionne's avatar
      [libc++] Define the no-exceptions Lit feature using the DSL · 01a0c3b4
      Louis Dionne authored
      Instead of using logic in config.py, use the DSL to grab the no-exceptions
      user-configurable parameter from the Lit command-line invocation.
      01a0c3b4
    • Louis Dionne's avatar
      [libc++] Allow picking Lit parameters from the config · 78e266ef
      Louis Dionne authored
      Unlike parameters in litConfig.params, the config isn't shared across
      all test suites. For example, if we want to enable exceptions in the
      tests for libcxxabi, but not in the tests for libcxx, we can't set the
      enable_exceptions parameter in the litConfig object, cause it will be
      used by both. Instead, setting it inside the config object solves that
      problem.
      78e266ef
    • Frederik Gossen's avatar
      [MLIR][Shape] Make dimension an operand of `get_extent` · e4184c84
      Frederik Gossen authored
      The operation `get_extent` now accepts the dimension as an operand and is no
      longer limited to constant dimensions.
      A helper function facilitates the common constant use case.
      
      Differential Revision: https://reviews.llvm.org/D81248
      e4184c84
    • Endre Fülöp's avatar
      [analyzer] On-demand parsing capability for CTU · 97e07d0c
      Endre Fülöp authored
      Summary:
      Introduce on-demand parsing of needed ASTs during CTU analysis.
      The index-file format is extended, and analyzer-option CTUInvocationList
      is added to specify the exact invocations needed to parse the needed
      source-files.
      
      Reviewers: martong, balazske, Szelethus, xazax.hun, whisperity
      
      Reviewed By: martong, xazax.hun
      
      Subscribers: gribozavr2, thakis, ASDenysPetrov, ormris, mgorny, whisperity, xazax.hun, baloghadamsoftware, szepet, rnkovacs, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, Charusso, steakhal, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D75665
      97e07d0c
    • Sergej Jaskiewicz's avatar
      [compiler-rt] [test] Fix NameError when loading lit.cfg.py for crt · c148e15c
      Sergej Jaskiewicz authored
      Summary:
      The `execute_external` global variable is defined in [`lit.common.cfg.py`](https://github.com/llvm/llvm-project/blob/fcfb3170a776f89dde4de8ee105c99e10660f455/compiler-rt/test/lit.common.cfg.py#L18-L27) and used here (on lines 23 and 39). However, this variable is not visible in configs that are loaded independently.
      
      Explicitly assign it to the correct value to avoid `NameError`.
      
      Reviewers: compnerd, phosek
      
      Reviewed By: compnerd, phosek
      
      Subscribers: dberris, #sanitizers
      
      Tags: #sanitizers
      
      Differential Revision: https://reviews.llvm.org/D79892
      c148e15c
    • Vitaly Buka's avatar
      [asan] Suppress lint warning in tests · b040e226
      Vitaly Buka authored
      b040e226
    • Raphael Isemann's avatar
    • Kazushi (Jam) Marukawa's avatar
      [VE] Support convert instructions in MC layer · 34fef0c9
      Kazushi (Jam) Marukawa authored
      Summary:
      Add CVTSQ/CVTDQ/CVTQD/CVTQS instructions.  Add regression tests for
      them and other convert instructions of asmparser, mccodeemitter, and
      disassembler.  In order to add those instructions, support RD operands
      in asmparser, mccodeemitter, and disassembler.
      
      Differential Revision: https://reviews.llvm.org/D81536
      34fef0c9
    • David Green's avatar
    • sstefan1's avatar
      3013f2d3
    • stefan's avatar
      [Attributor] Split the Attributor::run() into multiple functions. · 0ee47cc9
      stefan authored
      Summary:
      This patch splits the Attributor::run() function into multiple functions.
      
      Simple Logic changes to make this possible:
        # Moved iteration count verification earlier.
        # NumFinalAAs get set a little bit later.
      
      Reviewers: jdoerfert, sstefan1, uenoku
      
      Reviewed By: jdoerfert
      
      Subscribers: hiraditya, uenoku, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D81022
      0ee47cc9
    • Vitaly Buka's avatar
      [StackSafety] Add info into function summary · 4666953c
      Vitaly Buka authored
      Summary:
      This patch adds optional field into function summary,
      implements asm and bitcode serialization. YAML
      serialization is omitted and can be added later if
      needed.
      
      This patch includes this information into summary only
      if module contains at least one sanitize_memtag function.
      In a near future MTE is the user of the analysis.
      Later if needed we can provede more direct control
      on when information is included into summary.
      
      Reviewers: eugenis
      
      Subscribers: hiraditya, steven_wu, dexonsmith, arphaman, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D80908
      4666953c
    • Paul Walker's avatar
      [FileCheck] Add function call support to numerical expressions. · 8fd22703
      Paul Walker authored
      This patch extends numerical expressions to allow calls to
      predefined functions. These calls can be combined with the
      existing numerical operators, which includes nesting calls.
      
      The call syntax is:
      
        <func>(<args>)
      
      Where <func> is a predefined string literal, currently limited to
      one of add, max, min and sub. <arg> is a comma seperated list of
      numerical expressions.
      
      Subscribers: arichardson, hiraditya, thopre, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D79936
      8fd22703
    • Sam McCall's avatar
      [clangd] Log rather than assert on bad UTF-8. · f2c8f6e1
      Sam McCall authored
      Summary:
      I don't love this behavior, but it prevents crashing when indexing boost
      headers, and I can't think of a better practical alternative.
      
      Fixes https://reviews.llvm.org/D81530
      
      Based on a patch by AnakinZheng!
      
      Reviewers: kadircet
      
      Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits, AnakinZheng
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D81530
      f2c8f6e1
    • Florian Hahn's avatar
      [DSE,MSSA] Relax post-dom restriction for objs visible after return. · 67671024
      Florian Hahn authored
      This patch relaxes the post-dominance requirement for accesses to
      objects visible after the function returns.
      
      Instead of requiring the killing def to post-dominate the access to
      eliminate, the set of 'killing blocks' (= blocks that completely
      overwrite the original access) is collected.
      
      If all paths from the access to eliminate and an exit block go through a
      killing block, the access can be removed.
      
      To check this property, we first get the common post-dominator block for
      the killing blocks. If this block does not post-dominate the access
      block, there may be a path from DomAccess to an exit block not involving
      any killing block.
      
      Otherwise we have to check if there is a path from the DomAccess to the
      common post-dominator, that does not contain a killing block. If there
      is no such path, we can remove DomAccess. For this check, we start at
      the common post-dominator and then traverse the CFG backwards. Paths are
      terminated when we hit a killing block or a block that is not executed
      between DomAccess and a killing block according to the post-order
      numbering (if the post order number of a block is greater than the one
      of DomAccess, the block cannot be in in a path starting at DomAccess).
      
      This gives the following improvements on the total number of stores
      after DSE for MultiSource, SPEC2K, SPEC2006:
      
      Tests: 237
      Same hash: 206 (filtered out)
      Remaining: 31
      Metric: dse.NumRemainingStores
      
      Program                                        base      new100    diff
       test-suite...CFP2000/188.ammp/188.ammp.test   3624.00   3544.00   -2.2%
       test-suite...ch/g721/g721encode/encode.test   128.00    126.00    -1.6%
       test-suite.../Benchmarks/Olden/mst/mst.test    73.00     72.00    -1.4%
       test-suite...CFP2006/433.milc/433.milc.test   3202.00   3163.00   -1.2%
       test-suite...000/186.crafty/186.crafty.test   5062.00   5010.00   -1.0%
       test-suite...-typeset/consumer-typeset.test   40460.00  40248.00  -0.5%
       test-suite...Source/Benchmarks/sim/sim.test   642.00    639.00    -0.5%
       test-suite...nchmarks/McCat/09-vor/vor.test   642.00    644.00     0.3%
       test-suite...lications/sqlite3/sqlite3.test   35664.00  35563.00  -0.3%
       test-suite...T2000/300.twolf/300.twolf.test   7202.00   7184.00   -0.2%
       test-suite...lications/ClamAV/clamscan.test   19475.00  19444.00  -0.2%
       test-suite...INT2000/164.gzip/164.gzip.test   2199.00   2196.00   -0.1%
       test-suite...peg2/mpeg2dec/mpeg2decode.test   2380.00   2378.00   -0.1%
       test-suite.../Benchmarks/Bullet/bullet.test   39335.00  39309.00  -0.1%
       test-suite...:: External/Povray/povray.test   36951.00  36927.00  -0.1%
       test-suite...marks/7zip/7zip-benchmark.test   67396.00  67356.00  -0.1%
       test-suite...6/464.h264ref/464.h264ref.test   31497.00  31481.00  -0.1%
       test-suite...006/453.povray/453.povray.test   51441.00  51416.00  -0.0%
       test-suite...T2006/401.bzip2/401.bzip2.test   4450.00   4448.00   -0.0%
       test-suite...Applications/kimwitu++/kc.test   23481.00  23471.00  -0.0%
       test-suite...chmarks/MallocBench/gs/gs.test   6286.00   6284.00   -0.0%
       test-suite.../CINT2000/254.gap/254.gap.test   13719.00  13715.00  -0.0%
       test-suite.../Applications/SPASS/SPASS.test   30345.00  30338.00  -0.0%
       test-suite...006/450.soplex/450.soplex.test   15018.00  15016.00  -0.0%
       test-suite...ications/JM/lencod/lencod.test   27780.00  27777.00  -0.0%
       test-suite.../CINT2006/403.gcc/403.gcc.test   105285.00 105276.00 -0.0%
      
      There might be potential to pre-compute some of the information of which
      blocks are on the path to an exit for each block, but the overall
      benefit might be comparatively small.
      
      On the set of benchmarks, 15738 times out of 20322 we reach the
      CFG check, the CFG check is successful. The total number of iterations
      in the CFG check is 187810, so on average we need less than 10 steps in
      the check loop. Bumping the threshold in the loop from 50 to 150 gives a
      few small improvements, but I don't think they warrant such a big bump
      at the moment. This is all pending further tuning in the future.
      
      Reviewers: dmgreen, bryant, asbirlea, Tyker, efriedma, george.burgess.iv
      
      Reviewed By: george.burgess.iv
      
      Differential Revision: https://reviews.llvm.org/D78932
      67671024
    • Vitaly Buka's avatar
      Revert "[InstrProfiling] Use !associated metadata for counters, data and values" · 5a3b380f
      Vitaly Buka authored
      This reverts commit 69c5ff46.
      This reverts commit 603d58b5.
      This reverts commit ba10bedf.
      This reverts commit 39b3c41b.
      5a3b380f
    • Endre Fülöp's avatar
      Revert "[analyzer] On-demand parsing capability for CTU" · c6407794
      Endre Fülöp authored
      This reverts commit 020815fa.
      Reason: PS4 buildbot broke
      c6407794
    • Alex Bradbury's avatar
      [RISCV] Make visibility of overridden methods in RISCVISelLowering match the parent · d9bc8bd5
      Alex Bradbury authored
      Currently, some fairly arbitrary subset of overriden methods in
      RISCVISelLowering are private rather than public (which is the
      visibility they have in TargetLowering). I suspect this is a holdover
      from too closely copying another backend.
      
      D78545 pointed out this can be difficult for some downstream patches,
      and nobody has come forward to suggest a reason for keeping the
      visibility as-is.
      
      This commit simply makes all overridden methods match the public
      visiblity of the parent.
      
      Differential Revision: https://reviews.llvm.org/D79928
      d9bc8bd5
    • Sam Parker's avatar
      [CostModel] Unify Shuffle and InsertElement Costs · 09d30cb9
      Sam Parker authored
      Extract the existing code from getInstructionThroughput into
      TTImpl::getUserCost. The duplicated code in the AMDGPU backend has
      also been removed.
      
      Differential Revision: https://reviews.llvm.org/D81448
      09d30cb9
    • Sam Parker's avatar
      [CostModel] Unify getArithmeticInstrCost · fa8bff0c
      Sam Parker authored
      Add the remaining arithmetic opcodes into the generic implementation
      of getUserCost and then call this from getInstructionThroughput. Most
      of the backends have been modified to return the base implementation
      for cost kinds other RecipThroughput. The outlier here is AMDGPU
      which already uses getArithmeticInstrCost for all the cost kinds.
      This change means that most of the opcodes can be removed from that
      backends implementation of getUserCost.
      
      Differential Revision: https://reviews.llvm.org/D80992
      fa8bff0c
    • Kazushi (Jam) Marukawa's avatar
      [VE] Support host memory access instructions in MC layer · 49e4faa0
      Kazushi (Jam) Marukawa authored
      Summary:
      Add LHM/SHM instructions.  Add regression tests for them of asmparser,
      mccodeemitter, and disassembler.  In order to add those instructions,
      add new decode functions to disassembler, and add new print functions
      to instprinter.
      
      Differential Revision: https://reviews.llvm.org/D81535
      49e4faa0
    • Wang, Pengfei's avatar
      [MS] Copy the symbols assigned to the former instruction when memory folding. · 6eb9eae0
      Wang, Pengfei authored
      The memory folding raplaced the old instruction without copying the symbols assigned. Which will resulted in built fail due to the lost symbols.
      
      Reviewed by craig.topper
      
      Differential Revision: https://reviews.llvm.org/D78471
      6eb9eae0
    • Sander de Smalen's avatar
      [SveEmitter] NFC: Add missing ACLE tests · a8fbbf8f
      Sander de Smalen authored
      These ACLE tests were missing in previous patches:
      - D79357: [SveEmitter] Add builtins for svdup and svindex
      - D78747: [SveEmitter] Add builtins for compares and ReverseCompare flag.
      - D76238: [SveEmitter] Implement builtins for contiguous loads/stores
      a8fbbf8f
    • Eli Friedman's avatar
      Revert "[SPARC] Lower fp16 ops to libcalls" · a92dcffc
      Eli Friedman authored
      This reverts commit 28415e58.  It's
      causing buildbot failures. (Probably just need to fix the triple for the
      test, but I'll look more tomorrow.)
      a92dcffc
    • Endre Fülöp's avatar
      [analyzer] On-demand parsing capability for CTU · 020815fa
      Endre Fülöp authored
      Summary:
      Introduce on-demand parsing of needed ASTs during CTU analysis.
      The index-file format is extended, and analyzer-option CTUInvocationList
      is added to specify the exact invocations needed to parse the needed
      source-files.
      
      Reviewers: martong, balazske, Szelethus, xazax.hun, whisperity
      
      Reviewed By: martong, xazax.hun
      
      Subscribers: gribozavr2, thakis, ASDenysPetrov, ormris, mgorny, whisperity, xazax.hun, baloghadamsoftware, szepet, rnkovacs, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, Charusso, steakhal, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D75665
      020815fa
    • LLVM GN Syncbot's avatar
      [gn build] Port 4f03c0b8 · 801d1235
      LLVM GN Syncbot authored
      801d1235