GCC Middle and Back End API Reference
|
#include <cfghooks.h>
@verbatim
Hooks for cfg representation specific functions. Copyright (C) 2003-2013 Free Software Foundation, Inc. Contributed by Sebastian Pop s.pop @lap oste. net
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see http://www.gnu.org/licenses/.
Only basic-block.h includes this.
void(* cfg_hooks::account_profile_record)(basic_block, int, struct profile_record *) |
Do book-keeping of a basic block for the profile consistency checker.
bool(* cfg_hooks::block_ends_with_call_p)(basic_block) |
Say whether a block ends with a call, possibly followed by some other code that must stay with the call.
bool(* cfg_hooks::block_ends_with_condjump_p)(const_basic_block) |
Say whether a block ends with a conditional branch. Switches and unconditional branches do not qualify.
bool(* cfg_hooks::can_duplicate_block_p)(const_basic_block a) |
Return true when block A can be duplicated.
bool(* cfg_hooks::can_merge_blocks_p)(basic_block a, basic_block b) |
Return true when blocks A and B can be merged into single basic block.
bool(* cfg_hooks::can_remove_branch_p)(const_edge) |
Returns true if it is possible to remove the edge by redirecting it to the destination of the other edge going from its source.
bool(* cfg_hooks::cfg_hook_duplicate_loop_to_header_edge)(struct loop *, edge, unsigned, sbitmap, edge, vec< edge > *, int) |
A hook for duplicating loop in CFG, currently this is used in loop versioning.
Referenced by block_ends_with_condjump_p().
basic_block(* cfg_hooks::create_basic_block)(void *head, void *end, basic_block after) |
Basic CFG manipulation.
Return new basic block.
void(* cfg_hooks::delete_basic_block)(basic_block) |
Remove statements corresponding to a given basic block.
void(* cfg_hooks::dump_bb)(FILE *, basic_block, int, int) |
void(* cfg_hooks::dump_bb_for_graph)(pretty_printer *, basic_block) |
basic_block(* cfg_hooks::duplicate_block)(basic_block a) |
Duplicate block A.
bool(* cfg_hooks::empty_block_p)(basic_block) |
True if a block contains no executable instructions.
void(* cfg_hooks::execute_on_growing_pred)(edge) |
This function is called immediately after edge E is added to the edge vector E->dest->preds.
void(* cfg_hooks::execute_on_shrinking_pred)(edge) |
This function is called immediately before edge E is removed from the edge vector E->dest->preds.
void(* cfg_hooks::extract_cond_bb_edges)(basic_block, edge *, edge *) |
Given a condition BB extract the true/false taken/not taken edges (depending if we are on tree's or RTL).
Referenced by flow_call_edges_add().
int(* cfg_hooks::flow_call_edges_add)(sbitmap) |
Add fake edges to the function exit for any non constant and non noreturn calls, volatile inline assembly in the bitmap of blocks specified by BLOCKS or to the whole CFG if BLOCKS is zero. Return the number of blocks that were split. The goal is to expose cases in which entering a basic block does not imply that all subsequent instructions must be executed.
void(* cfg_hooks::flush_pending_stmts)(edge) |
Add PHI arguments queued in PENDINT_STMT list on edge E to edge E->dest (only in tree-ssa loop versioning.
Referenced by block_ends_with_call_p().
basic_block(* cfg_hooks::force_nonfallthru)(edge) |
Make the edge non-fallthru.
Referenced by tidy_fallthru_edge().
void(* cfg_hooks::lv_add_condition_to_bb)(basic_block, basic_block, basic_block, void *) |
Add condition to new basic block and update CFG used in loop versioning.
void(* cfg_hooks::lv_adjust_loop_header_phi)(basic_block, basic_block, basic_block, edge) |
Update the PHI nodes in case of loop versioning.
void(* cfg_hooks::make_forwarder_block)(edge) |
void(* cfg_hooks::merge_blocks)(basic_block a, basic_block b) |
Merge blocks A and B.
bool(* cfg_hooks::move_block_after)(basic_block b, basic_block a) |
Move block B immediately after block A.
const char* cfg_hooks::name |
Name of the corresponding ir.
Referenced by redirect_edge_succ_nodup(), and tidy_fallthru_edge().
void(* cfg_hooks::predict_edge)(edge e, enum br_predictor predictor, int probability) |
Predict edge E using PREDICTOR to given PROBABILITY.
bool(* cfg_hooks::predicted_by_p)(const_basic_block bb, enum br_predictor predictor) |
Return true if the one of outgoing edges is already predicted by PREDICTOR.
edge(* cfg_hooks::redirect_edge_and_branch)(edge e, basic_block b) |
Redirect edge E to the given basic block B and update underlying program representation. Returns edge representing redirected branch (that may not be equivalent to E in the case of duplicate edges being removed) or NULL if edge is not easily redirectable for whatever reason.
basic_block(* cfg_hooks::redirect_edge_and_branch_force)(edge, basic_block) |
Same as the above but allows redirecting of fallthru edges. In that case newly created forwarder basic block is returned. The edge must not be abnormal.
Referenced by redirect_edge_succ_nodup().
basic_block(* cfg_hooks::split_block)(basic_block b, void *i) |
Creates a new basic block just after basic block B by splitting everything after specified instruction I.
basic_block(* cfg_hooks::split_block_before_cond_jump)(basic_block) |
Split a basic block if it ends with a conditional branch and if the other part of the block is not empty.
basic_block(* cfg_hooks::split_edge)(edge) |
Higher level functions representable by primitive operations above if we didn't have some oddities in RTL and Tree representations.
void(* cfg_hooks::tidy_fallthru_edge)(edge) |
Try to make the edge fallthru.
int(* cfg_hooks::verify_flow_info)(void) |
Debugging.