Open64 (mfef90, whirl2f, and IR tools)
TAG: version-openad; SVN changeset: 916
|
#include "mempool.h"
Go to the source code of this file.
Defines | |
#define | CXX_USE_STANDARD_NEW_AND_DELETE |
#define | CXX_NEW(constructor, mempool) (new constructor) |
#define | CXX_NEW_ARRAY(constructor, elements, mempool) (new constructor[elements]) |
#define | CXX_DELETE(pointer, mempool) (delete pointer) |
#define | CXX_DELETE_ARRAY(pointer, mempool) (delete[] pointer) |
#define CXX_DELETE | ( | pointer, | |
mempool | |||
) | (delete pointer) |
Definition at line 135 of file cxx_memory.h.
Referenced by Anl_Fini(), Anl_Static_Analysis(), PROJECTED_REGION::Compare(), cwh_auxst_un_register_table(), Delete_Scope(), DRA_Finalize(), DRA_Processing(), dV_view_whirl(), ANL_FUNC_ENTRY::Emit_Dir_Entries(), emit_inits_for_symbol(), ANL_FUNC_ENTRY::Emit_Nested_Original_Constructs(), ANL_FUNC_ENTRY::Emit_Original_Construct(), IPO_ADDR_HASH::Reset_Lookup(), Stab_finalize_flags(), ANL_FUNC_ENTRY::~ANL_FUNC_ENTRY(), ANL_VARLIST::~ANL_VARLIST(), BINARY_TREE< BINARY_NODE >::~BINARY_TREE(), BINARY_TREE_NODE< BINARY_NODE >::~BINARY_TREE_NODE(), and GOTO_TABLE::~GOTO_TABLE().
#define CXX_DELETE_ARRAY | ( | pointer, | |
mempool | |||
) | (delete[] pointer) |
Definition at line 138 of file cxx_memory.h.
Referenced by BE_symtab_alloc_scope_level(), DRA_Set_Write_Location(), OPTIONS_STACK::Pop_Current_Options(), ANL_CBUF::Write_Char(), ANL_CBUF::Write_String(), ANL_CBUF::~ANL_CBUF(), W2CF_TRANSLATOR::~W2CF_TRANSLATOR(), and W2FC_FLAG_ARRAY::~W2FC_FLAG_ARRAY().
#define CXX_NEW | ( | constructor, | |
mempool | |||
) | (new constructor) |
Definition at line 129 of file cxx_memory.h.
Referenced by Anl_Init(), Anl_Static_Analysis(), BE_symtab_alloc_scope_level(), LOOPINFO::Build_linex(), CFG_NODE_INFO::CFG_NODE_INFO(), PROJECTED_REGION::Compare(), PROJECTED_NODE::Copy(), create_ipa_internal_name(), LOOPINFO::Create_linex(), PROJECTED_NODE::Create_linex(), cwh_auxst_register_table(), DRA_Add_Clone(), DRA_Clone_Initialize(), DRA_Initialize(), DRA_Mangle_All(), DRA_Mangle_Call_Site(), DRA_Mangle_Entry(), DRA_Process_Requests(), DRA_Processing(), dV_view_whirl(), ANL_FUNC_ENTRY::Emit_Nested_Original_Constructs(), BINARY_TREE_NODE< BINARY_NODE >::Enter(), BINARY_TREE< BINARY_NODE >::Enter(), fei_static_base(), ANL_VARLIST::Find_or_Insert(), Get_Original_Type(), PROJECTED_NODE::Init(), PROJECTED_KERNEL::Init(), REGION_ARRAYS::Init(), CFG_NODE_INFO::Init(), ARRAY_SUMMARY::Init(), IPO_ADDR_HASH::Insert(), IPO_CLONE::IPO_CLONE(), IPO_SYMTAB::IPO_SYMTAB(), LOOPINFO::LOOPINFO(), main(), PROJECTED_REGION::Map_to_linex_array(), LOOPINFO::Max_value(), PROJECTED_REGION::May_Union(), MemCtr_Add(), LINEX::Merge(), LOOPINFO::Min_value(), New_DRA(), New_Scope(), Preprocess_PU(), Process_Fill_Align_Pragmas(), PROJECTED_KERNEL::Project(), PROJECTED_REGION::PROJECTED_REGION(), Projected_Region_From_Access_Array(), Projected_Region_From_St(), REGION_ARRAYS::REGION_ARRAYS(), Save_Local_Symtab(), PROJECTED_NODE::Set_constant_linexs(), PROJECTED_NODE::Set_constant_two_strided_section(), PROJECTED_REGION::Set_region(), PROJECTED_NODE::Set_to_kernel_image(), Stab_initialize_flags(), and LINEX::Subtract().
#define CXX_NEW_ARRAY | ( | constructor, | |
elements, | |||
mempool | |||
) | (new constructor[elements]) |
Definition at line 132 of file cxx_memory.h.
Referenced by ANL_CBUF::_Alloc(), Menu_info::Add(), BE_symtab_alloc_scope_level(), PROJECTED_REGION::Compare(), DRA_INFO::DRA_INFO(), DRA_New_Clone_Sig(), DRA_Open_And_Map_File(), PROJECTED_KERNEL::Init(), ir_a2b::MapStrToEnum(), ir_a2b::MapStrToFlags(), PROJECTED_REGION::May_Union(), DaVinci::Parse_Node_Ids(), PROJECTED_KERNEL::Project(), OPTIONS_STACK::Push_Current_Options(), Menu_info::Set(), OPTIONS_STACK::str2argv(), W2CF_TRANSLATOR::W2CF_TRANSLATOR(), and W2FC_FLAG_ARRAY::W2FC_FLAG_ARRAY().
#define CXX_USE_STANDARD_NEW_AND_DELETE |
Description:
C++ macro replacements for new and delete using memory pools. new and delete should never be used in the compiler; these should be used instead.
Exported preprocessor macro
CXX_USE_STANDARD_NEW_AND_DELETE
If this preprocessor macro is defined, then the macros below just ignore the memory pools and call the normal new and delete.
Exported functions:
CXX_NEW(constructor, MEM_POOL*)
Use CXX_NEW instead of new. E.g.
X* x = new X(3,4);
should be replaced by
X* x = CXX_NEW(X(3,4), malloc_pool);
(or whatever appropriate pool name).
CXX_NEW_ARRAY(constructor, elements, MEM_POOL*)
Use CXX_NEW_ARRAY instead of new []. E.g.
X* x = new X[a*b];
should be replaced by
X* x = CXX_NEW_ARRAY(X, a*b, malloc_pool);
(or whatever appropriate pool name).
CXX_NEW_VARIANT(constructor, pad, MEM_POOL*)
Like CXX_NEW allocates an instance of type "constructor"
but allocates "pad" amount of extra storage
Could be viewed as X* x = (X*) malloc (sizeof(X)+pad)
Followed by a call to the constructor for X.
There is no C++ equivalent. Therefore not available when using
standard new and delete.
CXX_DELETE(pointer, MEM_POOL*)
Use CXX_DELETE instead of delete. E.g.
delete p;
should be replaced by
(or whatever appropriate pool name).
CXX_DELETE_ARRAY(pointer, MEM_POOL*)
Use CXX_DELETE_ARRAY instead of delete[]. E.g.
delete[] p;
should be replaced by
CXX_DELETE_ARRAY(p, malloc_pool);
(or whatever appropriate pool name).
Definition at line 126 of file cxx_memory.h.