summaryrefslogtreecommitdiffstats
path: root/llgo/cmd
Commit message (Collapse)AuthorAgeFilesLines
* [llgo]: fix compilation under current llvmKristina Brooks2019-01-211-1/+1
| | | | | | | | | | | | | | Patch rL322965 changed how intrinsics for memset and memzero were defined. This causes a regression in LLGO making it no longer buidable. In addition to that one pass was renamed, so this also addresses the pass naming disparity. I removed all split stack related bits from this patch as as asked. Differential Revision: https://reviews.llvm.org/D56638 llvm-svn: 351722
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-195-20/+15
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [llgo] Update to use the latest IR attribute bindingsMeador Inge2016-12-061-4/+9
| | | | | | | | 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
* [llgo] llgoi: separate evaluation from printingAndrew Wilkins2016-04-251-61/+86
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Separate the evaluation of expressions from printing of results. This is in preparation for splitting the core of the interpreter out for use in alternative interpreter frontends. At the same time, the output is made less noisy in response to comments on the golang-nuts announcement. We would ideally print out values using Go syntax, but this is impractical until we have libgo based on Go 1.5. When that happens, fmt's %#v will handle reflect.Value better, and so we can fix/filter type names to remove automatically generated package names. Reviewers: pcc Subscribers: llvm-commits, axw Differential Revision: http://reviews.llvm.org/D13761 llvm-svn: 267374
* [llgo] Roll gofrontend forwardAndrew Wilkins2016-03-151-4/+1
| | | | | | | | | | | | | | | | | 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
* [llgo] Force exporting __morestack from llgoiAndrew Wilkins2015-11-271-0/+6
| | | | | | | | | | | | | | | | | Summary: Force exporting __morestack from llgoi, so that the symbol is available to the execution engine when linking with libLLVM.so. The engine does not reference __morestack explicitly, so must be provided by the host program. Reviewers: pcc Subscribers: axw, llvm-commits Differential Revision: http://reviews.llvm.org/D12625 llvm-svn: 254188
* [llgo] cmd/gllgo: handle/ignore more flagsAndrew Wilkins2015-07-171-0/+8
| | | | | | | | | | | | | | | | 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
* [llgo] cmd/llgoi: use line editorAndrew Wilkins2015-05-232-44/+57
| | | | | | | | | | | | | | | | | | | Summary: This diff adds line-editing to llgoi, by vendoring and using github.com/peterh/liner. I have only implemented the basics here; follow-ups will come later to add persisted history, and completion, Reviewers: pcc Reviewed By: pcc Subscribers: axw, llvm-commits Differential Revision: http://reviews.llvm.org/D9811 llvm-svn: 238100
* llgoi: Fix type identity for imported binary packages.Peter Collingbourne2015-03-181-7/+4
| | | | | | | | | | | | go/loader creates a fresh package map for each source package it imports. In llgoi this caused binary imported packages to be imported anew for every input line, resulting in spurious type errors and panics in go/ssa when encountering previously imported types. Fix this by setting types.Config.Packages to our internal package map. Differential Revision: http://reviews.llvm.org/D8409 llvm-svn: 232617
* llgoi: Fix importing source packages together with dependent binary packages.Peter Collingbourne2015-03-181-0/+3
| | | | | | | | | | Note that this means that llgoi does not support the case where a package's pkgpath is different from its import path, but I don't think this should actually happen with llgoi. Differential Revision: http://reviews.llvm.org/D8403 llvm-svn: 232612
* Build cgo and llgo-goPeter Collingbourne2015-02-142-0/+101
| | | | | | Differential Revision: http://reviews.llvm.org/D7629 llvm-svn: 229211
* Update for API changePeter Collingbourne2015-02-131-1/+1
| | | | llvm-svn: 229173
* Introduce llgoi, a REPL for GoPeter Collingbourne2015-01-152-0/+553
| | | | | | | | | | llgoi is a Go REPL based on llgo irgen and the LLVM JIT. It supports expressions, statements, most declarations and imports, including binary imports from the standard library and source imports from $GOPATH. Differential Revision: http://reviews.llvm.org/D6957 llvm-svn: 226097
* irgen: modify the ABI to use init guards instead of priorityPeter Collingbourne2014-12-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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
* irgen, driver: modify Compiler.Compile to take a FileSet and FilesPeter Collingbourne2014-12-311-1/+9
| | | | | | | | | | | 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
* [cmake/multilib] Teach llgo to respect the LLVM_LIBDIR_SUFFIX variable forChandler Carruth2014-12-292-15/+34
| | | | | | | | | | | | | | | | | 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
* Initial commit of llgo.Peter Collingbourne2014-11-272-0/+882
llvm-svn: 222857
OpenPOWER on IntegriCloud