GCC Middle and Back End API Reference
init-regs.cc File Reference
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "rtl.h"
#include "tree.h"
#include "df.h"
#include "memmodel.h"
#include "emit-rtl.h"
#include "expr.h"
#include "tree-pass.h"
Include dependency graph for init-regs.cc:


static void initialize_uninitialized_regs (void)
rtl_opt_passmake_pass_initialize_regs (gcc::context *ctxt)

Function Documentation

◆ initialize_uninitialized_regs()

static void initialize_uninitialized_regs ( void )
Initialization of uninitialized regs.
   Copyright (C) 2007-2024 Free Software Foundation, Inc.

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

GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
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
Check all of the uses of pseudo variables.  If any use that is MUST
uninitialized, add a store of 0 immediately before it.  For
subregs, this makes combine happy.  For full word regs, this makes
other optimizations, like the register allocator and the reg-stack
happy as well as papers over some problems on the arm and other
processors where certain isa constraints cannot be handled by gcc.
These are of the form where two operands to an insn my not be the
same.  The ra will only make them the same if they do not
interfere, and this can only happen if one is not initialized.

There is also the unfortunate consequence that this may mask some
buggy programs where people forget to initialize stack variable.
Any programmer with half a brain would look at the uninitialized
variable warnings.   

References bitmap_bit_p, bitmap_clear(), bitmap_set_bit, cfun, CONST0_RTX, current_function_name(), df_analyze(), df_dump(), df_live, df_live_add_problem(), DF_LIVE_IN, df_live_set_all_dirty(), DF_LR_IN, DF_REF_REAL_REG, DF_REF_REGNO, df_remove_problem(), dump_file, emit_clobber(), emit_insn_before(), emit_move_insn(), end_sequence(), FOR_BB_INSNS, FOR_EACH_BB_FN, FOR_EACH_INSN_USE, get_insns(), GET_MODE, ggc_alloc(), basic_block_def::index, INSN_UID(), NONDEBUG_INSN_P, pic_offset_table_rtx, REGNO, and start_sequence().

◆ make_pass_initialize_regs()

rtl_opt_pass * make_pass_initialize_regs ( gcc::context * ctxt)

References ggc_alloc().