GCC Middle and Back End API Reference
early-remat.cc File Reference
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "rtl.h"
#include "df.h"
#include "tree-pass.h"
#include "memmodel.h"
#include "emit-rtl.h"
#include "insn-config.h"
#include "recog.h"
#include "tree.h"
#include "expr.h"
#include "target.h"
#include "inchash.h"
#include "rtlhash.h"
#include "print-rtl.h"
#include "rtl-iter.h"
#include "regs.h"
#include "function-abi.h"
Include dependency graph for early-remat.cc:

Macros

#define FAILURE_FORMAT   ";; Can't rematerialize set of reg %d in %d[bb:%d]: "
 
#define FAILURE_ARGS   regno, INSN_UID (insn), BLOCK_FOR_INSN (insn)->index
 

Functions

static bool scratch_equal (const_rtx *x, const_rtx *y, rtx *nx, rtx *ny)
 
bool empty_p (bitmap b)
 
static int compare_candidates (const void *x_in, const void *y_in)
 
static bool available_across_edge_p (edge e)
 
rtl_opt_passmake_pass_early_remat (gcc::context *ctxt)
 

Variables

static unsigned int * rpo_index
 

Macro Definition Documentation

◆ FAILURE_ARGS

#define FAILURE_ARGS   regno, INSN_UID (insn), BLOCK_FOR_INSN (insn)->index

◆ FAILURE_FORMAT

#define FAILURE_FORMAT   ";; Can't rematerialize set of reg %d in %d[bb:%d]: "

Function Documentation

◆ available_across_edge_p()

static bool available_across_edge_p ( edge e)
inlinestatic
Return true if available values survive across edge E.   

◆ compare_candidates()

static int compare_candidates ( const void * x_in,
const void * y_in )
static
Order remat_candidates X_IN and Y_IN according to the cfg postorder.   

References BLOCK_FOR_INSN(), DF_INSN_LUID, basic_block_def::index, rpo_index, and y.

◆ empty_p()

bool empty_p ( bitmap b)
inline
Return true if B is null or empty.   

References b, and bitmap_empty_p().

Referenced by finalize_type_size(), and push_fields_onto_fieldstack().

◆ make_pass_early_remat()

rtl_opt_pass * make_pass_early_remat ( gcc::context * ctxt)

◆ scratch_equal()

static bool scratch_equal ( const_rtx * x,
const_rtx * y,
rtx * nx,
rtx * ny )
static
rtx_equal_p callback that treats any two SCRATCHes as equal.
This allows us to compare two copies of a pattern, even though their
SCRATCHes are always distinct.   

References const0_rtx, GET_CODE, and y.

Variable Documentation

◆ rpo_index

unsigned int* rpo_index
static
Maps basic block indices to their position in the forward RPO.   

Referenced by compare_candidates().