[all-commits] [llvm/llvm-project] 13be02: [Offloading] Add support for compressed OffloadBin...

Joseph Huber via All-commits all-commits at lists.llvm.org
Fri Sep 11 09:58:45 PDT 2026


  Branch: refs/heads/users/jhuber6/compressed-binary
  Home:   https://github.com/llvm/llvm-project
  Commit: 13be029d0b78b8f2b93ad1c19a40b51370c8a3e5
      https://github.com/llvm/llvm-project/commit/13be029d0b78b8f2b93ad1c19a40b51370c8a3e5
  Author: Joseph Huber <huberjn at outlook.com>
  Date:   2026-09-11 (Fri, 11 Sep 2026)

  Changed paths:
    M llvm/include/llvm/Object/OffloadBinary.h
    M llvm/include/llvm/ObjectYAML/OffloadYAML.h
    M llvm/lib/Object/OffloadBinary.cpp
    M llvm/lib/ObjectYAML/OffloadEmitter.cpp
    M llvm/lib/ObjectYAML/OffloadYAML.cpp
    A llvm/test/ObjectYAML/Offload/compressed.yaml
    M llvm/test/ObjectYAML/Offload/malformed-version.yaml
    A llvm/test/tools/llvm-objdump/Offloading/compressed.test
    A llvm/test/tools/llvm-offload-binary/compress.test
    M llvm/tools/llvm-objdump/OffloadDump.cpp
    M llvm/tools/llvm-objdump/OffloadDump.h
    M llvm/tools/llvm-objdump/llvm-objdump.cpp
    M llvm/tools/llvm-offload-binary/llvm-offload-binary.cpp
    M llvm/tools/obj2yaml/offload2yaml.cpp
    M llvm/unittests/Object/OffloadingTest.cpp

  Log Message:
  -----------
  [Offloading] Add support for compressed OffloadBinary types

Summary:
Offload binaries are used to store many heterogenous architectures into
a singel offloading blob. These lists can get very large so this PR adds
the option to compress them with the LLVM provided compression
libraries.

The implementation is quite simple, we simply compress all the buffers
after the header into a single compressed blob, then re-construct the
header. Extracting is the reverse.

The biggest change is that the offload binary now **owns** the memory,
whereas before we simply took a reference to it. This is necessary
because the decompression must create new memory compared to what the
user provided. This adds an extra copy internally, but it also
simplifies the V2 additions.

This does not wire up any clang/HIP support, just providing the
functionality.


  Commit: 02dc39ba9835b4f5c3d0c8eb834e013b1201adda
      https://github.com/llvm/llvm-project/commit/02dc39ba9835b4f5c3d0c8eb834e013b1201adda
  Author: Joseph Huber <huberjn at outlook.com>
  Date:   2026-09-11 (Fri, 11 Sep 2026)

  Changed paths:
    M llvm/lib/Object/OffloadBinary.cpp

  Log Message:
  -----------
  fix alignment


  Commit: 882c2b3d6c9fc8244a3728209952e9052d2a5ddd
      https://github.com/llvm/llvm-project/commit/882c2b3d6c9fc8244a3728209952e9052d2a5ddd
  Author: Joseph Huber <huberjn at outlook.com>
  Date:   2026-09-11 (Fri, 11 Sep 2026)

  Changed paths:
    M llvm/tools/llvm-offload-binary/llvm-offload-binary.cpp

  Log Message:
  -----------
  unnecessary


  Commit: bc755d9d74fd7817797089743776f19841837ff7
      https://github.com/llvm/llvm-project/commit/bc755d9d74fd7817797089743776f19841837ff7
  Author: Joseph Huber <huberjn at outlook.com>
  Date:   2026-09-11 (Fri, 11 Sep 2026)

  Changed paths:
    M llvm/include/llvm/Object/OffloadBinary.h
    M llvm/lib/Object/OffloadBinary.cpp
    A llvm/test/ObjectYAML/Offload/malformed-compressed-offset.yaml
    M llvm/test/tools/llvm-offload-binary/compress.test
    M llvm/tools/llvm-offload-binary/llvm-offload-binary.cpp
    M llvm/tools/obj2yaml/offload2yaml.cpp
    M llvm/unittests/Object/OffloadingTest.cpp

  Log Message:
  -----------
  comments


  Commit: b172d2473b67dfb882b8e911b86c28dcb3a463aa
      https://github.com/llvm/llvm-project/commit/b172d2473b67dfb882b8e911b86c28dcb3a463aa
  Author: Joseph Huber <huberjn at outlook.com>
  Date:   2026-09-11 (Fri, 11 Sep 2026)

  Changed paths:
    M llvm/lib/Object/OffloadBinary.cpp
    A llvm/test/ObjectYAML/Offload/compressed-zlib.yaml
    M llvm/tools/obj2yaml/offload2yaml.cpp
    M llvm/unittests/Object/OffloadingTest.cpp

  Log Message:
  -----------
  zlib add


  Commit: ed11abe1c4feb9b1d896339296f9fdfa8178f5ec
      https://github.com/llvm/llvm-project/commit/ed11abe1c4feb9b1d896339296f9fdfa8178f5ec
  Author: Joseph Huber <huberjn at outlook.com>
  Date:   2026-09-11 (Fri, 11 Sep 2026)

  Changed paths:
    M llvm/tools/obj2yaml/offload2yaml.cpp

  Log Message:
  -----------
  Fix yaml memory corruption


Compare: https://github.com/llvm/llvm-project/compare/62bfafe1e338...ed11abe1c4fe

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list