[PATCH] [llgo] irgen: modify the ABI to use init guards instead of priority

Peter Collingbourne peter at pcc.me.uk
Mon Dec 29 15:23:57 PST 2014


Hi axw,

The new ABI is simpler for use cases such as dynamically loaded packages.

The calling convention for import functions is similar to what go/ssa would
produce if BareInits were cleared. However, simply clearing this flag causes
two additional issues:

 1) We would need to special case the 'init$guard' variable (see
    discussion in https://codereview.appspot.com/78780043/).

 2) The call to __go_register_gc_roots needs to appear in the right
    place, i.e. after the guard check. Making this check appear
    in the right place with non-bare inits seems unreliable at best.

So we keep BareInits set and generate the necessary code manually.

It is still possible to get the old ABI by specifying a path to a gccgo
installation.

http://reviews.llvm.org/D6804

Files:
  cmd/gllgo/gllgo.go
  irgen/compiler.go
  irgen/ssa.go
  test/irgen/imports.go

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6804.17689.patch
Type: text/x-patch
Size: 5221 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141229/7b9bc742/attachment.bin>


More information about the llvm-commits mailing list