1 // go-optimize.h -- Go frontend optimizer flags. -*- C++ -*-
3 // Copyright 2011 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
10 // This class manages different arguments to -fgo-optimize-XXX. If you
11 // want to create a new optimization, create a variable of this type with the
12 // name to use for XXX. You can then use is_enabled to see whether
13 // the -fgo-optimize-XXX option was used on the command line.
18 Go_optimize(const char*, bool);
20 // Whether this optimizaiton was enabled.
23 { return this->is_enabled_
; }
25 // Enable/disable an optimization by name. Return true if found.
27 enable_by_name(const char*, bool);
30 // The next optimize flag. These are not in any order.
32 // The name of this optimization pass.
34 // Whether this dump was enabled.
38 #endif // !defined(GO_OPTIMIZE_H)