Skip to content
  1. May 05, 2020
    • Yaxun (Sam) Liu's avatar
      [CUDA][HIP] Fix empty ctor/dtor check for union · d75a6e93
      Yaxun (Sam) Liu authored
      union ctor does not call ctors of its data members. union dtor does not call dtors of its data members.
      Also union does not have base class.
      
      Currently when clang checks whether union has an empty ctor/dtor, it checks the ctors/dtors of its
      data members. This causes incorrectly diagnose device side global variables and shared variables as
      having non-empty ctors/dtors.
      
      This patch fixes that.
      
      Differential Revision: https://reviews.llvm.org/D79367
      d75a6e93
    • Zakk Chen's avatar
      [LTO] Suppress emission of empty combined module by default · ad5fad0a
      Zakk Chen authored
      Summary:
      That unless the user requested an output object (--lto-obj-path), the an
      unused empty combined module is not emitted.
      
      This changed is helpful for some target (ex. RISCV-V) which encoded the
      ABI info in IR module flags (target-abi). Empty unused module has no ABI
      info so the linker would get the linking error during merging
      incompatible ABIs.
      
      Reviewers: tejohnson, espindola, MaskRay
      
      Subscribers: emaste, inglorion, arichardson, hiraditya, simoncook, MaskRay, steven_wu, dexonsmith, PkmX, dang, lenary, s.egerton, luismarques, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D78988
      ad5fad0a
    • Adrian Prantl's avatar
      Clarify comment · 36183811
      Adrian Prantl authored
      36183811
    • Nicolas Vasilache's avatar
      [mlir][EDSC] Fix off-by-one BlockBuilder insertion point. · 036772ac
      Nicolas Vasilache authored
      Summary:
      In the particular case of an insertion in a block without a terminator, the BlockBuilder insertion point should be block->end().
      
      Adding a unit test to exercise this.
      
      Differential Revision: https://reviews.llvm.org/D79363
      036772ac
    • River Riddle's avatar
      [mlir][IR] Add a Region::getOps method that returns a range of immediately nested operations · 1e4faf23
      River Riddle authored
      This allows for walking the operations nested directly within a region, without traversing nested regions.
      
      Differential Revision: https://reviews.llvm.org/D79056
      1e4faf23
    • River Riddle's avatar
      [mlir][mlir-opt] Disable multithreading when parsing the input module. · 6bce7d8d
      River Riddle authored
      This removes the unnecessary/costly context synchronization when parsing, as the context is guaranteed to not be used by any other threads.
      6bce7d8d
    • Reid Kleckner's avatar
      Update LLDB filespec tests for remove_dots change · 58c7bf24
      Reid Kleckner authored
      It looks like the new implementation is correct, since there were TODOs
      here about getting the new behavior.
      
      I am not sure if "C:..\.." should become "C:" or "C:\", though. The new
      output doesn't precisely match the TODO message, but it seems
      appropriate given the specification of remove_dots and how .. traversals
      work at the root directory.
      58c7bf24
    • Lang Hames's avatar
      [ORC] Rename SearchOrder operations on JITDylib to LinkOrder. · c66f8900
      Lang Hames authored
      Refering to the link order of a dylib better matches the terminology used in
      static compilation. As upcoming patches will increase the number of places where
      link order matters (for example when closing JITDylibs) it's better to get this
      name change out of the way early.
      c66f8900
    • Reid Kleckner's avatar
      Re-land "Optimize path::remove_dots" · 75cbf6dc
      Reid Kleckner authored
      This reverts commit fb5fd746.
      Re-instates commit 53913a65
      
      The fix is to trim off trailing separators, as in `/foo/bar/` and
      produce `/foo/bar`. VFS tests rely on this. I added unit tests for
      remove_dots.
      75cbf6dc
    • Reid Kleckner's avatar
      [PDB] Use the global BumpPtrAllocator · 2868ee5b
      Reid Kleckner authored
      Profiling shows that time is spent destroying the allocator member of
      PDBLinker, and that is unneeded.
      2868ee5b
    • Hanhan Wang's avatar
      [mlir][StandardToSPIRV] Emulate bitwidths not supported for store op. · 5d10613b
      Hanhan Wang authored
      Summary:
      As D78974, this patch implements the emulation for store op. The emulation is
      done with atomic operations. E.g., if the storing value is i8, rewrite the
      StoreOp to:
      
       1) load a 32-bit integer
       2) clear 8 bits in the loading value
       3) store 32-bit value back
       4) load a 32-bit integer
       5) modify 8 bits in the loading value
       6) store 32-bit value back
      
      The step 1 to step 3 are done by AtomicAnd as one atomic step, and the step 4
      to step 6 are done by AtomicOr as another atomic step.
      
      Differential Revision: https://reviews.llvm.org/D79272
      5d10613b
    • Haruki Imai's avatar
      [mlir] Support big endian in DenseElementsAttr · 3a7be241
      Haruki Imai authored
      This std::copy_n copies 8 byte data (APInt raw data) by 1 byte from the
      beginning of char array. This is no problem in little endian, but the
      data is not copied correctly in big endian because the data should be
      copied from the end of the char array.
      
      - Example of 4 byte data (such as float32)
      
      Little endian (First 4 bytes):
      Address | 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08
      Data    | 0xcd 0xcc 0x8c 0x3f 0x00 0x00 0x00 0x00
      
      Big endian (Last 4 bytes):
      Address | 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08
      Data    | 0x00 0x00 0x00 0x00 0x3f 0x8c 0xcc 0xcd
      
      In general, when it copies N(N<8) byte data in big endian, the start
      address should be incremented by (8 - N) bytes.
      The original code has no problem when it includes 8 byte data(such as
       double) even in big endian.
      
      Differential Revision: https://reviews.llvm.org/D78076
      3a7be241
    • Fangrui Song's avatar
      [lld-macho] Support X86_64_RELOC_SIGNED_{1,2,4} · 6939fe6e
      Fangrui Song authored
      We currently only support extern relocations.
      `X86_64_RELOC_SIGNED_{1,2,4}` are like X86_64_RELOC_SIGNED, but with the
      implicit addend fixed to 1, 2, and 4, respectively.
      See the comment in `lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp RecordX86_64Relocation`.
      
      Reviewed By: int3
      
      Differential Revision: https://reviews.llvm.org/D79311
      6939fe6e
  2. May 04, 2020
    • Krzysztof Parzyszek's avatar
      [RegisterCoalescer] Extend a subrange if needed when filling range gap · 156092bb
      Krzysztof Parzyszek authored
      Register live ranges may have had gaps that after coalescing should be
      removed. This is done by adding a new segment to the range, and merging
      it with neighboring segments. When doing so, do not assume that each
      subrange of the register ended at the same index. If a subrange ended
      earlier, adding this segment could make the live range invalid.
      Instead, if the subrange is not live at the start of the segment,
      extend it first.
      156092bb
    • Vedant Kumar's avatar
      [lldb/Expression] Make Language() const, NFC · 9e354980
      Vedant Kumar authored
      Allow Language() to be called from const methods within UserExpression.
      9e354980
    • Jonas Devlieghere's avatar
      [lldb] Fix -Wdtor-name warnings · 97db238c
      Jonas Devlieghere authored
      Fix warning: ISO C++ requires the name after '::~' to be found in the
      same scope as the name before '::~' [-Wdtor-name]
      97db238c
    • Sanjay Patel's avatar
      [x86] add test for shift+op+concat; NFC · 58c1770b
      Sanjay Patel authored
      D79360 could change this kind of sequence.
      58c1770b
    • Davide Italiano's avatar
      [arm64] Remove an old special case that's not needed anymore. · 6951fe39
      Davide Italiano authored
      Debug info generation & codegen now steps onto the correct line.
      6951fe39
    • Stephen Neuendorffer's avatar
      [cmake] restrict object library dependency generation to PUBLIC libraries · a29f603e
      Stephen Neuendorffer authored
      Previous patch broken flang, which has some yet-to-be resolved cyclic
      dependencies.   This patch fixes the breakage by restricting the dependencies
      which are generated to public libraries, which is probably more sensible anyway.
      
      Differential Revision: https://reviews.llvm.org/D79366
      a29f603e
    • Vedant Kumar's avatar
      [lldb/DataFormatters] Delete GetStringPrinterEscapingHelper · a37caebc
      Vedant Kumar authored
      Summary:
      Languages can have different ways of formatting special characters.
      E.g. when debugging C++ code a string might look like "\b", but when
      debugging Swift code the same string would look like "\u{8}".
      
      To make this work, plugins override GetStringPrinterEscapingHelper.
      However, because there's a large amount of subtly divergent work done in
      each override, we end up with large amounts of duplicated code. And all
      the memory smashers fixed in one copy of the logic (see D73860) don't
      get fixed in the others.
      
      IMO the GetStringPrinterEscapingHelper is overly general and hard to
      use. I propose deleting it and replacing it with an EscapeStyle enum,
      which can be set as needed by each plugin.
      
      A fix for some swift-lldb memory smashers falls out fairly naturally
      from this deletion (https://github.com/apple/llvm-project/pull/1046). As
      the swift logic becomes really tiny, I propose moving it upstream as
      part of this change. I've added unit tests to cover it.
      
      rdar://61419673
      
      Reviewers: JDevlieghere, davide
      
      Subscribers: mgorny, lldb-commits
      
      Tags: #lldb
      
      Differential Revision: https://reviews.llvm.org/D77843
      a37caebc
    • Vedant Kumar's avatar
      Revert "[lldb/Expression] Make Language() const, NFC" · 47e9fd47
      Vedant Kumar authored
      This reverts commit 88d9e432. Revert an
      accidental commit.
      47e9fd47
    • Vedant Kumar's avatar
      [lldb/Expression] Make Language() const, NFC · 88d9e432
      Vedant Kumar authored
      Allow Language() to be called from const methods within UserExpression.
      88d9e432
    • Vedant Kumar's avatar
      [Verifier] Constrain where DILocations may be nested · 8dfe819b
      Vedant Kumar authored
      Summary:
      Constrain which metadata nodes are allowed to be, or contain,
      DILocations. This ensures that logic for updating DILocations in a
      Module is complete.
      
      Currently, !llvm.loop metadata is the only odd duck which contains
      nested DILocations. This has caused problems in the past: some passes
      forgot to visit the nested locations, leading to subtly broken debug
      info and late verification failures.
      
      If there's a compelling reason for some future metadata to nest
      DILocations, we'll need to introduce a generic API for updating the
      locations attached to an Instruction before relaxing this check.
      
      Reviewers: aprantl, dsanders
      
      Subscribers: hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D79245
      8dfe819b
    • shafik's avatar
      [LLDB] Fix overloaded operator new cases in TestCppOperators.py which currently work by accident · 4ad53177
      shafik authored
      The overloaded new operator in TestCppOperators.py are working by accident because of how
      we currently deal with artificial methods.
      
      Differential Revision: https://reviews.llvm.org/D79251
      4ad53177
    • David Green's avatar
      84301415
    • Dan Liew's avatar
      Try to make `duplicate_os_log_reports.cpp` more reliable. · 4155784c
      Dan Liew authored
      It looks like some bots are failing with os log not giving any
      output. This might be due to the system under test being heavy
      load so the 2 minute window might not be large enough. This
      patch makes the window larger in the hope that this test will
      be more reliable.
      
      rdar://problem/62141527
      4155784c
    • Sander de Smalen's avatar
      Revert "[SveEmitter] Add builtins for svdupq and svdupq_lane" · 90f3f62c
      Sander de Smalen authored
      It seems this patch broke some buildbots, so reverting until I
      have had a chance to investigate.
      
      This reverts commit 6b90a688.
      90f3f62c
    • Erich Keane's avatar
      Reject operations between vectors and enum types. · 9fbf9989
      Erich Keane authored
      There are some lookup oddities with these as reported in PR45780, and
      GCC doesn't support these behaviors at all.  To be more consistent with
      GCC and prevent the crashes caused by our lookup issues, nip the problem
      in the bud and prohibit enums here.
      9fbf9989
    • Julian Lettner's avatar
      [lit] Disable test on Windows · 3610fd8c
      Julian Lettner authored
      abhinavgaba reported that that the custom-result-category.py test hangs
      on a Windows build bot [1].  Disable it for now.
      
      [1] https://reviews.llvm.org/D78164#2018178
      3610fd8c
    • Lang Hames's avatar
      [JITLink] Fix missing ADDITIONAL_HEADER_DIRS for the LLVMJITLink component. · 990eb944
      Lang Hames authored
      Also adds target_link_libraries.
      
      Thanks to @jcmac for spotting this.
      990eb944
    • Lang Hames's avatar
      [JITLink] Fix a typo in a comment. · 7ac0c3b4
      Lang Hames authored
      Thanks to @jcmac for pointing this out.
      7ac0c3b4
    • Stephen Neuendorffer's avatar
      Revert "[MLIR] Adjust libMLIR building to more closely follow libClang" · ab1ca6e6
      Stephen Neuendorffer authored
      This reverts commit 4f0f4367.
      
      This seems to show some compile dependence problems, and also breaks flang.
      ab1ca6e6
    • Sander de Smalen's avatar
      [SveEmitter] Add builtins for svdupq and svdupq_lane · 6b90a688
      Sander de Smalen authored
      * svdupq builtins that duplicate scalars to every quadword of a vector
        are defined using builtins for svld1rq (load and replicate quadword).
      * svdupq builtins that duplicate boolean values to fill a predicate vector
        are defined using `svcmpne`.
      
      Reviewers: SjoerdMeijer, efriedma, ctetreau
      
      Reviewed By: efriedma
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D78750
      6b90a688
    • Eli Friedman's avatar
      [ARM] Fix tail call validity checking for varargs calls. · 1eb160fe
      Eli Friedman authored
      If a varargs function is calling a non-varargs function, or vice versa,
      make sure we use the correct "varargs" bit for each.
      
      Fixes https://bugs.llvm.org/show_bug.cgi?id=45234
      
      Differential Revision: https://reviews.llvm.org/D79199
      1eb160fe
    • Sanjay Patel's avatar
      [x86] add tests for concat of casts; NFC · f1d083ab
      Sanjay Patel authored
      f1d083ab
    • Snehasish Kumar's avatar
      Descriptive symbol names for machine basic block sections. · c8ac29ab
      Snehasish Kumar authored
      Today symbol names generated for machine basic block sections use a
      unary encoding to reduce bloat. This is essential when every basic block
      in the binary is assigned a symbol however with basic block clusters
      (rG05192e585ce175b55f2a26b83b4ed7882785c8e6) when we only need to
      generate a few non-temporary symbols we can assign more descriptive
      names making them more user friendly. With this change -
      
      Cold cluster section for function foo is named "foo.cold"
      Exception cluster section for function foo is named "foo.eh"
      Other cluster sections identified by their ids are named "foo.ID"
      Using this format works well with existing tools. It will demangle as
      expected and works with existing symbolizers, profilers and debuggers
      out of the box.
      
      $ c++filt _Z3foov.cold
      foo() [clone .cold]
      
      $ c++filt _Z3foov.eh
      foo() [clone .eh]
      
      $c++filt _Z3foov.1234
      foo() [clone 1234]
      
      Tests for basicblock-sections are updated with some cleanup where
      appropriate.
      
      Differential Revision: https://reviews.llvm.org/D79221
      c8ac29ab
    • peter klausler's avatar
      [flang] Fix x87 binary->decimal · 6fec2c44
      peter klausler authored
      Summary:
      Fix decimal formatting of 80-bit x87 values; the calculation ofnearest neighbor values failed to account for the explicitmost significant bit in that format.
      
      Replace MultiplyByRounded with MultiplyBy in binary->decimal conversions,
      since rounding won't happen and the name was misleading; then remove
      dead code, and migrate LoseLeastSignificantDigit() from one source file
      to another where it's still needed.
      
      Reviewers: tskeith, sscalpone, jdoerfert, DavidTruby
      
      Reviewed By: tskeith
      
      Subscribers: llvm-commits, flang-commits
      
      Tags: #flang, #llvm
      
      Differential Revision: https://reviews.llvm.org/D79345
      6fec2c44
    • Fangrui Song's avatar
      [llvm-objdump][ARM] Print inline relocations when dumping ARM data · ac9e8b3a
      Fangrui Song authored
      Fixes PR44357
      
      For ARM ELF, regions covered by data mapping symbols `$d` are dumped as `.byte`, `.short` or `.word` but inline relocations are not printed. This patch merges its loop into the normal instruction printing loop so that inline relocations are printed.
      
      Reviewed By: nickdesaulniers
      
      Differential Revision: https://reviews.llvm.org/D79284
      ac9e8b3a
    • Sander de Smalen's avatar
      [SveEmitter] Add builtins for Int & FP reductions · 54fa46aa
      Sander de Smalen authored
      This patch adds integer builtins for:
      - svaddv, svandv, sveorv,
        svmaxv, svminv, svorv.
      
      And FP builtins for:
      - svadda, svaddv, svmaxv, svmaxnmv,
        svminv, svminnmv
      54fa46aa
    • Valentin Churavy's avatar
      [MLIR] Adjust libMLIR building to more closely follow libClang · 4f0f4367
      Valentin Churavy authored
      - Exports MLIR targets to be used out-of-tree.
      - mimicks `add_clang_library` and `add_flang_library`.
      - Fixes libMLIR.so
      
      After https://reviews.llvm.org/D77515 libMLIR.so was no longer containing
      any object files. We originally had a cludge there that made it work with
      the static initalizers and when switchting away from that to the way the
      clang shlib does it, I noticed that MLIR doesn't create a `obj.{name}` target,
      and doesn't export it's targets to `lib/cmake/mlir`.
      
      This is due to MLIR using `add_llvm_library` under the hood, which adds
      the target to `llvmexports`.
      
      Differential Revision: https://reviews.llvm.org/D78773
      
      [MLIR] Fix libMLIR.so and LLVM_LINK_LLVM_DYLIB
      
      Primarily, this patch moves all mlir references to LLVM libraries into
      either LLVM_LINK_COMPONENTS or LINK_COMPONENTS.  This enables magic in
      the llvm cmake files to automatically replace reference to LLVM components
      with references to libLLVM.so when necessary.  Among other things, this
      completes fixing libMLIR.so, which has been broken for some configurations
      since D77515.
      
      Unlike previously, the pattern is now that mlir libraries should almost
      always use add_mlir_library.  Previously, some libraries still used
      add_llvm_library.  However, this confuses the export of targets for use
      out of tree because libraries specified with add_llvm_library are exported
      by LLVM.  Instead users which don't need/can't be linked into libMLIR.so
      can specify EXCLUDE_FROM_LIBMLIR
      
      A common error mode is linking with LLVM libraries outside of LINK_COMPONENTS.
      This almost always results in symbol confusion or multiply defined options
      in LLVM when the same object file is included as a static library and
      as part of libLLVM.so.  To catch these errors more directly, there's now
      mlir_check_all_link_libraries.
      
      To simplify usage of add_mlir_library, we assume that all mlir
      libraries depend on LLVMSupport, so it's not necessary to separately specify
      it.
      
      tested with:
      BUILD_SHARED_LIBS=on,
      BUILD_SHARED_LIBS=off + LLVM_BUILD_LLVM_DYLIB,
      BUILD_SHARED_LIBS=off + LLVM_BUILD_LLVM_DYLIB + LLVM_LINK_LLVM_DYLIB.
      
      By: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com>
      Differential Revision: https://reviews.llvm.org/D79067
      
      [MLIR] Move from using target_link_libraries to LINK_LIBS
      
      This allows us to correctly generate dependencies for derived targets,
      such as targets which are created for object libraries.
      
      By: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com>
      Differential Revision: https://reviews.llvm.org/D79243
      
      Three commits have been squashed to avoid intermediate build breakage.
      4f0f4367
Loading