1. Jun 28, 2022
    • Patrick Walton's avatar
      Round up zero-sized symbols to 1 byte in `.debug_aranges` (without breaking other logic). · becbbb7e
      Patrick Walton authored
      This commit modifies the AsmPrinter to avoid emitting any zero-sized symbols to
      the .debug_aranges table, by rounding their size up to 1. Entries with zero
      length violate the DWARF 5 spec, which states:
      
      > Each descriptor is a triple consisting of a segment selector, the beginning
      > address within that segment of a range of text or data covered by some entry
      > owned by the corresponding compilation unit, followed by the non-zero length
      > of that range.
      
      In practice, these zero-sized entries produce annoying warnings in lld and
      cause GNU binutils to truncate the table when parsing it.
      
      Other parts of LLVM, such as DWARFDebugARanges in the DebugInfo module
      (specifically the appendRange method), already avoid emitting zero-sized
      symbols to .debug_aranges, but not comprehensively in the AsmPrinter. In fact,
      the AsmPrinter does try to avoid emitting such zero-sized symbols when labels
      aren't involved, but doesn't when the symbol to emitted is a difference of two
      labels; this patch extends that logic to handle the case in which the symbol is
      defined via labels.
      
      Furthermore, this patch fixes a bug in which `available_externally` symbols
      would cause unpredictable values to be emitted into the `.debug_aranges` table
      under certain circumstances. In practice I don't believe that this caused
      issues up until now, but the root cause of this bug--an invalid DenseMap
      lookup--triggered failures in Chromium when combined with an earlier version of
      this patch. Therefore, this patch fixes that bug too.
      
      This is a revised version of diff D126257, which was reverted due to breaking
      tests. The now-reverted version of this patch didn't distinguish between
      symbols that didn't have their size reported to the DwarfDebug handler and
      those that had their size reported to be zero. This new version of the patch
      instead restricts the special handling only to the symbols whose size is
      definitively known to be zero.
      
      Reviewed By: dblaikie
      
      Differential Revision: https://reviews.llvm.org/D126835
      becbbb7e
    • Louis Dionne's avatar
      [libc++] Add a few missing min/max macro push/pop · a2c16032
      Louis Dionne authored
      Also, improve the test for nasty macros to define min and max, so this
      will be caught in the future.
      
      Differential Revision: https://reviews.llvm.org/D128655
      a2c16032
    • Min-Yih Hsu's avatar
      [mlir][LLVMIR] Memorize compatible LLVM types · fc7f7260
      Min-Yih Hsu authored
      This patch memorize compatible LLVM types in `LLVM::isCompatibleType` in
      order to avoid redundant works.
      
      This is especially useful when the size of program is big and there are
      multiple occurrences of some deeply nested LLVM struct types, in which
      case we can gain quite some speedups with this patch.
      
      Differential Revision: https://reviews.llvm.org/D127918
      fc7f7260
    • Min-Yih Hsu's avatar
      [mlir][LLVMIR] Add support for va_start/copy/end intrinsics · 856056d1
      Min-Yih Hsu authored
      This patch adds three new LLVM intrinsic operations: llvm.intr.vastart/copy/end.
      And its translation from LLVM IR.
      
      This effectively removes a restriction, imposed by 0126dcf1, where
      non-external functions in LLVM dialect cannot be variadic. At that time
      it was not clear how LLVM intrinsics are going to be modeled, which
      indirectly affects va_start/copy/end, the core intrinsics used in
      variadic functions. But since we have LLVM intrinsics as normal
      MLIR operations, it's not a problem anymore.
      
      Differential Revision: https://reviews.llvm.org/D127540
      856056d1
    • Snehasish Kumar's avatar
      [memprof] Return an error for unsupported symbolization. · 3a1a404a
      Snehasish Kumar authored
      Add a check to detect that the profiled binary was build with position
      independent code. Add a test with a pie binary to which can be reused
      later when support is added. Also clean up the error messages with
      trailing colons.
      
      Reviewed By: tejohnson
      
      Differential Revision: https://reviews.llvm.org/D128564
      3a1a404a
    • Michał Górny's avatar
      [lldb] [llgs] Skip new vCont test on Windows · fe808292
      Michał Górny authored
      Sponsored by: The FreeBSD Foundation
      fe808292
    • gbreynoo's avatar
      [llvm-ar] Fix MRI ADDLIB command when used with thin archives · 6a1e5f5a
      gbreynoo authored
      We did not properly handle using CREATETHIN in an MRI script and
      attempting to use ADDLIB to add the contents of a regular archive. This
      fix outputs a meaningful error message in this case and provides some
      more testing.
      
      Differential Revision: https://reviews.llvm.org/D128067
      6a1e5f5a
    • Aaron Ballman's avatar
      Silence an "illegal conversion" diagnostic · 9878e176
      Aaron Ballman authored
      MSVC was issuing "illegal conversion; more than one user-defined
      conversion has been implicitly applied" as a warning on this code.
      Explicitly calling .str() causes a StringRef to be materialized so
      that a second user-defined conversion is not required.
      9878e176
    • Chi Chun Chen's avatar
      92fd2eb7
  2. Jun 27, 2022