This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PR19578: noreturn vs. function pointer propagation part 2

Richard Sandiford wrote:

My main question with this approach is: once we've identified a mid-block
noreturn, what's the best way of dealing with the following statements?
Since this situation happens so rarely, I decided simply to split the
block after the call (which IMO is exactly what we're doing conceptually).
Deleting the statements is then just another instance of unreachable
block deletion, and we don't need to duplicate any statement management
code.  Let me know if that isn't acceptable though.

Yes, splitting the block and letting unreachable block deletion catch it is fine.

	PR tree-optimization/19578
	* tree-flow.h (modified_noreturn_calls): Declare.
	(noreturn_call_p): Declare.
You need to initialize modified_noreturn_calls in init_tree_ssa and set it to NULL in delete_tree_ssa.

+/* A list of all the noreturn calls passed to modify_stmt.  */
Add some explanation of what is this list used for in cleanup_control_flow.

Other than that, the patch looks fine.

Thanks. Diego.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]