# include "typewalk.h"
# include "irgwalk.h"
+# include "tv.h"
# include "xmalloc.h"
+# include "gnu_ext.h"
+
/* Local Defines: */
# define obstack_chunk_alloc xmalloc
# define obstack_chunk_free free
assert (alloc_pto->curr_pto);
} break;
+ case (iro_Const):
case (iro_SymConst): {
/* nothing, leave as-is */
} break;
switch (op) {
case (iro_SymConst): {
- if (mode_is_reference(get_irn_mode (node))) {
+ if (mode_is_reference (get_irn_mode (node))) {
entity *ent = get_SymConst_entity (node);
type *tp = get_entity_type (ent);
if (is_Class_type (tp) || is_Pointer_type (tp)) {
OPNUM (node)));
} break;
+ case (iro_Const): {
+ tarval *tv = get_Const_tarval (node);
+
+ /* only need 'NULL' pointer constants */
+ if (mode_P == get_tarval_mode (tv)) {
+ if (get_tarval_null (mode_P) == tv) {
+ pto_t *pto = new_pto (node);
+ set_node_pto (node, pto);
+ }
+ }
+ } break;
case (iro_Load):
case (iro_Call):
case (iro_Phi):
/* HERE ("start"); */
- irg_walk_graph (graph, reset_node_pto, NULL, &reset_env);
+ irg_walk_graph (graph, reset_node_pto, NULL, reset_env);
/* HERE ("end"); */
memset (reset_env, 0x00, sizeof (reset_env_t));
\f
/*
$Log$
+ Revision 1.18 2005/02/16 13:27:52 beck
+ added needed tv.h include
+
+ Revision 1.17 2005/01/14 14:12:51 liekweg
+ prepare gnu extension fix
+
+ Revision 1.16 2005/01/14 13:36:50 liekweg
+ don't put environments on the stack; handle consts
+
Revision 1.15 2005/01/10 17:26:34 liekweg
fixup printfs, don't put environments on the stack