aboutsummaryrefslogtreecommitdiff
path: root/gcc/value-range.cc
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2023-10-25 10:39:51 +0100
committerRichard Sandiford <richard.sandiford@arm.com>2023-10-25 10:39:51 +0100
commitba97d0e3b9660e2499b9f2500a2d837cfb9cc184 (patch)
tree8fda14f7e3e08278f6f0d26992554d84f4f1ee69 /gcc/value-range.cc
parentadf1b369c5321ffc213e080f8aa9d0cc8d7f9eca (diff)
downloadgcc-ba97d0e3b9660e2499b9f2500a2d837cfb9cc184.zip
gcc-ba97d0e3b9660e2499b9f2500a2d837cfb9cc184.tar.gz
gcc-ba97d0e3b9660e2499b9f2500a2d837cfb9cc184.tar.bz2
rtl-ssa: Calculate dominance frontiers for the exit block
The exit block can have multiple predecessors, for example if the function calls __builtin_eh_return. We might then need PHI nodes for values that are live on exit. RTL-SSA uses the normal dominance frontiers approach for calculating where PHI nodes are needed. However, dominannce.cc only calculates dominators for normal blocks, not the exit block. calculate_dominance_frontiers likewise only calculates dominance frontiers for normal blocks. This patch fills in the “missing” frontiers manually. gcc/ * rtl-ssa/internals.h (build_info::exit_block_dominator): New member variable. * rtl-ssa/blocks.cc (build_info::build_info): Initialize it. (bb_walker::bb_walker): Use it, moving the computation of the dominator to... (function_info::process_all_blocks): ...here. (function_info::place_phis): Add dominance frontiers for the exit block.
Diffstat (limited to 'gcc/value-range.cc')
0 files changed, 0 insertions, 0 deletions