**
*/
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include "irnode_t.h"
#include "irgraph_t.h"
#include "ident_t.h"
+#include "irmode_t.h"
#include "array.h"
#ifdef DEBUG_libfirm
inline ident *
-get_irn_modename (ir_node *node)
+get_irn_modeident (ir_node *node)
{
assert(node);
return node->mode->name;
assert ( (node->op == op_SymConst)
&& (get_SymConst_kind(node) == linkage_ptr_info));
return node->attr.i.tori.ptrinfo;
-
-
}
inline void
node->attr.i.tori.ptrinfo = ptrinfo;
}
+inline type_or_id_p
+get_SymConst_type_or_id (ir_node *node) {
+ assert (node->op == op_SymConst);
+ return &(node->attr.i.tori);
+}
+
+inline void
+set_SymConst_type_or_id (ir_node *node, type_or_id_p tori) {
+ assert (node->op == op_SymConst);
+ memcpy (&(node->attr.i.tori), tori, sizeof(type_or_id));
+}
+
inline ir_node *
get_Sel_mem (ir_node *node) {
assert (node->op == op_Sel);
}
inline void
-set_Allco_size (ir_node *node, ir_node *size) {
+set_Alloc_size (ir_node *node, ir_node *size) {
assert (node->op == op_Alloc);
set_irn_n(node, 1, size);
}
/* don't assert node !!! */
if (node && (node->op == op_Id) && (node != get_Id_pred(node))) {
- return get_Id_pred(node);
+ /* Don't use get_Id_pred: We get into an endless loop for
+ self-referencing Ids. */
+ assert (get_irn_arity (node) > 0);
+ return node->in[0+1];
} else {
return node;
}