|
GCC Middle and Back End API Reference
|
#include "config.h"#include "system.h"#include "coretypes.h"#include "backend.h"#include "tree.h"#include "gimple.h"#include "tree-pass.h"#include "ssa.h"#include "gimple-iterator.h"#include "tree-cfg.h"#include "cfgloop.h"#include "hierarchical_discriminator.h"#include "cfghooks.h"#include "diagnostic-core.h"#include "function.h"#include "rtl.h"#include "basic-block.h"
Functions | |
| static location_t | update_location_discriminator (location_t loc, unsigned int multiplicity_factor, unsigned int copyid) |
| void | assign_discriminators_to_stmt (gimple *stmt, unsigned int multiplicity_factor, unsigned int copyid) |
| void | assign_discriminators_to_bb (basic_block bb, unsigned int multiplicity_factor, unsigned int copyid) |
| void | assign_discriminators_to_loop (class loop *loop, unsigned int multiplicity_factor, unsigned int copyid) |
| static void | record_existing_copyid (location_t loc, struct function *fn) |
| static void | init_copyid_allocator (struct function *fn) |
| unsigned int | allocate_copyid_base (location_t loc, unsigned int stride) |
| void | free_copyid_allocator (struct function *fn) |
| unsigned int allocate_copyid_base | ( | location_t | loc, |
| unsigned int | stride ) |
Allocate a unique copy_id base for the given location. STRIDE indicates how many copy_ids to reserve (for unrolling N times, use stride=N). Returns the base copy_id.
References cfun, DISCR_COPYID_MAX, get_pure_location(), init_copyid_allocator(), and UNKNOWN_LOCATION.
Referenced by duplicate_loop_body_to_header_edge(), vect_do_peeling(), vect_loop_versioning(), and vect_transform_loop().
| void assign_discriminators_to_bb | ( | basic_block | bb, |
| unsigned int | multiplicity_factor, | ||
| unsigned int | copyid ) |
Assign discriminators to all statements in a basic block. This function updates the multiplicity and/or copyid discriminator components for all statements in the given basic block, while preserving the base discriminator. If multiplicity_factor > 0, multiply existing multiplicity by this factor. If copyid > 0, set it to this value.
References FOR_EACH_EDGE, gimple_location(), gimple_set_location(), gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_start_phis(), gsi_stmt(), is_gimple_debug(), gphi_iterator::phi(), basic_block_def::succs, UNKNOWN_LOCATION, and update_location_discriminator().
Referenced by assign_discriminators_to_loop(), and duplicate_loop_body_to_header_edge().
| void assign_discriminators_to_loop | ( | class loop * | loop, |
| unsigned int | multiplicity_factor, | ||
| unsigned int | copyid ) |
Assign discriminators to all basic blocks in a loop. This function is used by loop versioning passes to assign version IDs and vectorization factors to all statements in a loop version.
References assign_discriminators_to_bb(), free(), get_loop_body(), i, and loop::num_nodes.
Referenced by vect_do_peeling(), vect_loop_versioning(), and vect_transform_loop().
| void assign_discriminators_to_stmt | ( | gimple * | stmt, |
| unsigned int | multiplicity_factor, | ||
| unsigned int | copyid ) |
Assign discriminators to a statement Updates the multiplicity and/or copyid discriminator components for all statements in the given basic block, while preserving the base discriminator. If multiplicity_factor > 0, multiply existing multiplicity by this factor. If copyid > 0, set it to this value.
References gimple_location(), gimple_set_location(), UNKNOWN_LOCATION, and update_location_discriminator().
| void free_copyid_allocator | ( | struct function * | fn | ) |
Free the copy_id allocator for a function. Called when the function is being destroyed.
References function::copyid_alloc, copyid_allocator::location_map, and NULL.
|
static |
Initialize the per-function copyid allocator. Walks the function body to find existing max copyids per location.
References function::copyid_alloc, current_ir_type(), FOR_BB_INSNS, FOR_EACH_BB_FN, FOR_EACH_EDGE, gimple_location(), gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_start_phis(), gsi_stmt(), copyid_allocator::initialized, INSN_LOCATION(), INSN_P, IR_GIMPLE, copyid_allocator::location_map, gphi_iterator::phi(), record_existing_copyid(), basic_block_def::succs, and UNKNOWN_LOCATION.
Referenced by allocate_copyid_base().
|
static |
Helper to update the copyid allocator map with a location's existing copyid. If the location has a non-zero copyid, record that we need to start allocating from copyid+1 for this location.
References function::copyid_alloc, DISCR_COPYID_MASK, DISCR_COPYID_MAX, DISCR_COPYID_SHIFT, hash_map< KeyId, Value, Traits >::get(), get_discriminator_from_loc(), get_pure_location(), copyid_allocator::location_map, hash_map< KeyId, Value, Traits >::put(), and UNKNOWN_LOCATION.
Referenced by init_copyid_allocator().
|
static |
Copyright The GNU Toolchain Authors 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/>.
Helper to update a location with new discriminator components. If multiplicity_factor is non-zero, multiply existing multiplicity. If copyid is non-zero, set it (otherwise preserve existing).
References comp, DISCR_MULTIPLICITY_MAX, get_discriminator_components_from_loc(), location_with_discriminator_components(), and UNKNOWN_LOCATION.
Referenced by assign_discriminators_to_bb(), and assign_discriminators_to_stmt().