Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
ir_bcom.cxx File Reference
#include <unistd.h>
#include <sys/mman.h>
#include <string.h>
#include <errno.h>
#include <elf.h>
#include <sys/elf_whirl.h>
#include "defs.h"
#include "alignof.h"
#include "erglob.h"
#include "errors.h"
#include "opcode.h"
#include "mempool.h"
#include "wn.h"
#include "wn_map.h"
#include "strtab.h"
#include "symtab.h"
#include "irbdata.h"
#include "dwarf_DST_mem.h"
#include "pu_info.h"
#include "ir_bwrite.h"
#include "ir_bcom.h"
#include <vector>
Include dependency graph for ir_bcom.cxx:

Go to the source code of this file.

Classes

struct  WRITE_TABLE_OP< T >

Defines

#define USE_STANDARD_TYPES   /* override unwanted defines in "defs.h" */
#define USE_DST_INTERNALS
#define MAPPED_SIZE   0x400000
#define INIT_TMP_MAPPED_SIZE   MAPPED_SIZE
#define DEFAULT_NUM_OF_PREFETCHES   64
#define DEFAULT_NUM_ALIAS_CLASSES   128
#define DEFAULT_NUM_AC_INTERNALS   128
#define WN_ADDR(offset)   ((WN *)(fl->map_addr + offset))

Functions

Elf64_Word ir_b_save_buf (const void *buf, Elf64_Word size, unsigned int align, unsigned int padding, Output_File *fl)
Elf64_Word ir_b_copy_file (const void *buf, Elf64_Word size, void *tmpfl)
static void save_buf_at_offset (const void *buf, Elf64_Word size, off_t offset, Output_File *fl)
static Elf64_Word ir_b_reserve_space (Elf64_Word size, unsigned int align, Output_File *fl)
char * ir_b_grow_map (Elf64_Word min_size, Output_File *fl)
char * ir_b_create_map (Output_File *fl)
Elf64_Word ir_b_write_tree (WN *node, off_t base_offset, Output_File *fl, WN_MAP off_map)
template<class TABLE >
Elf64_Word write_table (TABLE &fld, off_t base_offset, Output_File *fl)
static Elf64_Word write_file_info (off_t base_offset, Output_File *fl)
Elf64_Word ir_b_write_global_symtab (off_t base_offset, Output_File *fl)
Elf64_Word ir_b_write_local_symtab (const SCOPE &pu, off_t base_offset, Output_File *fl)
Elf64_Word ir_b_write_dst (DST_TYPE dst, off_t base_offset, Output_File *fl)

Variables

WN ** prefetch_ldsts
INT num_prefetch_ldsts
INT max_num_prefetch_ldsts
WN ** alias_classes
INT num_alias_class_nodes
INT max_alias_class_nodes
WN ** ac_internals
INT num_ac_internal_nodes
INT max_ac_internal_nodes
char * Whirl_Revision = WHIRL_REVISION
void * IPAA_Local_Map = NULL
BOOL Doing_mmapped_io = FALSE
WNstaticNode

Define Documentation

#define DEFAULT_NUM_AC_INTERNALS   128

Definition at line 86 of file ir_bcom.cxx.

Referenced by ir_b_write_tree().

#define DEFAULT_NUM_ALIAS_CLASSES   128

Definition at line 81 of file ir_bcom.cxx.

Referenced by ir_b_write_tree().

#define DEFAULT_NUM_OF_PREFETCHES   64

Definition at line 76 of file ir_bcom.cxx.

Referenced by ir_b_write_tree().

Definition at line 73 of file ir_bcom.cxx.

Referenced by ir_b_create_map().

#define MAPPED_SIZE   0x400000

Definition at line 72 of file ir_bcom.cxx.

Referenced by ir_b_grow_map().

Definition at line 64 of file ir_bcom.cxx.

#define USE_STANDARD_TYPES   /* override unwanted defines in "defs.h" */

Definition at line 50 of file ir_bcom.cxx.

#define WN_ADDR (   offset)    ((WN *)(fl->map_addr + offset))

Referenced by ir_b_write_tree().


Function Documentation

Elf64_Word ir_b_copy_file ( const void *  buf,
Elf64_Word  size,
void *  tmpfl 
)

Definition at line 131 of file ir_bcom.cxx.

References Current_Output, Doing_mmapped_io, FALSE, output_file::file_size, ir_b_grow_map(), output_file::map_addr, output_file::mapped_size, size, and TRUE.

Here is the call graph for this function:

static Elf64_Word ir_b_reserve_space ( Elf64_Word  size,
unsigned int  align,
Output_File fl 
) [static]

Definition at line 162 of file ir_bcom.cxx.

References output_file::file_size, ir_b_align(), ir_b_grow_map(), output_file::mapped_size, and size.

Referenced by ir_b_write_global_symtab(), and ir_b_write_local_symtab().

Here is the call graph for this function:

Elf64_Word ir_b_write_dst ( DST_TYPE  dst,
off_t  base_offset,
Output_File fl 
)

Definition at line 562 of file ir_bcom.cxx.

References ALIGNOF, Current_DST, ir_b_save_buf(), and size.

Referenced by WN_write_dst().

Here is the call graph for this function:

static void save_buf_at_offset ( const void *  buf,
Elf64_Word  size,
off_t  offset,
Output_File fl 
) [static]
static Elf64_Word write_file_info ( off_t  base_offset,
Output_File fl 
) [static]

Definition at line 432 of file ir_bcom.cxx.

References ALIGNOF, File_info, output_file::file_size, ir_b_align(), and ir_b_save_buf().

Referenced by ir_b_write_global_symtab().

Here is the call graph for this function:

template<class TABLE >
Elf64_Word write_table ( TABLE &  fld,
off_t  base_offset,
Output_File fl 
)

Definition at line 416 of file ir_bcom.cxx.

References ALIGNOF, output_file::file_size, For_all_blocks(), and ir_b_align().

Referenced by ir_b_write_global_symtab(), and ir_b_write_local_symtab().

Here is the call graph for this function:


Variable Documentation

Definition at line 87 of file ir_bcom.cxx.

Definition at line 82 of file ir_bcom.cxx.

Definition at line 98 of file ir_bcom.cxx.

Definition at line 89 of file ir_bcom.cxx.

Referenced by ir_b_write_tree(), and WN_write_tree().

Definition at line 84 of file ir_bcom.cxx.

Referenced by ir_b_write_tree(), and WN_write_tree().

Definition at line 79 of file ir_bcom.cxx.

Referenced by ir_b_write_tree(), and WN_write_tree().

Definition at line 88 of file ir_bcom.cxx.

Referenced by ir_b_write_tree(), and WN_write_tree().

Definition at line 83 of file ir_bcom.cxx.

Referenced by ir_b_write_tree(), and WN_write_tree().

Definition at line 78 of file ir_bcom.cxx.

Referenced by ir_b_write_tree(), and WN_write_tree().

Definition at line 77 of file ir_bcom.cxx.

Definition at line 234 of file ir_bcom.cxx.

Definition at line 93 of file ir_bcom.cxx.

Referenced by WN_write_revision().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines