X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Ftr%2Ftype.h;h=6e9d4c59fc33d013cd6c35dd4dd041b5e445c720;hb=ff244fb7355c6120cf0f15ba7911b473bb91c64b;hp=845a9761ed6055354ad46c80fc399340bfa75768;hpb=a59e7e475485a1f7c7e5fb3c2d2d754b7c87016c;p=libfirm diff --git a/ir/tr/type.h b/ir/tr/type.h index 845a9761e..6e9d4c59f 100644 --- a/ir/tr/type.h +++ b/ir/tr/type.h @@ -1114,7 +1114,7 @@ int is_Pointer_type (const ir_type *pointer); /** Returns the first pointer type that has as points_to tp. * Not efficient: O(#types). - * If not found returns unknown_type. */ + * If not found returns firm_unknown_type. */ ir_type *find_pointer_type_to_type (ir_type *tp); /** @@ -1123,7 +1123,7 @@ ir_type *find_pointer_type_to_type (ir_type *tp); * Primitive types are types that represent indivisible data values that * map directly to modes. They don't have a private attribute. The * 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); @@ -1135,7 +1135,7 @@ int is_Primitive_type (const ir_type *primitive); /** - * @page none_type + * @page none_type The None type * * This type is an auxiliary type dedicated to support type analyses. * @@ -1226,10 +1226,15 @@ int get_compound_member_index(const ir_type *tp, entity *member); int is_compound_type(const ir_type *tp); /** - * Checks, whether a type is a frame type + * Checks, whether a type is a frame type. */ int is_frame_type(const ir_type *tp); +/** + * Checks, whether a type is a lowered type. + */ +int is_lowered_type(const ir_type *tp); + /** * Makes a new frame type. Frame types are class types, * so all class access functions work. @@ -1237,6 +1242,32 @@ int is_frame_type(const ir_type *tp); */ ir_type *new_type_frame(ident *name); +/** + * Sets a lowered type for a type. This sets both associations + * and marks lowered type as a "lowered" one. + */ +void set_lowered_type(ir_type *tp, ir_type *lowered_type); + +/** + * Gets the lowered/unlowered type of a type or NULL if this type + * has no lowered/unlowered one. + */ +ir_type *get_associated_type(const ir_type *tp); + +/** + * Allocate an area of size bytes aligned at alignment + * at the start or the end of a frame type. + * The frame type must have already an fixed layout. + * + * @param frame_type a frame type + * @param size the size of the entity + * @param alignment the alignment of the entity + * @param at_start if true, put the area at the frame type's start, else at end + * + * @return the entity representing the area + */ +entity *frame_alloc_area(type *frame_type, int size, int alignment, int at_start); + /*-----------------------------------------------------------------*/ /** Debug aides **/ /*-----------------------------------------------------------------*/