osprey/dipa/rta/open64/opcode.h File Reference

#include "workaround.h"
#include "opcode_core.h"
#include "messg.h"
#include "opcode_gen.h"

Include dependency graph for opcode.h:

Go to the source code of this file.

Defines

#define opcode_INCLUDED   "opcode.h"
#define OPCODE_make_op_MACRO(opr, rtype, desc)   ((OPCODE) ((opr) | ((rtype) << 8) | ((desc) << 14)))

Functions/Subroutines

const char * OPERATOR_name (OPERATOR)
OPCODE OPCODE_commutative_op (OPCODE op)
void Init_Operator_To_Opcode_Table (void)
OPCODE OPCODE_make_op (OPERATOR opr, TYPE_ID rtype, TYPE_ID desc)

Variables

BOOL Operator_To_Opcode_Table_Inited


Define Documentation

#define opcode_INCLUDED   "opcode.h"

Opcodes, Opcode Types, and Opcode Flags ---------------------------------------

Description:

This file includes opcode_core.h (see the interface there) and provides some accessing functions to the data. It is split like this because the accessors call FmtAssert() and other routines that non-compiler passes might want to avoid.

This file should be updated whenever opcode_gen is updated. opcode_gen is a perl file that is somewhat readable -- if the comments get out of date here, one can always look there (and bring them up to date).

Exported Functions:

OPCODE OPCODE_make_op( OPERATOR opr, TYPE_ID rtype, TYPE_ID desc )

Given the operator, rtype and desc type, return the opcode. The opr, rtype and desc MUST map to a valid OPCODE. Otherwise, the compilation terminates with an internal error.

const char *OPCODE_name(OPCODE op)

Returns a string representation of the opcode.

const char *OPERATOR_name(OPERATOR opr)

Returns a string representation of the operator.

The remaining exported functions are actually not declared in this file but in the automatically generated include files.

mINT8 OPCODE_nkids(OPCODE op)

Returns the number of kids this opcode must have, or -1 if not fixed, i.e. call, array, return.

The following exported functions return 0 if the opcode does not have the stated property. Otherwise, the value returned is non-zero.

UINT32 OPCODE_is_scf(OPCODE op)

Opcode is OPR_FUNC_ENTRY, OPR_BLOCK, OPR_DO_LOOP, OPR_DO_WHILE, OPR_WHILE_DO, OPR_IF.

UINT32 OPCODE_is_stmt(OPCODE op)

Opcode occurs at top of an expression tree, e.g. a store, call, goto, pragma, etc. No structured control flow falls in this category.

UINT32 OPCODE_is_expression(OPCODE op)

Opcode occurs underneath a statement, e.g. OPR_DADD.

UINT32 OPCODE_is_leaf(OPCODE op)

Opcode is an expression or statement that never has children. Note that OPR_RETURN is not a leaf, since it may have children.

UINT32 OPCODE_is_load(OPCODE op) UINT32 OPCODE_is_store(OPCODE op)

Opocde gets memory, e.g. ILOAD, MLOAD, LDID, etc (or store) Goto, branch, label, altentry

UINT32 OPCODE_is_call(OPCODE op)

Intrinsic call or regular, but not an intrinsic op.

UINT32 OPCODE_is_compare(OPCODE op)

Comparison, e.g. GE

UINT32 OPCODE_is_non_scf(OPCODE op)

Opcode directly relates to control flow, but is not structured. Goto, branch, label, altentry

UINT32 OPCODE_is_boolean(OPCODE op)

Boolean return value, e.g. a comparison.

UINT32 OPCODE_is_endsbb(OPCODE op)

Call, a goto, branch, call, return.

UINT32 OPCODE_is_comp_unit_if(OPCODE op)

Compilation unit interface, e.g. REGION

UINT32 OPCODE_is_not_executable(OPCODE op)

Currently PRAGMA, COMMENT, LABEL and OPT_ opcodes.

UINT32 OPCODE_is_prefetcn(OPCODE op)

Obvious.

OPCODE OPCODE_commutative_op(OPCODE op)

Return an opcode op1 such that x op y is y op1 x. If none exists, return (OPCODE) 0.

The following exported functions describe qualities of the WN that has this opcode. E.g. OPCODE_has_sym(op) indicates that a WN holding this opcode also holds an ST_IDX.

UINT32 OPCODE_has_next_prev(OPCODE op) UINT32 OPCODE_has_sym(OPCODE op) UINT32 OPCODE_has_label(OPCODE op) UINT32 OPCODE_has_num_entries(OPCODE op) UINT32 OPCODE_has_offset(OPCODE op) UINT32 OPCODE_has_bits(OPCODE op) UINT32 OPCODE_has_ndim(OPCODE op) UINT32 OPCODE_has_esize(OPCODE op) UINT32 OPCODE_has_value(OPCODE op) UINT32 OPCODE_has_flags(OPCODE op) UINT32 OPCODE_has_inumber(OPCODE op) UINT32 OPCODE_has_1ty(OPCODE op) UINT32 OPCODE_has_2ty(OPCODE op)

The 'has' fields indicate which fields of a WN are used.

OPCODE_MAPCAT OPCODE_mapcat(OPCODE op)

Annotation category of an opcode. Current values are OPCODE_MAPCAT_{HDR,SCF,LDST,PRAGMA,OSTMT,OEXP,ARRAY,CALL}.

Revision
1.1.1.1
Date
2005/10/21 19:00:00
Author
marcel
Source
/proj/osprey/CVS/open64/osprey1.0/common/com/opcode.h,v

Definition at line 185 of file opcode.h.

#define OPCODE_make_op_MACRO ( opr,
rtype,
desc   )     ((OPCODE) ((opr) | ((rtype) << 8) | ((desc) << 14)))

Definition at line 221 of file opcode.h.


Function Documentation

void Init_Operator_To_Opcode_Table ( void   ) 

Definition at line 69 of file opcode.cxx.

References Operator_To_Opcode_Table_Inited, and TRUE.

Referenced by Init_inline(), ipa_dot_so_init(), and main().

OPCODE OPCODE_commutative_op ( OPCODE  op  ) 

OPCODE OPCODE_make_op ( OPERATOR  opr,
TYPE_ID  rtype,
TYPE_ID  desc 
) [inline]

Definition at line 239 of file opcode.h.

References Is_True, Is_Valid_Opcode, OPCODE_make_op_MACRO, and ret.

const char* OPERATOR_name ( OPERATOR  opr  ) 


Variable Documentation

To make this lookup routine routine simple but efficient, we use a closed hashing scheme.

Definition at line 68 of file opcode.cxx.

Referenced by Init_Operator_To_Opcode_Table().


Generated on Wed Apr 8 14:39:46 2009 for Open64 by  doxygen 1.5.6