1. Apr 30, 2024
  2. Dec 13, 2023
    • jimingham's avatar
      Add a test for evicting unreachable modules from the global module cache (#74894) · 2684281d
      jimingham authored
      When you debug a binary and the change & rebuild and then rerun in lldb
      w/o quitting lldb, the Modules in the Global Module Cache for the old
      binary & .o files if used are now "unreachable". Nothing in lldb is
      holding them alive, and they've already been unlinked. lldb will
      properly discard them if there's not another Target referencing them.
      
      However, this only works in simple cases at present. If you have several
      Targets that reference the same modules, it's pretty easy to end up
      stranding Modules that are no longer reachable, and if you use a
      sequence of SBDebuggers unreachable modules can also get stranded. If
      you run a long-lived lldb process and are iteratively developing on a
      large code base, lldb's memory gets filled with useless Modules.
      
      This patch adds a test for the mode that currently works:
      
      (lldb) target create foo
      (lldb) run
      <rebuild foo outside lldb>
      (lldb) run
      
      In that case, we do delete the unreachable Modules.
      
      The next step will be to add tests for the cases where we fail to do
      this, then see how to safely/efficiently evict unreachable modules in
      those cases as well.
      2684281d
    • Mircea Trofin's avatar
      [NFC][InstrProf] Rename internal `InstrProfiling` to `InstrLowerer` (#75139) · a06c7d9e
      Mircea Trofin authored
      Captures its responsibility a bit better.
      a06c7d9e
    • Yinying Li's avatar
      [mlir][sparse]Make isBlockSparsity more robust (#75113) · 31b72b07
      Yinying Li authored
      1. A single dimension can either be blocked (with floordiv and mod pair)
      or non-blocked. Mixing them would be invalid.
      2. Block size should be non-zero value.
      31b72b07
    • Simon Pilgrim's avatar
      [X86] avx512-vbroadcast.ll - fix orphan check prefixes · 06613095
      Simon Pilgrim authored
      The AVX512F/AVX512BW checks had been removed despite still being used
      06613095
    • Fangrui Song's avatar
    • Boian Petkantchin's avatar
      [mlir][mesh] Add endomorphism simplification for all-reduce (#73150) · 4b344677
      Boian Petkantchin authored
      Does transformations like
      all_reduce(x) + all_reduce(y) -> all_reduce(x + y)
      
      max(all_reduce(x), all_reduce(y)) -> all_reduce(max(x, y))
      when the all_reduce element-wise op is max.
      
      Added general rewrite pattern HomomorphismSimplification and
      EndomorphismSimplification that encapsulate the general algorithm.
      Made specialization for all-reduce with respect to
      addf, addi, minsi, maxsi, minimumf and maximumf
      in the Arithmetic dialect.
      4b344677
    • Jakub Kuderski's avatar
      [mlir][vector] Allow vector distribution with multiple written elements (#75122) · 80636227
      Jakub Kuderski authored
      Add a configuration option to allow vector distribution with multiple
      elements written by a single lane.
      
      This is so that we can perform vector multi-reduction with multiple
      results per workgroup.
      80636227
    • Fangrui Song's avatar
      [ELF] Don't create copy relocation/canonical PLT entry for a defined symbol (#75095) · 42e49671
      Fangrui Song authored
      Copy relocations and canonical PLT entries are for symbols defined in a
      DSO. Currently we create them even for a `Defined`, possibly leading to
      an output that won't work at run-time (e.g. R_X86_64_JUMP_SLOT
      referencing a null symbol).
      ```
      % cat a.s
      .globl _start, main
      .type main, @function
      _start: main: ret
      
      .rodata
      .quad main
      % clang -fuse-ld=lld -pie -nostdlib a.s
      % readelf -Wr a.out
      
      Relocation section '.rela.plt' at offset 0x290 contains 1 entry:
          Offset             Info             Type               Symbol's Value  Symbol's Name + Addend
      00000000000033b8  0000000000000007 R_X86_64_JUMP_SLOT                        12b0
      ```
      
      Report an error instead for the default `-z text` mode. GNU ld reports
      an error in `-z text` mode as well.
      42e49671
    • Mark de Wever's avatar
      [libc++][chrono] Fixes year_month year wrapping. (#74938) · 766bf140
      Mark de Wever authored
      Adding months to a year_month should wrap the year when the month
      becomes greater than twelve or less than one.
      
      This fixes the issue for year_month. Other classes with a year and month
      do not have this issue. This has been verified and tests are added to
      avoid possible regressions.
      
      Also fixes some variable copy-paste errors in the tests.
      
      Fixes https://github.com/llvm/llvm-project/issues/73162
      766bf140
    • Fangrui Song's avatar
      [DebugInfo] Fix duplicate DIFile when main file is preprocessed (#75022) · 831484ef
      Fangrui Song authored
      When the main file is preprocessed and we change `MainFileName` to the
      original source file name (e.g. `a.i => a.c`), the source manager does
      not contain `a.c`, but we incorrectly associate the DIFile(a.c) with
      md5(a.i). This causes CGDebugInfo::emitFunctionStart to create a
      duplicate DIFile and leads to a spurious "inconsistent use of MD5
      checksums" warning.
      
      ```
      % cat a.c
      void f() {}
      % clang -c -g a.c  # no warning
      % clang -E a.c -o a.i && clang -g -S a.i && clang -g -c a.s
      a.s:9:2: warning: inconsistent use of MD5 checksums
              .file   1 "a.c"
              ^
      % grep DIFile a.ll
      !1 = !DIFile(filename: "a.c", directory: "/tmp/c", checksumkind: CSK_MD5, checksum: "c5b2e246df7d5f53e176b097a0641c3d")
      !11 = !DIFile(filename: "a.c", directory: "/tmp/c")
      % grep 'file.*a.c' a.s
              .file   "a.c"
              .file   0 "/tmp/c" "a.c" md5 0x2d14ea70fee15102033eb8d899914cce
              .file   1 "a.c"
      ```
      
      Fix #56378 by disassociating md5(a.i) with a.c.
      831484ef
    • Mark de Wever's avatar
      [libc++][doc] Updates module information. (#75003) · 0e059046
      Mark de Wever authored
      Adds the std.compat module and add support for CMake 3.28.
      0e059046
    • Wei Wang's avatar
      [coroutines] Use DILocation from new storage for hoisted dbg.declare (#75104) · 31cf6df0
      Wei Wang authored
      Make the hoisted dbg.declare inherent the DILocation scope from the new
      storage.
      
      After hoisting, the dbg.declare is moved into the block that defines the
      new storage. This could create an inconsistency in the debug location
      scope hierarchy where the scope of hoisted dbg.declare (i.e.
      DILexicalBlock) is enclosed with the scope of the block (i.e.
      DISubprogram). This confuses LiveDebugValues pass to think that the
      hoisted dbg.declare is killed in that block and does not generate
      DBG_VALUE in other blocks. Debugger won't be able to track its value
      anymore.
      31cf6df0
    • Jay Foad's avatar
      8005ee6d
    • Lang Hames's avatar
      [ORC][MachO] For convenience, make MachOPlatform ref available to subclasses. · 671fa917
      Lang Hames authored
      This saves SimpleMachOHeaderMU subclasses from having to hold their own
      reference.
      671fa917
    • LLVM GN Syncbot's avatar
      [gn build] Port 6a664674 · cc5a3be4
      LLVM GN Syncbot authored
      cc5a3be4
    • DonatNagyE's avatar
      [analyzer] Fix broken testcase (#75216) · 4b7d4008
      DonatNagyE authored
      When merging commit c873f77e I didn't
      manually rebase it onto the tip of the main branch, so I didn't notice
      that the testcase that's added by it needs to be tweaked to account for
      the effects of commit 2f29ded4 (which
      was also merged by me a few days ago).
      4b7d4008
    • Nick Desaulniers's avatar
      [RegAllocFast] NFC cleanups (#74860) · 935c6a2d
      Nick Desaulniers authored
      
      - use more range for
      - avoid capturing lambda
      - prefer Register type to unsigned
      - remove braces around single statement if
      935c6a2d
    • Jonas Hahnfeld's avatar
      [clang][Sema] Always clear UndefinedButUsed (#73955) · ac616408
      Jonas Hahnfeld authored
      Before, it was only cleared if there were undefined entities. This is
      important for Clang's incremental parsing as used by `clang-repl` that
      might receive multiple calls to `Sema.ActOnEndOfTranslationUnit`.
      ac616408
    • Kazu Hirata's avatar
      [Transforms] Fix a warning · 4b4dcb49
      Kazu Hirata authored
      This patch fixes:
      
        llvm/lib/Transforms/Scalar/SROA.cpp:4855:9: error: unused variable
        'NewAssign' [-Werror,-Wunused-variable]
      4b4dcb49
    • Cyndy Ishida's avatar
      [readtapi] Cleanup printing command line options (#75106) · 142e567c
      Cyndy Ishida authored
      Also, add a version option.
      142e567c
    • Pete Steinfeld's avatar
      [flang] Fix compilation error due to variable no being used (#75210) · 2a1d2220
      Pete Steinfeld authored
      My builds were failing because the variable 'dim' was not used. This
      produced a warning, and my builds have warnings set as errors.
      2a1d2220
    • Benji Smith's avatar
      [C API] Add getters and setters for fast-math flags on relevant instructions (#75123) · d5c95302
      Benji Smith authored
      These flags are usable on floating point arithmetic, as well as call,
      select, and phi instructions whose resulting type is floating point, or
      a vector of, or an array of, a valid type. Whether or not the flags are
      valid for a given instruction can be checked with the new
      LLVMCanValueUseFastMathFlags function.
      
      These are exposed using a new LLVMFastMathFlags type, which is an alias
      for unsigned. An anonymous enum defines the bit values for it.
      
      Tests are added in echo.ll for select/phil/call, and the floating point
      types in the new float_ops.ll bindings test.
      
      Select and the floating point arithmetic instructions were not
      implemented in llvm-c-test/echo.cpp, so they were added as well.
      d5c95302
    • Mark de Wever's avatar
      [libc++][CI] Tests the no RTTI configuration. (#65518) · ed210f9f
      Mark de Wever authored
      There are a few drive-by fixes:
      - Since the combination RTTI disabled and exceptions enabled do not
      work, this combination is prohibited.
      - A small NFC in any fixing clang-tidy.
      
      The code in the Buildkite configuration is prepared for using the std
      module. There are more fixes needed for that configuration which will be
      done in a separate commit.
      ed210f9f
  3. Dec 12, 2023