2 * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved.
4 * This file is part of libFirm.
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.
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.
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
22 * @brief Load/Store optimizations.
23 * @author Michael Beck
26 #ifndef FIRM_OPT_LDSTOPT_H
27 #define FIRM_OPT_LDSTOPT_H
29 #include "firm_types.h"
31 /** Load/Store optimization.
33 * Removes redundant non-volatile Loads and Stores.
34 * May introduce Bad nodes if exceptional control flow
35 * is removed. The following cases are optimized:
37 * Load without result: A Load which has only a memory use
40 * Load after Store: A Load after a Store is removed, if
41 * the Load doesn't have an exception handler OR is in
42 * the same block as the Store.
44 * Load after Load: A Load after a Load is removed, if the
45 * Load doesn't have an exception handler OR is in the
46 * same block as the previous Load.
48 * Store before Store: A Store immediately before another
49 * Store in the same block is removed, if the Store doesn't
50 * have an exception handler.
52 * Store after Load: A Store after a Load is removed, if the
53 * Store doesn't have an exception handler.
55 void optimize_load_store(ir_graph *irg);
57 #endif /* FIRM_OPT_LDSTOPT_H */