Commit 2f887e2d authored by Götz Lindenmaier's avatar Götz Lindenmaier
Browse files

implemented optimization of accesses to polymorphic fields

[r5326]
parent 288485a3
......@@ -40,7 +40,8 @@ include $(topdir)/MakeRules
CPPFLAGS += -I$(top_srcdir)/ir/adt -I$(top_srcdir)/ir/ir -I$(top_srcdir)/ir/common \
-I$(top_srcdir)/ir/ident -I$(top_srcdir)/ir/tr -I$(top_srcdir)/ir/tv \
-I$(top_srcdir)/ir/debug -I$(top_srcdir)/ir/ana -I$(top_srcdir)/ir/st \
-I$(top_srcdir)/ir/stat -I$(top_srcdir)/ir/external -I$(topdir)/ir/config
-I$(top_srcdir)/ir/stat -I$(top_srcdir)/ir/external -I$(topdir)/ir/config \
-I$(top_srcdir)/ir/opt
include $(top_srcdir)/MakeTargets
......
......@@ -6,7 +6,7 @@
* Modified by: Goetz Lindenmaier
* Created:
* CVS-ID: $Id$
* Copyright: (c) 1998-2003 Universitt Karlsruhe
* Copyright: (c) 1998-2005 Universitt Karlsruhe
* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
*/
......@@ -39,6 +39,7 @@
# include "irhooks.h"
# include "irarch.h"
# include "hashptr.h"
# include "opt_polymorphy.h"
/* Make types visible to allow most efficient access */
# include "entity_t.h"
......@@ -2010,6 +2011,7 @@ static ir_op *firm_set_default_transform_node(ir_op *op)
CASE(Proj);
CASE(Or);
CASE(End);
CASE(Sel);
case iro_Shr:
case iro_Shrs:
case iro_Shl:
......@@ -2478,17 +2480,18 @@ optimize_node (ir_node *n)
free the node. */
iro = get_irn_opcode(n);
if (get_opt_constant_folding() ||
(iro == iro_Cond) ||
(iro == iro_Proj)) /* Flags tested local. */
n = transform_node (n);
(iro == iro_Cond) ||
(iro == iro_Proj) ||
(iro == iro_Sel)) /* Flags tested local. */
n = transform_node (n);
/* Remove nodes with dead (Bad) input.
Run always for transformation induced Bads. */
Run always for transformation induced Bads. */
n = gigo (n);
/* Now we have a legal, useful node. Enter it in hash table for cse */
if (get_opt_cse() && (get_irn_opcode(n) != iro_Block)) {
n = identify_remember (current_ir_graph->value_table, n);
n = identify_remember (current_ir_graph->value_table, n);
}
return n;
......@@ -2565,7 +2568,8 @@ optimize_in_place_2 (ir_node *n)
iro = get_irn_opcode(n);
if (get_opt_constant_folding() ||
(iro == iro_Cond) ||
(iro == iro_Proj)) /* Flags tested local. */
(iro == iro_Proj) ||
(iro == iro_Sel)) /* Flags tested local. */
n = transform_node (n);
/* Remove nodes with dead (Bad) input.
......
......@@ -10,6 +10,11 @@
* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
*/
#ifndef _IROPT_DBG_H_
#define _IROPT_DBG_H_
#include "dbginfo_t.h"
#include "irhooks.h"
/* This file contains makros that generate the calls to
update the debug information after a transformation. */
......@@ -221,3 +226,5 @@
hook_merge_nodes(&n, 1, &oldn, 1, HOOK_OPT_POLY_CALL); \
__dbg_info_merge_pair(n, oldn, dbg_rem_poly_call); \
} while(0)
#endif /* _IROPT_DBG_H_ */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment