Commit 595f9b42 authored by Michael Beck's avatar Michael Beck
Browse files

Add flags for the global and TLS type to help debugging

[r8210]
parent c269651e
......@@ -6,7 +6,7 @@
* Modified by: Michael Beck
* Created:
* CVS-ID: $Id$
* Copyright: (c) 2001-2003 Universitt Karlsruhe
* Copyright: (c) 2001-2006 Universitt Karlsruhe
* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
*/
......
......@@ -1071,7 +1071,7 @@ void set_array_order (ir_type *array, int dimension, int order);
/** Returns the order of an array dimension. */
int get_array_order (const ir_type *array, int dimension);
/** Find the array dimension that is placed at order ord. */
/** Find the array dimension that is placed at order order. */
int find_array_dimension(const ir_type *array, int order);
/** Sets the array element type. */
......@@ -1184,13 +1184,13 @@ ir_type *find_pointer_type_to_type (ir_type *tp);
* important information they carry is held in the common mode field.
*/
/** Creates a new primitive type. */
ir_type *new_type_primitive (ident *name, ir_mode *mode);
ir_type *new_type_primitive(ident *name, ir_mode *mode);
/** Creates a new primitive type with debug information. */
ir_type *new_d_type_primitive (ident *name, ir_mode *mode, dbg_info* db);
ir_type *new_d_type_primitive(ident *name, ir_mode *mode, dbg_info* db);
/** Returns true if a type is a primitive type. */
int is_Primitive_type (const ir_type *primitive);
int is_Primitive_type(const ir_type *primitive);
/**
......
......@@ -130,11 +130,13 @@ typedef union {
/** Additional type flags. */
enum type_flags {
tf_none = 0, /**< No flags. */
tf_frame_type = 1, /**< Set if this is a frame type. */
tf_value_param_type = 2, /**< Set if this is a value param type. */
tf_lowered_type = 4, /**< Set if this is a lowered type. */
tf_layout_fixed = 8 /**< Set if the layout of a type is fixed */
tf_none = 0, /**< No flags. */
tf_frame_type = 1, /**< Set if this is a frame type. */
tf_value_param_type = 2, /**< Set if this is a value param type. */
tf_lowered_type = 4, /**< Set if this is a lowered type. */
tf_layout_fixed = 8, /**< Set if the layout of a type is fixed */
tf_global_type = 16, /**< Set only for the global type */
tf_tls_type = 32, /**< Set only for the tls type */
};
/** The structure of a type. */
......
......@@ -3,22 +3,23 @@
* File name: ir/tr/typegmod.c
* Purpose: Functionality to modify the type graph.
* Author: Goetz Lindenmaier
* Modified by:
* Modified by: Michael Beck
* Created:
* CVS-ID: $Id$
* Copyright: (c) 2001-2003 Universität Karlsruhe
* Copyright: (c) 2001-2006 Universität Karlsruhe
* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
# include "typegmod.h"
# include "type_t.h"
# include "tpop_t.h"
# include "irmode.h"
#include "typegmod.h"
#include "type_t.h"
#include "tpop_t.h"
#include "irmode.h"
void exchange_types(ir_type *old_type, ir_type *new_type) {
unsigned flags = old_type->flags & (tf_frame_type | tf_value_param_type | tf_global_type | tf_tls_type);
/* Deallocate datastructures not directly contained in the
old type. We must do this now as it is the latest point
where we know the original kind of type.
......@@ -40,6 +41,9 @@ void exchange_types(ir_type *old_type, ir_type *new_type) {
/* Exchange the types */
old_type->type_op = type_id;
old_type->mode = (ir_mode *) new_type;
/* ensure that the frame, value param, global and tls flags
are set right if these types are exchanged */
new_type->flags |= flags;
}
ir_type *skip_tid(ir_type *tp) {
......
Markdown is supported
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