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

Joseph Huber via All-commits all-commits at lists.llvm.org
Wed Sep 30 05:18:50 PDT 2026


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

  Changed paths:
    M llvm/docs/CommandGuide/llvm-offload-binary.md
    M llvm/docs/ReleaseNotes.md
    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-zlib.yaml
    A llvm/test/ObjectYAML/Offload/compressed.yaml
    A llvm/test/ObjectYAML/Offload/malformed-compressed-offset.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: 3b9e8c73b9352dc1404e3cbfb8d2cf15f10fa373
      https://github.com/llvm/llvm-project/commit/3b9e8c73b9352dc1404e3cbfb8d2cf15f10fa373
  Author: Joseph Huber <huberjn at outlook.com>
  Date:   2026-09-30 (Wed, 30 Sep 2026)

  Changed paths:
    M llvm/lib/Object/OffloadBinary.cpp
    M llvm/test/tools/llvm-objdump/Offloading/compressed.test
    M llvm/test/tools/llvm-offload-binary/compress.test
    M llvm/tools/llvm-objdump/llvm-objdump.cpp

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


Compare: https://github.com/llvm/llvm-project/compare/e2e1fe02edc6...3b9e8c73b935

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