OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [go/] [gofrontend/] [go-optimize.h] - Blame information for rev 849

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 714 jeremybenn
// go-optimize.h -- Go frontend optimizer flags.    -*- C++ -*-
2
 
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.
6
 
7
#ifndef GO_OPTIMIZE_H
8
#define GO_OPTIMIZE_H
9
 
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.
14
 
15
class Go_optimize
16
{
17
 public:
18
  Go_optimize(const char* name);
19
 
20
  // Whether this optimizaiton was enabled.
21
  bool
22
  is_enabled() const
23
  { return this->is_enabled_; }
24
 
25
  // Enable an optimization by name.  Return true if found.
26
  static bool
27
  enable_by_name(const char*);
28
 
29
 private:
30
  // The next optimize flag.  These are not in any order.
31
  Go_optimize* next_;
32
  // The name of this optimization pass.
33
  const char* name_;
34
  // Whether this dump was enabled.
35
  bool is_enabled_;
36
};
37
 
38
#endif // !defined(GO_OPTIMIZE_H)

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.