Skip to content
Snippets Groups Projects
Commit b081e6c8 authored by Andrew Pinski's avatar Andrew Pinski
Browse files

phiopt: Move the common code between pass_phiopt and pass_cselim into a seperate function


When r14-303-gb9fedabe381cce was done, it was missed that some of the common parts could
be done in a template and a lambda could be used. This patch implements that. This new
function can be used later on to implement a simple ifcvt pass.

gcc/ChangeLog:

	* tree-ssa-phiopt.cc (execute_over_cond_phis): New template function,
	moved the common parts from pass_phiopt::execute/pass_cselim::execute.
	(pass_phiopt::execute): Move the functon specific parts of the loop
	into an lamdba.
	(pass_cselim::execute): Likewise.

Signed-off-by: default avatarAndrew Pinski <quic_apinski@quicinc.com>
parent 1b4497d6
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