Commit Graph

8 Commits

Author SHA1 Message Date
Meador Inge 21e53508b6 [llgo] Update to use the latest IR attribute bindings
A recent commit (r286087) to the LLVM Go bindings that
changed things over to use the new attribute API broke
llgo.  This commit updates llgo accordingly.

llvm-svn: 288769
2016-12-06 04:01:11 +00:00
Andrew Wilkins 6436a4abd7 [llgo] Roll gofrontend forward
Switch gofrontend to using go.googlesource.com, and
update to 81eb6a3f425b2158c67ee32c0cc973a72ce9d6be.

There are various changes required to update to the
go 1.5 runtime:

typemap.go is changed to accommodate the change in representation for equal/hash algorithms, and the removal of the zero value/type.
CMakeLists.txt is updated to add the build tree to the package search path, so internal packages, which are not installed, are found.
various files changes due to removal of __go_new_nopointers; the same change as in D11863, but with NoUnwindAttribute added to the added runtime functions which are called with "callOnly".
minor cleanups in ssa.go while investigating issues with unwinding/panic handling.

Differential Revisision: http://reviews.llvm.org/D15188

llvm-svn: 263536
2016-03-15 05:36:43 +00:00
Andrew Wilkins 7a94f98bea [llgo] cmd/gllgo: handle/ignore more flags
Summary:
This diff is to support Debian packaging,
which sets various hardening-rleated flags
in CFLAGS. They don't make sense for Go,
so we just ignore them.

Reviewers: pcc

Subscribers: llvm-commits, axw

Differential Revision: http://reviews.llvm.org/D11288

llvm-svn: 242513
2015-07-17 08:15:01 +00:00
Peter Collingbourne c969b1b063 Update for API change
llvm-svn: 229173
2015-02-13 22:58:36 +00:00
Peter Collingbourne d34d92fb9c irgen: modify the ABI to use init guards instead of priority
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.

Differential Revision: http://reviews.llvm.org/D6804

llvm-svn: 225030
2014-12-31 00:25:39 +00:00
Peter Collingbourne 9350942b20 irgen, driver: modify Compiler.Compile to take a FileSet and Files
This change allows clients to generate IR using "files" received from locations
other than the file system. The regular file parser is moved to a new library,
"driver", which is intended to eventually contain much of the logic from
the existing driver.

Differential Revision: http://reviews.llvm.org/D6794

llvm-svn: 225026
2014-12-31 00:25:32 +00:00
Chandler Carruth a5ecd8a9f7 [cmake/multilib] Teach llgo to respect the LLVM_LIBDIR_SUFFIX variable for
multilib build and installs.

Summary:
This requires introducing a generated header to encapsulate the
LLVM_LIBDIR_SUFFIX value from the build system and push it into the go
code. From there, I've adjusted the gllgo code to systematically use
this rather than a raw "lib". This requires some awkwardness as one of
the flags *must* be "lib"-relative for compatibility with how gccgo
works. For that flag, we use ".." to back up a directory and then go
into the proper lib directory.

Differential Revision: http://reviews.llvm.org/D6795

llvm-svn: 224964
2014-12-29 22:57:21 +00:00
Peter Collingbourne ad9841e8ac Initial commit of llgo.
llvm-svn: 222857
2014-11-27 00:06:42 +00:00