summaryrefslogtreecommitdiffstats
path: root/llgo
Commit message (Collapse)AuthorAgeFilesLines
* debug: Update for debug info API change.Peter Collingbourne2015-11-051-1/+1
| | | | llvm-svn: 252221
* [llgo] irgen: always use TargetMachine's data layoutAndrew Wilkins2015-09-252-28/+0
| | | | | | | | | | | | | | | | | | | | | | | Summary: Another attempt at resolving the runtime assertion in llgoi due to data layout mismatch between module and execution engine. The X86 data layout constant appears to be unnecessary, and does not match what the execution engine picks. Using the registered Target, we pick the same data layout as the execution engine. While I was in the vicinity, I deleted the last remnants of PNaCl support. Reviewers: pcc Subscribers: jfb, llvm-commits, dschuff Differential Revision: http://reviews.llvm.org/D12630 llvm-svn: 248565
* [llgo] drop debug/DIBuilder.DeclareAndrew Wilkins2015-09-011-25/+0
| | | | | | | | | | | | | | | | | | | | Summary: Companion to D11864, which updates the DIBuilder bindings to match a recent change in the underlying API. We drop the debug/DIBuilder.Declare method for now, which is unused, as otherwise it will be broken with the new DIBuilder API in the Go bindings. Reviewers: pcc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11891 llvm-svn: 246545
* Update to new lists.llvm.orgTanya Lattner2015-08-052-3/+3
| | | | llvm-svn: 244007
* [llgo] build llgoi by defaultAndrew Wilkins2015-07-211-1/+1
| | | | | | | | | | | | | | | | | Summary: As llgoi is installed, it must be built or the install target will fail; there is no implicit dependency. Adding llgoi to "ALL" makes building llgo as part of an entire LLVM distribution a bit friendlier: you can then just do the typical "make && make install". Reviewers: pcc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11291 llvm-svn: 242750
* [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] update libgo-llgo.so version to match libtool_VERSIONAndrew Wilkins2015-07-151-2/+2
| | | | | | | | | | | | | | | | Summary: libtool_VERSION was changed in gofrontend a while ago, but CMakeLists.txt in llgo wasn't updated, and so the install target fails. Not sure how this went unnoticed for so long. Reviewers: pcc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11118 llvm-svn: 242291
* [llgo] set function personality with SetPersonalityAndrew Wilkins2015-07-151-1/+2
| | | | | | | | | | | | | | | Summary: If a function requires a landing pad, set the personality function. Requires D11116. Reviewers: pcc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11117 llvm-svn: 242290
* [llgo] cmd/llgoi: use line editorAndrew Wilkins2015-05-2326-48/+2679
| | | | | | | | | | | | | | | | | | | 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
* benchcomp: Add macho_symsizes mode for comparing Mach-O object symbol sizes.Peter Collingbourne2015-05-121-0/+49
| | | | llvm-svn: 237199
* [llgo] add buildbot-slave configAndrew Wilkins2015-04-081-0/+31
| | | | | | | | | | | | | | | | | Summary: This patch adds the configuration used to deploy the llgo-builder buildbot slave. The builder is deployed to Google Compute Engine using Juju. Reviewers: pcc Reviewed By: pcc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8854 llvm-svn: 234383
* Add documentation for llgoi, update READMEPeter Collingbourne2015-04-056-3/+788
| | | | llvm-svn: 234137
* Roll gofrontend to 15a24202fa42.Peter Collingbourne2015-04-0556-2157/+414
| | | | | | | | Takes us to Go 1.4.2 plus a number of bug fixes. Differential Revision: http://reviews.llvm.org/D8830 llvm-svn: 234136
* Roll gofrontend to 07baa07598ea; roll libffi to r219477.Peter Collingbourne2015-04-05273-19075/+23228
| | | | | | | | | Incorporates https://codereview.appspot.com/198770044, which causes us to start using the static chain register for closures instead of __go_{get,set}_closure. Differential Revision: http://reviews.llvm.org/D8829 llvm-svn: 234135
* Roll gofrontend to a6e10414311aPeter Collingbourne2015-04-05617-6759/+29986
| | | | | | | | | | | | | | This takes us to Go 1.4. Also includes a couple of changes to the test suite, both in the runtime package: - Disable TestSetPanicOnFault. We cannot support this scenario at all, due to LLVM's lack of non-call exceptions. - Tweak TestFinalizerType. This test only passes with two GC runs. Differential Revision: http://reviews.llvm.org/D8828 llvm-svn: 234134
* Roll gotools to d4e70101.Peter Collingbourne2015-04-0557-861/+2052
| | | | | | | | | | | | Most importantly, this gives us https://go-review.googlesource.com/7533 which fixes a bug in go/ssa that caused test failures in the Go 1.4 standard library. Also remove the go1.4 tag workaround. We no longer need it now that we ship llgo-go. Differential Revision: http://reviews.llvm.org/D8827 llvm-svn: 234133
* llgoi: Fix type identity for imported binary packages.Peter Collingbourne2015-03-183-10/+21
| | | | | | | | | | | | 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
* Add llgo-go to installation.Peter Collingbourne2015-03-181-3/+5
| | | | llvm-svn: 232614
* llgoi: Fix importing source packages together with dependent binary packages.Peter Collingbourne2015-03-184-1/+27
| | | | | | | | | | 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
* Add cgo dependency to llgo-stage2 and llgoi.Peter Collingbourne2015-03-171-0/+2
| | | | llvm-svn: 232564
* [llgo] update year in LICENSE.txtAndrew Wilkins2015-03-131-1/+1
| | | | llvm-svn: 232133
* [llgo] Disable known failing packages in check-libgoAndrew Wilkins2015-03-064-4/+42
| | | | | | | | | | | | | | | | | | | | | Summary: There are two packages in libgo which have known failures when running the "make check" rule. This change disables those packages in the tests so that we can run libgo tests without them until the root causes are identified and resolved. Test Plan: ran check-libgo rule Reviewers: pcc Reviewed By: pcc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8003 llvm-svn: 231448
* Fix test to use explicit load type.Peter Collingbourne2015-03-051-1/+1
| | | | llvm-svn: 231417
* [llgo] debug: create replaceable type through DIBuilderAndrew Wilkins2015-03-021-4/+12
| | | | | | | | | | | | | | | | | | | | | Summary: llgo was asserting in DebugInfo, which was interpreting the temporary MDNodes we were creating as DIScopes instead of DITypes (in DIScope::getRef). This proposal changes llgo to use DIBuilder's createReplaceableCompositeType method to create a DIType that can be RAUW'd. Reviewers: pcc Reviewed By: pcc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7852 llvm-svn: 230953
* Build cgo and llgo-goPeter Collingbourne2015-02-143-2/+169
| | | | | | Differential Revision: http://reviews.llvm.org/D7629 llvm-svn: 229211
* Roll gofrontend to 0fde0b6a7eb2Peter Collingbourne2015-02-13147-275/+19198
| | | | | | This gives us the sources for cgo, go and gofmt. llvm-svn: 229174
* Update for API changePeter Collingbourne2015-02-131-1/+1
| | | | llvm-svn: 229173
* irgen: don't emit debug metadata for localsAndrew Wilkins2015-01-292-12/+1
| | | | | | | | | | | | | | | | | | | | | | Summary: The debug metadata we generate is wrong, and is now causing build failures. This revision disables the only llvm.dbg.declare calls we make. (There is also a drive-by fix to CMakeLists.txt, adding in a missing .go dependency.) Fixes http://llvm.org/bugs/show_bug.cgi?id=22330 Reviewers: pcc Reviewed By: pcc Subscribers: dblaikie, llvm-commits Differential Revision: http://reviews.llvm.org/D7222 llvm-svn: 227403
* Introduce llgoi, a REPL for GoPeter Collingbourne2015-01-1515-7/+701
| | | | | | | | | | 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: expose DisableUnusedImportCheck flagPeter Collingbourne2015-01-141-0/+5
| | | | | | Differential Revision: http://reviews.llvm.org/D6956 llvm-svn: 225946
* irgen: expose PackageCreated hookPeter Collingbourne2015-01-141-1/+7
| | | | | | Differential Revision: http://reviews.llvm.org/D6955 llvm-svn: 225945
* Roll gotools to 47f2109c.Peter Collingbourne2015-01-13694-72866/+1458
| | | | | | | | | | | At the same time, perform a number of simplifications: - Rename go.tools directory to gotools. - Import only the go directory; all required Go analysis code and its dependencies have now been moved to this directory. llvm-svn: 225825
* [llgo] irgen: generate switch instructionsAndrew Wilkins2015-01-083-1/+216
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: With this patch, llgo uses ssautil.Switches to reconstitute (and synthesise) switches, which can then be lowered to lookup tables, trees, etc. We currently only handle integer const case switches. We erase the comparison blocks (other than the initial block), and generate a switch instruction at the end of the block starting the if-else-if chain. ssautil.Switches does not remove duplicate const cases (e.g. same operands for "||"), so we do this in llgo for now. Test Plan: lit test added Reviewers: pcc Reviewed By: pcc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6831 llvm-svn: 225433
* Test commit to check the new git mirror.Chandler Carruth2015-01-071-0/+1
| | | | llvm-svn: 225394
* [llgo] Elide alloca for unused received values in selectAndrew Wilkins2014-12-313-29/+50
| | | | | | | | | | | | | | | | Summary: If a receive case in a select statement is not assigned to a named variable, then we can eliminate the alloca and copy at runtime. Test Plan: lit test added Reviewers: pcc Reviewed By: pcc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6785 llvm-svn: 225033
* irgen: modify the ABI to use init guards instead of priorityPeter Collingbourne2014-12-314-11/+92
| | | | | | | | | | | | | | | | | | | | | | | | 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: make it possible to use a custom importerPeter Collingbourne2014-12-311-22/+41
| | | | | | Differential Revision: http://reviews.llvm.org/D6803 llvm-svn: 225029
* irgen: return a types.Package to the compiler clientPeter Collingbourne2014-12-311-1/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D6802 llvm-svn: 225028
* irgen: introduce ManglePackagePath functionPeter Collingbourne2014-12-311-7/+7
| | | | | | | | | This is useful for clients that need to use llgo's mangling of the package path to look up a specific function within a given package. Differential Revision: http://reviews.llvm.org/D6801 llvm-svn: 225027
* irgen, driver: modify Compiler.Compile to take a FileSet and FilesPeter Collingbourne2014-12-314-14/+18
| | | | | | | | | | | 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-293-23/+50
| | | | | | | | | | | | | | | | | 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
* irgen: remove unused compiler.runtimetypespkg field.Peter Collingbourne2014-12-291-4/+0
| | | | llvm-svn: 224931
* irgen: do not emit an extra terminator for panic thunksPeter Collingbourne2014-12-283-4/+16
| | | | | | | | Found with GoSmith. Differential Revision: http://reviews.llvm.org/D6714 llvm-svn: 224904
* Test commitAndrew Wilkins2014-12-191-0/+1
| | | | | | Just changing whitespace to test commit access... llvm-svn: 224565
* irgen: fix canAvoid*Peter Collingbourne2014-12-172-10/+35
| | | | | | | | | | | | | | | | Patch by Andrew Wilkins! canAvoidElementLoad and canAvoidLoad were incorrectly eliding loads when an index expression is used as an another array index expression. This led to a panic. See comments on https://github.com/go-llvm/llgo/issues/175 Test Plan: lit test added Differential Revision: http://reviews.llvm.org/D6676 llvm-svn: 224420
* Use the object's package to mangle method names, rather than the receiver's ↵Peter Collingbourne2014-12-164-8/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | package If we use the receiver's package, we can end up with identical manglings for different functions. Consider: package p type U struct{} func (U) f() package q import "p" type T struct { p.U } func (T) f() The method set of *T has two synthetic methods named (*T).f(); one forwards to (T).f(), and the other to (U).f(). Previously, we were distinguishing them by the receiver's package, and in this case because both methods have the same receiver, they received the same name. The methods are correctly distinguished by the package owning the identifier "f", which is available via f.Object().Pkg(). Differential Revision: http://reviews.llvm.org/D6673 llvm-svn: 224357
* Update to new bindings.Peter Collingbourne2014-12-132-55/+49
| | | | llvm-svn: 224180
* Optimize comparisons to empty string.Peter Collingbourne2014-12-091-0/+16
| | | | | | | | Geo-mean performance improvement of 0.2% (-0.3% - 0.9% @ 95% CI). Differential Revision: http://reviews.llvm.org/D6569 llvm-svn: 223728
* Add .arcconfig file.Peter Collingbourne2014-12-081-0/+4
| | | | llvm-svn: 223689
* Roll gofrontend to 2a85649c19e1.Peter Collingbourne2014-12-049-37/+61
| | | | llvm-svn: 223385
OpenPOWER on IntegriCloud