From 729c6c110678ebea910f5c37af0fdb0cb6da86a2 Mon Sep 17 00:00:00 2001 From: zeptodoctor <44736852+zeptodoctor@users.noreply.github.com> Date: Fri, 29 Sep 2023 16:28:12 +0000 Subject: [PATCH] build based on 90b9115 --- dev/index.html | 2 +- dev/lib/api/index.html | 2 +- dev/lib/interop/index.html | 4 ++-- dev/man/troubleshooting/index.html | 2 +- dev/man/usage/index.html | 2 +- dev/search/index.html | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dev/index.html b/dev/index.html index 238a9382..85fda44d 100644 --- a/dev/index.html +++ b/dev/index.html @@ -3,4 +3,4 @@ using LLVM # optionally -Pkg.test("LLVM")

The package uses the LLVM library bundled with Julia. This is only possible when the LLVM library is built dynamically (USE_LLVM_SHLIB=1), which has been the default since Julia 0.5. Use of the system LLVM library is not possible; this functionality has been removed from LLVM.jl starting with v1.0.

+Pkg.test("LLVM")

The package uses the LLVM library bundled with Julia. This is only possible when the LLVM library is built dynamically (USE_LLVM_SHLIB=1), which has been the default since Julia 0.5. Use of the system LLVM library is not possible; this functionality has been removed from LLVM.jl starting with v1.0.

diff --git a/dev/lib/api/index.html b/dev/lib/api/index.html index f7f92c9c..2d1426f7 100644 --- a/dev/lib/api/index.html +++ b/dev/lib/api/index.html @@ -1,2 +1,2 @@ -API wrappers · LLVM.jl

API wrappers

This section lists the package's public functionality that directly corresponds to functionality of the LLVM C API. In general, the abstractions stay close to those of the LLVM APIs, so for more information on certain library calls you can consult the LLVM C API reference.

The documentation is grouped according to the modules of the driver API.

WIP

+API wrappers · LLVM.jl

API wrappers

This section lists the package's public functionality that directly corresponds to functionality of the LLVM C API. In general, the abstractions stay close to those of the LLVM APIs, so for more information on certain library calls you can consult the LLVM C API reference.

The documentation is grouped according to the modules of the driver API.

WIP

diff --git a/dev/lib/interop/index.html b/dev/lib/interop/index.html index 1c669094..6a2f68a3 100644 --- a/dev/lib/interop/index.html +++ b/dev/lib/interop/index.html @@ -1,3 +1,3 @@ -Julia/LLVM interop · LLVM.jl

Julia/LLVM interop

This section lists functionality for connecting Julia with LLVM.jl, e.g. emitting code for the Julia JIT or creating types that are compatible with Julia's global state.

Base functionality

Base.convertMethod
convert(LLVMType, typ::Type; allow_boxed=true)

Convert a Julia type typ to its LLVM representation in the current context. The allow_boxed argument determines whether boxed types are allowed.

source
LLVM.Interop.create_functionFunction
create_function(rettyp::LLVMType, argtyp::Vector{LLVMType}, [name::String])

Create an LLVM function, given its return type rettyp and a vector of argument types argtyp. The function is marked for inlining, to be embedded in the caller's body. Returns both the newly created function, and its type.

source
LLVM.Interop.call_functionFunction
call_function(f::LLVM.Function, rettyp::Type, argtyp::Type, args...)

Generate a call to an LLVM function f, given its return type rettyp and a tuple-type for the arguments. The arguments should be passed as a tuple expression containing the argument values (eg. :((1,2))), which will be splatted into the call to the function.

source

Inline assembly

LLVM.Interop.@asmcallMacro
@asmcall asm::String [constraints::String] [side_effects::Bool=false]
-         rettyp=Nothing argtyp=Tuple{} args...

Call some inline assembly asm, optionally constrained by constraints and denoting other side effects in side_effects, specifying the return type in rettyp and types of arguments as a tuple-type in argtyp.

source

LLVM type support

LLVM.Interop.@typed_ccallMacro
@typed_ccall(intrinsic, llvmcall, rettyp, (argtyps...), args...)

Perform a ccall while more accurately preserving argument types like LLVM expects them:

  • Bools are passed as i1, not i8;
  • Pointers (both Ptr and Core.LLVMPtr) are passed as typed pointers (instead of resp. i8* and i64);
  • Val-typed arguments will be passed as constants, if supported.

These features can be useful to call LLVM intrinsics, which may expect a specific set of argument types.

source
+Julia/LLVM interop · LLVM.jl

Julia/LLVM interop

This section lists functionality for connecting Julia with LLVM.jl, e.g. emitting code for the Julia JIT or creating types that are compatible with Julia's global state.

Base functionality

Base.convertMethod
convert(LLVMType, typ::Type; allow_boxed=true)

Convert a Julia type typ to its LLVM representation in the current context. The allow_boxed argument determines whether boxed types are allowed.

