Skip to content
Snippets Groups Projects
Commit adfc236c authored by Manolis Tsamis's avatar Manolis Tsamis Committed by Philipp Tomsich
Browse files

cprop_hardreg: Allow propagation of stack pointer in more cases.

The stack pointer propagation fix 736f8fd3 turned out to be more
restrictive than needed by rejecting propagation of the stack pointer
when REG_POINTER didn't match.

This commit removes this check:
  When the stack pointer is propagated it is fine for this to result in
  REG_POINTER becoming true from false, which is what the original code
  checked.

This simplification makes the previously introduced function
maybe_copy_reg_attrs obsolete and the logic can be inlined at the call
sites, as it was before 736f8fd3.

gcc/ChangeLog:

	* regcprop.cc (maybe_copy_reg_attrs): Remove unnecessary function.
	(find_oldest_value_reg): Inline stack_pointer_rtx check.
	(copyprop_hardreg_forward_1): Inline stack_pointer_rtx check.
parent f9d93f8c
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