optimize polymorphic field accesses
[libfirm] / ir / opt / opt_polymorphy.h
1 /*
2  * Project:     libFIRM
3  * File name:   ir/opt/opt_polymorphy.h
4  * Purpose:     Optimize polymorphic Sel and Load nodes.
5  * Author:
6  * Created:
7  * CVS-ID:      $Id$
8  * Copyright:   (c) 2005 Universit\81ät Karlsruhe
9  * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
10  */
11
12 /** @file
13  *
14  *  This file subsumes optimization code from cgana.
15  */
16
17 #ifndef _OPT_POLYMORPHY_H_
18 #define _OPT_POLYMORPHY_H_
19
20 #include "irnode.h"
21
22 /**
23  * Transform  Sel(Alloc)[method]
24  * to SymC[method]
25  */
26 ir_node *transform_node_Sel(ir_node *node);
27
28 /** Transform  Load(Sel(Alloc)[constant static entity])
29  *  to Const[constant static entity value].
30  *
31  *  This function returns a node replacing the Proj(Load)[Value].
32  *  If this is actually called in transform_node, we must build
33  *  a tuple, or replace the Projs of the load.
34  *  Therefore we call this optimization in ldstopt.
35  */
36 ir_node *transform_node_Load(ir_node *n);
37
38 #endif /* _OPT_POLYMORPHY_H_ */