aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-live.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-ssa-live.c')
-rw-r--r--gcc/tree-ssa-live.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/tree-ssa-live.c b/gcc/tree-ssa-live.c
index 1effb43..22013e0 100644
--- a/gcc/tree-ssa-live.c
+++ b/gcc/tree-ssa-live.c
@@ -57,6 +57,7 @@ along with GCC; see the file COPYING3. If not see
#include "diagnostic-core.h"
#include "debug.h"
#include "flags.h"
+#include "tree-ssa.h"
#ifdef ENABLE_CHECKING
static void verify_live_on_entry (tree_live_info_p);
@@ -1103,6 +1104,10 @@ set_var_live_on_entry (tree ssa_name, tree_live_info_p live)
else
def_bb = ENTRY_BLOCK_PTR_FOR_FN (cfun);
+ /* An undefined local variable does not need to be very alive. */
+ if (ssa_undefined_value_p (ssa_name, false))
+ return;
+
/* Visit each use of SSA_NAME and if it isn't in the same block as the def,
add it to the list of live on entry blocks. */
FOR_EACH_IMM_USE_FAST (use, imm_iter, ssa_name)
@@ -1439,6 +1444,11 @@ verify_live_on_entry (tree_live_info_p live)
else
if (d == var)
{
+ /* An undefined local variable does not need to be very
+ alive. */
+ if (ssa_undefined_value_p (var, false))
+ continue;
+
/* The only way this var shouldn't be marked live on entry is
if it occurs in a PHI argument of the block. */
size_t z;