anarazel · GitHub

Commits on Aug 22, 2026

  1. meson: Add postgresql-$version-llvm-jit-bitcode.pc

    This .pc file collects the cflags (in particular the include directories)
    needed to compile server code, so that the LLVM JIT bitcode emission can
    reuse them. It is versioned and intentionally scoped to JIT bitcode only,
    since there is not yet agreement on a stable, general extension-build
    interface.
    Author: Andres Freund <andres@anarazel.de>
    Author: Nazir Bilal Yavuz <byavuz81@gmail.com>
    Reviewed-by: Peter Eisentraut <peter@eisentraut.org>
    Discussion: https://postgr.es/m/206b001d-1884-4081-bd02-bed5c92f02ba%40eisentraut.org

    authored and Commitfest Bot committed

    Aug 22, 2026
    Configuration menu

    Browse the repository at this point in the history

  2. Configuration menu

    Browse the repository at this point in the history

  3. meson: Add architecture for LLVM bitcode emission

    This commit adds support for bitcode emission for backend and extension
    source files. These bitcode files are installed into the
    $pkglibdir/bitcode/ directory if LLVM is found.
    New variable `bitcode_modules` is introduced to generate bitcode files.
    All required information is gathered in this variable. Then, this
    variable is processed by the main meson LLVM bitcode emission scripts:
    src/backend/jit/llvm/bitcode/meson.build -> src/tools/irlink.
    An example of a possible structure of bitcode_modules is:
    ```
    bitcode_modules = [
      {
        'name': '...',
        'target': ...,
        'srcfiles': [
          '...',
          '...',
        ],
        'additional_flags': [
          '-I...',
          '-I...',
        ],
      }
    ]
    ```
    Instead of depending on the generated backend headers explicitly, each
    bitcode target lists the corresponding extracted object file as an input.
    The command only consumes the source file, but referencing the object
    file pulls in its dependencies (e.g. generated headers) without the large
    slowdown in build.ninja generation that an explicit depends causes.
    Author: Andres Freund <andres@anarazel.de>
    Author: Nazir Bilal Yavuz <byavuz81@gmail.com>
    Author: Diego Fronza <diego.fronza@percona.com>
    Reviewed-by: Peter Eisentraut <peter@eisentraut.org>
    Reviewed-by: Diego Fronza <diego.fronza@percona.com>
    Reviewed-by: Zsolt Parragi <zsolt.parragi@percona.com>
    Discussion: https://postgr.es/m/206b001d-1884-4081-bd02-bed5c92f02ba%40eisentraut.org

    nbyavuz authored and Commitfest Bot committed

    Aug 22, 2026
    Configuration menu

    Browse the repository at this point in the history

  4. Configuration menu

    Browse the repository at this point in the history

  5. meson: Add LLVM bitcode emissions for contrib libraries

    The libraries for which bitcode files are generated are selected
    manually. Bitcode is only worthwhile for extensions that provide
    lightweight SQL operators/functions that can benefit from being inlined
    into JIT-compiled expressions, so this is restricted to citext, hstore,
    intarray, ltree and pg_trgm.
    Author: Andres Freund <andres@anarazel.de>
    Author: Nazir Bilal Yavuz <byavuz81@gmail.com>
    Author: Diego Fronza <diego.fronza@percona.com>
    Reviewed-by: Peter Eisentraut <peter@eisentraut.org>
    Reviewed-by: Diego Fronza <diego.fronza@percona.com>
    Reviewed-by: Zsolt Parragi <zsolt.parragi@percona.com>
    Discussion: https://postgr.es/m/206b001d-1884-4081-bd02-bed5c92f02ba%40eisentraut.org

    nbyavuz authored and Commitfest Bot committed

    Aug 22, 2026
    Configuration menu

    Browse the repository at this point in the history

  6. Configuration menu

    Browse the repository at this point in the history

Read the original on github.com ↗