https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93385
--- Comment #30 from Martin Jambor <jamborm at gcc dot gnu.org> --- Created attachment 48320 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48320&action=edit Todays WIP patch This is my todays (still very much) WIP patch. - It marks statements which should not be copied before copying them and then skipping them. - It does map SSA_NAMEs which should not survive to error_mark_node. - Processing of calls is however still necessary, we cannot leave error_mark_nodes in the IL (until call redirection deals with it based on callee info). But: - It ICEs on gcc.dg/torture/pr48063.c. I understand the problem, IPA-CP attempts to replace a floating-point parameter with an integer constant and fails but this fools the new DCE thingy into thinking some analysis declared the parameter unused even though it is used. I'll have to make ipa_param_body_adjustments aware of tree_map. (The original idea was to make it part of tree_map but for some reason I gave up on that.) - There are three libgomp C++ ICEs that I know about which I have not even looked at. I have not attempted any bootstrap yet. I have not yet tested anything other than C/C++/Fortran. - The new hash maps, or at least the one for statements, might be better placed in copy_body_data, the current place is just more convenient for the moment. I do not care too much. - Information currently stored in m_dead_ssas might be obtainable from decl_map in copy_body_data. - I have not thought about debug statements yet and just ignored them for now. I do want to handle them after other things work. Any feedback welcome.