Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
whirl2c_common.h File Reference
#include "common_include.h"
#include "w2c_driver.h"
Include dependency graph for whirl2c_common.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Context

Defines

#define INIT_CONTEXT   {0, 0LLU, TY_IDX_ZERO}
#define CONTEXT_reset(c)
#define CONTEXT_given_base_ty(c)   (c).given_ty
#define CONTEXT_set_given_base_ty(c, ty)   ((c).given_ty = (ty))
#define CONTEXT_reset_given_base_ty(c)   ((c).given_ty = TY_IDX_ZERO)
#define CONTEXT_given_lvalue_ty(c)   (c).given_ty
#define CONTEXT_set_given_lvalue_ty(c, ty)   ((c).given_ty = (ty))
#define CONTEXT_reset_given_lvalue_ty(c)   ((c).given_ty = TY_IDX_ZERO)
#define CONTEXT_srcpos(c)   (c).srcpos
#define CONTEXT_set_srcpos(c, pos)   ((c).srcpos = pos)
#define CONTEXT_reset_srcpos(c)   (void)((c).srcpos = 0LLU)
#define CONTEXT_NEEDS_LVALUE   0x000000001 /* Context could use an lvalue */
#define CONTEXT_NEW_FUNC_SCOPE   0x000000002 /* New function scope */
#define CONTEXT_UNQUALIFIED_TY2C   0x000000004 /* Emit unqualified C type */
#define CONTEXT_INCOMPLETE_TY2C   0x000000008 /* Emit incomplete C type */
#define CONTEXT_TOP_LEVEL_EXPR   0x000000010 /* Top-level of an expression */
#define CONTEXT_ARRAY_BASETYPE   0x000000020 /* Context suggests array type */
#define CONTEXT_LVALUE_TYPE   0x000000040 /* Context suggests lvalue type */
#define CONTEXT_OMP_PRAGMA   0x000000080 /* Processing an Open MP pragma */
#define CONTEXT_reset_flags(c)   ((c).flags = 0U)
#define CONTEXT_needs_lvalue(c)   ((c).flags & CONTEXT_NEEDS_LVALUE)
#define CONTEXT_set_needs_lvalue(c)   ((c).flags = (c).flags | CONTEXT_NEEDS_LVALUE)
#define CONTEXT_reset_needs_lvalue(c)   ((c).flags = (c).flags & ~CONTEXT_NEEDS_LVALUE)
#define CONTEXT_new_func_scope(c)   ((c).flags & CONTEXT_NEW_FUNC_SCOPE)
#define CONTEXT_set_new_func_scope(c)   ((c).flags = (c).flags | CONTEXT_NEW_FUNC_SCOPE)
#define CONTEXT_reset_new_func_scope(c)   ((c).flags = (c).flags & ~CONTEXT_NEW_FUNC_SCOPE)
#define CONTEXT_unqualified_ty2c(c)   ((c).flags & CONTEXT_UNQUALIFIED_TY2C)
#define CONTEXT_set_unqualified_ty2c(c)   ((c).flags = (c).flags | CONTEXT_UNQUALIFIED_TY2C)
#define CONTEXT_reset_unqualified_ty2c(c)   ((c).flags = (c).flags & ~CONTEXT_UNQUALIFIED_TY2C)
#define CONTEXT_incomplete_ty2c(c)   ((c).flags & CONTEXT_INCOMPLETE_TY2C)
#define CONTEXT_set_incomplete_ty2c(c)   ((c).flags = (c).flags | CONTEXT_INCOMPLETE_TY2C)
#define CONTEXT_reset_incomplete_ty2c(c)   ((c).flags = (c).flags & ~CONTEXT_INCOMPLETE_TY2C)
#define CONTEXT_top_level_expr(c)   ((c).flags & CONTEXT_TOP_LEVEL_EXPR)
#define CONTEXT_set_top_level_expr(c)   ((c).flags = (c).flags | CONTEXT_TOP_LEVEL_EXPR)
#define CONTEXT_reset_top_level_expr(c)   ((c).flags = (c).flags & ~CONTEXT_TOP_LEVEL_EXPR)
#define CONTEXT_array_basetype(c)   ((c).flags & CONTEXT_ARRAY_BASETYPE)
#define CONTEXT_set_array_basetype(c)   ((c).flags = (c).flags | CONTEXT_ARRAY_BASETYPE)
#define CONTEXT_reset_array_basetype(c)   ((c).flags = (c).flags & ~CONTEXT_ARRAY_BASETYPE)
#define CONTEXT_lvalue_type(c)   ((c).flags & CONTEXT_LVALUE_TYPE)
#define CONTEXT_set_lvalue_type(c)   ((c).flags = (c).flags | CONTEXT_LVALUE_TYPE)
#define CONTEXT_reset_lvalue_type(c)   ((c).flags = (c).flags & ~CONTEXT_LVALUE_TYPE)
#define CONTEXT_omp(c)   ((c).flags & CONTEXT_OMP_PRAGMA)
#define CONTEXT_set_omp(c)   ((c).flags = (c).flags | CONTEXT_OMP_PRAGMA)
#define CONTEXT_reset_omp(c)   ((c).flags = (c).flags & ~CONTEXT_OMP_PRAGMA)
#define WHIRL2C_number_as_c_name(number)   Number_as_String(number, "_%lld")
#define WHIRL2C_ptr_as_c_name(ptr)   Concat2_Strings("_", Ptr_as_String(ptr))

