Skip to content
Snippets Groups Projects
Commit d3a0208e authored by Richard Biener's avatar Richard Biener
Browse files

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.
parent b5c3145a
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment