Skip to content

Releases: goplus/llgo

v0.6.0

06 May 15:31
028c6cd
Compare
Choose a tag to compare

highlights:

  • library (github.com/goplus/llgo/c): Starting from this version, llgo has its own mini-standard library. We provide some meaningful demos based on this standard library: hello, concat, qsort, genints (#113 #114 #121)

demos:

  • hello: call C printf to print Hello world
  • concat: call C fprintf with stderr, and Go variadic function
  • qsort: call C function with a callback (eg. qsort)
  • genints: various forms of closure usage (including C function, recv.method and anonymous function)

features:

changes:

  • cl: compileFunction if not exists (#118)
  • cl: compilePhis bugfix (#120)
  • llgo/ssa: introduce rawType; MakeClosure (#107 #110)

v0.5.0

05 May 04:15
92f56a2
Compare
Choose a tag to compare

features:

  • cl: support C variables (eg. stdin/stdout/stderr) (#91)
  • cl: link Go names (#98)
  • cl: qsort example (#102)
  • closure (#100 #102 #103 #104 #105)
  • ssa: index (#92)
  • ssa: slice (#99)
  • ssa: phi (#94)
  • ssa: aggregateValue (#95)
  • builtin: llgo.advance, len, cap (#93 #97)
  • runtime: StringCat (#93 #95)
  • runtime: stringTracef (#96)

changes:

  • ssa: TestTypes (#101)
  • github.com/goplus/llvm v0.7.5

v0.4.0

01 May 10:18
aa1d0b3
Compare
Choose a tag to compare

features:

  • llgo interface (#78)
  • llgo slice (#81 #82 #84)
  • llgo string (#85)
  • llgo map (#86)
  • llgo panic (#87 #88)
  • llgo/ssa: phi node (#81)
  • llgo builtin: cstr/alloca/allocaCStr/unreachable (#75 #85)
  • package mode: PkgNoInit, PkgDeclOnly (#74)
  • const float (#77 #80)

changes:

  • llgen bugfix (#76)
  • llgo/ssa: IndexAddr bugfix (#84)
  • llgo/ssa: builder.Alloc sizeof(t) bugfix (#88)
  • cl: callRuntimeInit (#87 #89)
  • build: buildAllPkgs dump error (#83)
  • mod: github.com/goplus/llvm v0.7.3

v0.3.0

28 Apr 20:19
695d3f3
Compare
Choose a tag to compare

features:

  • cmd: llgo clean (#59)
  • cmd: llgo build/install/run (#60 #61 #70)
  • runtime: llgo/internal/{abi, runtime} (#64 #65 #66 #67 #70)
  • ssa: ChangeType, Convert, etc. (#66 #67 #70)
  • llgo/cl/cltest: for testing (#48)

testcases:

  • printval (#50)
  • method (#51 #52)
  • strlen: use C.int (#53 #54)
  • hello: fake libc (#57)
  • struct: named struct (#62)
  • typalias: type alias (#63)
  • any: interface any (#64)

ci/cd tools:

  • codecov (#49)

changes:

  • llgo: use -Wno-override-module to disable clang warning (#55)
  • llgen: smart fname of outFile (llgo_autogen.ll or out.ll) (#69)
  • cl: go:linkname specifies call convention by C.xxx (#58)
  • cl: compileInstrOrValue bugfix (#68)
  • cl: don't need to compile alias type (#71)
  • cl: TestImport/TestVarOf (#56)
  • mod: github.com/goplus/llvm v0.7.2 (#73)

v0.2.0

24 Apr 17:53
bc1821e
Compare
Choose a tag to compare

highlights:

  • llgo build/install/run: Their usage is the same as go build/install/run.

features:

  • cmd: llgo build/install (#45 #46)
  • cmd: llgo run (#47)
  • cl: support go:linkname (#38)
  • cl: importPkg (#39)
  • cl: namespace funcOf/varOf (#39 #43)
  • llgen: support go.mod (#41)

tools:

  • ssadump (#44)

changes:

  • cl.NewPackage: rm param fset *token.FileSet (#40)
  • remove dep of goplus/gop (#42)
  • mod: github.com/goplus/gogen v1.15.2
  • mod: github.com/goplus/llvm v0.7.1
  • mod: github.com/goplus/mod v0.13.10
  • mod: golang.org/x/tools v0.20.0

v0.1.0

21 Apr 17:01
7d71e26
Compare
Choose a tag to compare

highlights:

  • llgo/ssa: It's an implementation of go ssa semantics based on llvm ssa. See details below.

features:

tools:

  • ardump (#14 #15)
  • nmdump (#16 #17)
  • nmindex: A tool that retrieves which .a/.so/.dll/.dylib/.lib definitions a symbol appears in (#18 #19 #20 #21)
  • llgen: A tool to convert a single Go file into an llvm ir file (#32 #33)

llgo/ssa

Although llvm ssa and go ssa are both ir language, they work at completely different levels. llvm ssa is closer to machine code, which abstracts different instruction sets. While go ssa is closer to a high-level language. We can think of it as the instruction set of the Go computer. github.com/goplus/llgo/ssa (we call it llgo/ssa for short) is an implementation of go ssa semantics based on llvm ssa. This makes the llgo compiler (which is responsible for translating Go code into llvm ssa) extremely simple to implement (currently v0.1.0 is only about 300 lines).

But llgo/ssa is not just for the llgo compiler. If we think of it as llvm's higher-order expressive capabilities, you will find it very useful. Before llgo/ssa you had to use machine code semantics to operate llvm ir. But now there is a high-level ssa that can use llvm very conveniently. Isn't this a very meaningful thing? It may be a crucial by-product of the llgo project.