Typedefs

typedef struct Context CONTEXT

Functions

const char * WHIRL2C_make_valid_c_name (const char *name)
void WHIRL2C_parenthesize (TOKEN_BUFFER tokens)

Variables

int compiling_upc_flag

Define Documentation

#define CONTEXT_ARRAY_BASETYPE   0x000000020 /* Context suggests array type */

Definition at line 145 of file whirl2c_common.h.

#define CONTEXT_array_basetype (   c)    ((c).flags & CONTEXT_ARRAY_BASETYPE)

Definition at line 182 of file whirl2c_common.h.

Referenced by WN2C_array().

#define CONTEXT_given_base_ty (   c)    (c).given_ty

Definition at line 125 of file whirl2c_common.h.

Referenced by WN2C_array().

#define CONTEXT_given_lvalue_ty (   c)    (c).given_ty

Definition at line 130 of file whirl2c_common.h.

Referenced by WN2C_address_add(), and WN2C_parm().

#define CONTEXT_INCOMPLETE_TY2C   0x000000008 /* Emit incomplete C type */

Definition at line 143 of file whirl2c_common.h.

#define CONTEXT_incomplete_ty2c (   c)    ((c).flags & CONTEXT_INCOMPLETE_TY2C)

Definition at line 170 of file whirl2c_common.h.

Referenced by TY2C_array().

#define CONTEXT_LVALUE_TYPE   0x000000040 /* Context suggests lvalue type */

Definition at line 146 of file whirl2c_common.h.

#define CONTEXT_lvalue_type (   c)    ((c).flags & CONTEXT_LVALUE_TYPE)

Definition at line 188 of file whirl2c_common.h.

Referenced by WN2C_address_add().

#define CONTEXT_NEEDS_LVALUE   0x000000001 /* Context could use an lvalue */

Definition at line 140 of file whirl2c_common.h.

#define CONTEXT_needs_lvalue (   c)    ((c).flags & CONTEXT_NEEDS_LVALUE)

Definition at line 152 of file whirl2c_common.h.

Referenced by WN2C_array(), and WN2C_lda().

#define CONTEXT_NEW_FUNC_SCOPE   0x000000002 /* New function scope */

Definition at line 141 of file whirl2c_common.h.

#define CONTEXT_new_func_scope (   c)    ((c).flags & CONTEXT_NEW_FUNC_SCOPE)

Definition at line 158 of file whirl2c_common.h.

Referenced by WN2C_block().

#define CONTEXT_OMP_PRAGMA   0x000000080 /* Processing an Open MP pragma */

Definition at line 147 of file whirl2c_common.h.

#define CONTEXT_reset (   c)
Value:
(void)(CONTEXT_reset_flags(c), \
          CONTEXT_reset_srcpos(c), \
          CONTEXT_reset_given_base_ty(c))

Definition at line 119 of file whirl2c_common.h.

Referenced by Append_Nest_Clauses(), INITV2C_symoff(), ST2C_Declare_Tempvar(), TY2C_Prepend_Alignment_Type(), TY2C_translate_unqualified(), W2C_Fini(), W2C_Init(), and Write_Typedef().

#define CONTEXT_reset_array_basetype (   c)    ((c).flags = (c).flags & ~CONTEXT_ARRAY_BASETYPE)

Definition at line 185 of file whirl2c_common.h.

Referenced by WN2C_array().

#define CONTEXT_reset_flags (   c)    ((c).flags = 0U)

Definition at line 150 of file whirl2c_common.h.

#define CONTEXT_reset_given_base_ty (   c)    ((c).given_ty = TY_IDX_ZERO)

Definition at line 127 of file whirl2c_common.h.

#define CONTEXT_reset_given_lvalue_ty (   c)    ((c).given_ty = TY_IDX_ZERO)

Definition at line 132 of file whirl2c_common.h.

Referenced by WN2C_parm().

