Skip to content
Snippets Groups Projects
Commit af101026 authored by Filip Kastl's avatar Filip Kastl
Browse files

gimple ssa: Put SCCOPY logic into a class


Currently the main logic of the sccopy pass is implemented as static
functions.  This patch instead puts the code into a class.  This also
gets rid of a global variable (dead_stmts).

gcc/ChangeLog:

	* gimple-ssa-sccopy.cc (class scc_copy_prop): New class.
	(replace_scc_by_value): Put into...
	(scc_copy_prop::replace_scc_by_value): ...scc_copy_prop.
	(sccopy_visit_op): Put into...
	(scc_copy_prop::visit_op): ...scc_copy_prop.
	(sccopy_propagate): Put into...
	(scc_copy_prop::propagate): ...scc_copy_prop.
	(init_sccopy): Replace by...
	(scc_copy_prop::scc_copy_prop): ...the construtor.
	(finalize_sccopy): Replace by...
	(scc_copy_prop::~scc_copy_prop): ...the destructor.
	(pass_sccopy::execute): Use scc_copy_prop.

Signed-off-by: default avatarFilip Kastl <fkastl@suse.cz>
parent 31efd46a
No related branches found
No related tags found
Loading
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