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 * File name: ir/opt/ldstopt.h
23 * Purpose: load/store optimizations
24 * Author: Michael Beck
27 * Copyright: (c) 1998-2007 Universität Karlsruhe
33 * Load/Store optimization.
35 * @author Michael Beck
42 /** Load/Store optimization.
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:
48 * Load without result: A Load which has only a memory use
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.
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.
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.
63 * Store after Load: A Store after a Load is removed, if the
64 * Store doesn't have an exception handler.
66 void optimize_load_store(ir_graph *irg);
68 #endif /* _LDSTOPT_H_ */