#define CONTEXT_reset_lvalue_type (   c)    ((c).flags = (c).flags & ~CONTEXT_LVALUE_TYPE)

Definition at line 191 of file whirl2c_common.h.

Referenced by WN2C_address_add().

#define CONTEXT_reset_new_func_scope (   c)    ((c).flags = (c).flags & ~CONTEXT_NEW_FUNC_SCOPE)

Definition at line 161 of file whirl2c_common.h.

Referenced by WN2C_block().

#define CONTEXT_reset_omp (   c)    ((c).flags = (c).flags & ~CONTEXT_OMP_PRAGMA)

Definition at line 197 of file whirl2c_common.h.

#define CONTEXT_reset_srcpos (   c)    (void)((c).srcpos = 0LLU)

Definition at line 137 of file whirl2c_common.h.

#define CONTEXT_reset_unqualified_ty2c (   c)    ((c).flags = (c).flags & ~CONTEXT_UNQUALIFIED_TY2C)

Definition at line 167 of file whirl2c_common.h.

Referenced by TY2C_complete_struct(), TY2C_function(), and TY2C_pointer().

#define CONTEXT_set_array_basetype (   c)    ((c).flags = (c).flags | CONTEXT_ARRAY_BASETYPE)

Definition at line 183 of file whirl2c_common.h.

Referenced by WN2C_lvalue_wn().

#define CONTEXT_set_given_base_ty (   c,
  ty 
)    ((c).given_ty = (ty))

Definition at line 126 of file whirl2c_common.h.

Referenced by WN2C_lvalue_wn().

#define CONTEXT_set_given_lvalue_ty (   c,
  ty 
)    ((c).given_ty = (ty))

Definition at line 131 of file whirl2c_common.h.

Referenced by WN2C_call(), and WN2C_lvalue_wn().

#define CONTEXT_set_lvalue_type (   c)    ((c).flags = (c).flags | CONTEXT_LVALUE_TYPE)

Definition at line 189 of file whirl2c_common.h.

Referenced by WN2C_address_add(), and WN2C_lvalue_wn().

#define CONTEXT_set_needs_lvalue (   c)    ((c).flags = (c).flags | CONTEXT_NEEDS_LVALUE)

Definition at line 153 of file whirl2c_common.h.

Referenced by WN2C_array(), and WN2C_lvalue_wn().

#define CONTEXT_set_new_func_scope (   c)    ((c).flags = (c).flags | CONTEXT_NEW_FUNC_SCOPE)

Definition at line 159 of file whirl2c_common.h.

Referenced by WN2C_func_entry().

#define CONTEXT_set_omp (   c)    ((c).flags = (c).flags | CONTEXT_OMP_PRAGMA)

Definition at line 195 of file whirl2c_common.h.

Referenced by WN2C_process_pragma().

#define CONTEXT_set_unqualified_ty2c (   c)    ((c).flags = (c).flags | CONTEXT_UNQUALIFIED_TY2C)
#define CONTEXT_TOP_LEVEL_EXPR   0x000000010 /* Top-level of an expression */

Definition at line 144 of file whirl2c_common.h.

#define CONTEXT_top_level_expr (   c)    ((c).flags & CONTEXT_TOP_LEVEL_EXPR)

Definition at line 176 of file whirl2c_common.h.

Referenced by WN2C_address_add(), and WN2C_infix_op().

#define CONTEXT_UNQUALIFIED_TY2C   0x000000004 /* Emit unqualified C type */

Definition at line 142 of file whirl2c_common.h.

#define CONTEXT_unqualified_ty2c (   c)    ((c).flags & CONTEXT_UNQUALIFIED_TY2C)

Definition at line 164 of file whirl2c_common.h.

Referenced by TY2C_prepend_qualifiers().

#define WHIRL2C_number_as_c_name (   number)    Number_as_String(number, "_%lld")

Definition at line 206 of file whirl2c_common.h.

Referenced by WN2C_append_label_name().

#define WHIRL2C_ptr_as_c_name (   ptr)    Concat2_Strings("_", Ptr_as_String(ptr))

Definition at line 207 of file whirl2c_common.h.


Typedef Documentation

typedef struct Context CONTEXT

Function Documentation

const char* WHIRL2C_make_valid_c_name ( const char *  name)

Definition at line 68 of file whirl2c_common.cxx.

References Get_Name_Buf_Slot(), name, NULL, and strcpy.

Referenced by Unparse_Target_C::Make_Valid_Name(), ST2C_Define_A_Common_Block(), and ST2C_Get_Common_Block_Name().

Here is the call graph for this function:


Variable Documentation

Definition at line 71 of file driver_util.cxx.

Referenced by Process_Command_Line().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines