updated Header
[libfirm] / ir / opt / ldstopt.h
1 /*
2  * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
3  *
4  * This file is part of libFirm.
5  *
6  * This file may be distributed and/or modified under the terms of the
7  * GNU General Public License version 2 as published by the Free Software
8  * Foundation and appearing in the file LICENSE.GPL included in the
9  * packaging of this file.
10  *
11  * Licensees holding valid libFirm Professional Edition licenses may use
12  * this file in accordance with the libFirm Commercial License.
13  * Agreement provided with the Software.
14  *
15  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17  * PURPOSE.
18  */
19
20 /*
21  * Project:     libFIRM
22  * File name:   ir/opt/ldstopt.h
23  * Purpose:     load/store optimizations
24  * Author:      Michael Beck
25  * Created:
26  * CVS-ID:      $Id$
27  * Copyright:   (c) 1998-2007 Universität Karlsruhe
28  */
29
30 /**
31  * @file ldstopt.h
32  *
33  * Load/Store optimization.
34  *
35  * @author Michael Beck
36  */
37 #ifndef _LDSTOPT_H_
38 #define _LDSTOPT_H_
39
40 #include "irgraph.h"
41
42 /** Load/Store optimization.
43  *
44  * Removes redundant non-volatile Loads and Stores.
45  * May introduce Bad nodes if exceptional control flow
46  * is removed. The following cases are optimized:
47  *
48  * Load without result: A Load which has only a memory use
49  *   is removed.
50  *
51  * Load after Store: A Load after a Store is removed, if
52  *   the Load doesn't have an exception handler OR is in
53  *   the same block as the Store.
54  *
55  * Load after Load: A Load after a Load is removed, if the
56  *   Load doesn't have an exception handler OR is in the
57  *   same block as the previous Load.
58  *
59  * Store before Store: A Store immediately before another
60  *   Store in the same block is removed, if the Store doesn't
61  *   have an exception handler.
62  *
63  * Store after Load: A Store after a Load is removed, if the
64  *   Store doesn't have an exception handler.
65  */
66 void optimize_load_store(ir_graph *irg);
67
68 #endif /* _LDSTOPT_H_ */