llir / llvm

Library for interacting with LLVM IR in pure Go.
https://llir.github.io/document/
BSD Zero Clause License
1.18k stars 78 forks source link

update llir/llvm to support LLVM 15.0 #222

Open mewmew opened 2 years ago

mewmew commented 2 years ago

ref: #220.

LLVM 15.0 is yet to be released (release candidate at: https://github.com/llvm/llvm-project/releases/tag/llvmorg-15.0.0-rc1)

TODO: Once released, create a diff as follows:

wget https://github.com/llvm/llvm-project/archive/llvmorg-14.0.6.tar.gz
wget https://github.com/llvm/llvm-project/archive/llvmorg-15.0.0.tar.gz
tar zxf llvmorg-14.0.6.tar.gz
tar zxf llvmorg-15.0.0.tar.gz
git diff -w llvm-project-llvmorg-14.0.6/llvm/lib/AsmParser llvm-project-llvmorg-15.0.0/llvm/lib/AsmParser > llvm14.diff
git diff -w llvm-project-llvmorg-14.0.6/llvm/include/llvm/IR/Attributes.td llvm-project-llvmorg-15.0.0/llvm/include/llvm/IR/Attributes.td >> llvm15.diff
dannypsnl commented 2 years ago

But since 16 is bumped, I guess release of 15 will be soon?

mewmew commented 2 years ago

But since 16 is bumped, I guess release of 15 will be soon?

Yeah, I think so too.

Also, LLVM 16.0 will be an interesting release as it will be the first one to use opaque pointers (instead of typed pointers) by default. This will require a massive change throughout the codebase of llir/llvm (anything relying on ElemType of PointerType would have to be updated). So will be fun to see how the update goes : )

From https://llvm.org/docs/OpaquePointers.html#version-support:

LLVM 14: Supports all necessary APIs for migrating to opaque pointers and deprecates/removes incompatible APIs. However, using opaque pointers in the optimization pipeline is not fully supported. This release can be used to make out-of-tree code compatible with opaque pointers, but opaque pointers should not be enabled in production.

LLVM 15: Opaque pointers are enabled by default. Typed pointers are still available, but only supported on a best-effort basis and may be untested.

LLVM 16: Only opaque pointers will be supported. Typed pointers will not be supported.

mewmew commented 2 years ago

From https://llvm.org/

LLVM Release Schedule:

mewmew commented 2 years ago

Re-opening this issue since LLVM 15.0 has not yet been released. llir/llvm currently supports the LLVM 15.0 rc1 release.

dannypsnl commented 2 years ago

https://discourse.llvm.org/t/llvm-15-0-0-release/65099 Here we go

mewmew commented 2 years ago

https://discourse.llvm.org/t/llvm-15-0-0-release/65099 Here we go

Yay! Just a quick heads up, I'll be very busy at Uni for the next few months. So. I won't be able to review work on the LLVM 15 release.

Cheers, Robin

dannypsnl commented 1 year ago

Update: 15.0.3 https://github.com/llvm/llvm-project/releases/tag/llvmorg-15.0.3