source
LLVM.Interop.create_functionFunction
create_function(rettyp::LLVMType, argtyp::Vector{LLVMType}, [name::String])

Create an LLVM function, given its return type rettyp and a vector of argument types argtyp. The function is marked for inlining, to be embedded in the caller's body. Returns both the newly created function, and its type.

source
LLVM.Interop.call_functionFunction
call_function(f::LLVM.Function, rettyp::Type, argtyp::Type, args...)

Generate a call to an LLVM function f, given its return type rettyp and a tuple-type for the arguments. The arguments should be passed as a tuple expression containing the argument values (eg. :((1,2))), which will be splatted into the call to the function.

source

Inline assembly

LLVM.Interop.@asmcallMacro
@asmcall asm::String [constraints::String] [side_effects::Bool=false]
+         rettyp=Nothing argtyp=Tuple{} args...

Call some inline assembly asm, optionally constrained by constraints and denoting other side effects in side_effects, specifying the return type in rettyp and types of arguments as a tuple-type in argtyp.

source

LLVM type support

LLVM.Interop.@typed_ccallMacro
@typed_ccall(intrinsic, llvmcall, rettyp, (argtyps...), args...)

Perform a ccall while more accurately preserving argument types like LLVM expects them:

  • Bools are passed as i1, not i8;
  • Pointers (both Ptr and Core.LLVMPtr) are passed as typed pointers (instead of resp. i8* and i64);
  • Val-typed arguments will be passed as constants, if supported.

These features can be useful to call LLVM intrinsics, which may expect a specific set of argument types.

source
diff --git a/dev/man/troubleshooting/index.html b/dev/man/troubleshooting/index.html index f4e06517..d246e001 100644 --- a/dev/man/troubleshooting/index.html +++ b/dev/man/troubleshooting/index.html @@ -7,4 +7,4 @@ collect2: error: ld returned 1 exit status
IR/Pass.o:(.data.rel.ro._ZTVN4llvm15JuliaModulePassE[_ZTVN4llvm15JuliaModulePassE]+0x40): undefined reference to `llvm::ModulePass::createPrinterPass(llvm::raw_ostream&, std::string const&) const'
 IR/Pass.o:(.data.rel.ro._ZTVN4llvm17JuliaFunctionPassE[_ZTVN4llvm17JuliaFunctionPassE]+0x40): undefined reference to `llvm::FunctionPass::createPrinterPass(llvm::raw_ostream&, std::string const&) const'
 IR/Pass.o:(.data.rel.ro._ZTVN4llvm19JuliaBasicBlockPassE[_ZTVN4llvm19JuliaBasicBlockPassE]+0x40): undefined reference to `llvm::BasicBlockPass::createPrinterPass(llvm::raw_ostream&, std::string const&) const'
-collect2: error: ld returned 1 exit status

These indicate a mismatch between the C++ ABI of the LLVM library (more specifically, caused by the C++11 ABI change), and what your compiler selects by default. The Makefile in this package tries to detect any C++11 ABI symbols in the selected LLVM library and configures GLIBC accordingly, but this detection might fail when objdump is not available on your system, or might not help if the target compiler doesn't support said ABI.

Most if these issues can be fixed by using the same compiler LLVM was build with to compile llvm-extra. You can override the selected compiler by defining the CC and CXX environment variables, eg. CC=clang CXX=clang++ julia -e 'Pkg.build("LLVM")'.

+collect2: error: ld returned 1 exit status

These indicate a mismatch between the C++ ABI of the LLVM library (more specifically, caused by the C++11 ABI change), and what your compiler selects by default. The Makefile in this package tries to detect any C++11 ABI symbols in the selected LLVM library and configures GLIBC accordingly, but this detection might fail when objdump is not available on your system, or might not help if the target compiler doesn't support said ABI.

Most if these issues can be fixed by using the same compiler LLVM was build with to compile llvm-extra. You can override the selected compiler by defining the CC and CXX environment variables, eg. CC=clang CXX=clang++ julia -e 'Pkg.build("LLVM")'.

diff --git a/dev/man/usage/index.html b/dev/man/usage/index.html index 0baa0d60..627aa157 100644 --- a/dev/man/usage/index.html +++ b/dev/man/usage/index.html @@ -1,2 +1,2 @@ -Usage · LLVM.jl

Usage

To enable debug logging, launch Julia with the JULIA_DEBUG environment variable set to LLVM.

WIP

+Usage · LLVM.jl

Usage

To enable debug logging, launch Julia with the JULIA_DEBUG environment variable set to LLVM.

WIP

diff --git a/dev/search/index.html b/dev/search/index.html index 9f935e65..6bfe5114 100644 --- a/dev/search/index.html +++ b/dev/search/index.html @@ -1,2 +1,2 @@ -Search · LLVM.jl

Loading search...

    +Search · LLVM.jl

    Loading search...