X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firop.h;h=6ad92f681048f5bb26da3a98e3ce0728d03dfef2;hb=5f8ddee6b08c8040c0a304a347d65045c1141d52;hp=b4eae586e4f34301b06159958a1f62e21711a433;hpb=efbeaff549fcc6015da255ed4d453a95937ff0fd;p=libfirm diff --git a/ir/ir/irop.h b/ir/ir/irop.h index b4eae586e..6ad92f681 100644 --- a/ir/ir/irop.h +++ b/ir/ir/irop.h @@ -1,15 +1,21 @@ -/* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -** All rights reserved. +/* +** Copyright (C) 1998 - 2000 by Universitaet Karlsruhe +** All rights reserved. ** -** Authors: Christian Schaefer +** Authors: Christian Schaefer +** +** irop.h operators of firm nodes +** +** This module specifies the opcodes possible for ir nodes. Their +** definition is close to the operations specified in UKA Tech-Report 1999-44 ** */ # ifndef _IROP_H_ # define _IROP_H_ +# include # include "ident.h" -# include "type.h" typedef enum { iro_Block, @@ -24,12 +30,7 @@ typedef enum { iro_Proj, iro_Tuple, iro_Id, iro_Bad } opcode; -typedef struct { - opcode code; - ident *name; - size_t attr_size; - int labeled; -} ir_op; +typedef struct ir_op ir_op; extern ir_op *op_Block; @@ -39,7 +40,6 @@ extern ir_op *op_Jmp; extern ir_op *op_Cond; extern ir_op *op_Return; extern ir_op *op_Raise; - extern ir_op *op_Sel; extern ir_op *op_Const; @@ -80,8 +80,18 @@ extern ir_op *op_Proj; extern ir_op *op_Id; extern ir_op *op_Bad; -/* create a new ir operation */ -ir_op * new_ir_op (opcode code, ident *name, size_t attr_size, int labeled); -void init_op (void); + +/* Returns the string for the opcode. */ +const char *get_op_name (ir_op *op); + +/* Returns the enum for the opcode */ +opcode get_op_code (ir_op *op); + +/* Returns the ident for the opcode name */ +ident *get_op_ident (ir_op *op); + +/* Returns the attribute size of the opcode. + Use not encouraged, internal feature. */ +int get_op_attr_size (ir_op *op); # endif /* _IROP_H_ */