aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/gofrontend/go-optimize.h
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2018-02-02 00:00:04 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2018-02-02 00:00:04 +0000
commit2794baab686973f39045327970e4a7302c31ea88 (patch)
tree86c02d77baa7232c84a3d624601cc0f9e7405174 /gcc/go/gofrontend/go-optimize.h
parent90bf94878bea2883158d02370cb2692d4b2ed4a1 (diff)
downloadgcc-2794baab686973f39045327970e4a7302c31ea88.zip
gcc-2794baab686973f39045327970e4a7302c31ea88.tar.gz
gcc-2794baab686973f39045327970e4a7302c31ea88.tar.bz2
compiler: turn on escape analysis by default
The escape analysis now runs by default. It can be disabled with the negative flag, -fno-go-optimize-allocs. Reviewed-on: https://go-review.googlesource.com/86247 * lang.opt (fgo-optimize): Remove RejectNegative. * go-c.h (go_enable_optimize): Update declaration to take value argument. * go-lang.c (go_langhook_handle_option): Pass value to go_enable_optimize. * gccgo.texi (Invoking gccgo): Update -fgo-optimize-allocs doc. From-SVN: r257319
Diffstat (limited to 'gcc/go/gofrontend/go-optimize.h')
-rw-r--r--gcc/go/gofrontend/go-optimize.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/go/gofrontend/go-optimize.h b/gcc/go/gofrontend/go-optimize.h
index 8638498..1ca68de 100644
--- a/gcc/go/gofrontend/go-optimize.h
+++ b/gcc/go/gofrontend/go-optimize.h
@@ -15,16 +15,16 @@
class Go_optimize
{
public:
- Go_optimize(const char* name);
+ Go_optimize(const char*, bool);
// Whether this optimizaiton was enabled.
bool
is_enabled() const
{ return this->is_enabled_; }
- // Enable an optimization by name. Return true if found.
+ // Enable/disable an optimization by name. Return true if found.
static bool
- enable_by_name(const char*);
+ enable_by_name(const char*, bool);
private:
// The next optimize flag. These are not in any order.