Avoid setting TREE_ADDRESSABLE on stack vars during RTL expansion
This avoids setting TREE_ADDRESSABLE on variables we want to force to
the stack. Instead track those in a temporary bitmap and force
stack expansion that way, leaving TREE_ADDRESSABLE alone, not
pessimizing future alias queries.
2021-05-17 Richard Biener <rguenther@suse.de>
* cfgexpand.c (expand_one_var): Pass in forced_stack_var
and honor it when expanding.
(expand_used_vars_for_block): Pass through forced_stack_var.
(expand_used_vars): Likewise.
(discover_nonconstant_array_refs_r): Set bits in
forced_stack_vars instead of marking vars TREE_ADDRESSABLE.
(avoid_type_punning_on_regs): Likewise.
(discover_nonconstant_array_refs): Likewise.
(pass_expand::execute): Create and pass down forced_stack_var
bitmap. For parameters and returns temporarily set
TREE_ADDRESSABLE when expand_function_start.