Instead of calling fold after replacing in a tree, we should have a simplify_replace_tree removes the need for fold a lot of places and it also fixes a couple of compile time issues with calling fold all over the place.
See <http://gcc.gnu.org/ml/gcc-patches/2005-09/msg01084.html>. If I get time tomorrow, I will get a patch for this. There might be other places in GCC where we call fold too much when we really don't need to be which would be fixed by adding this, -- Summary: There should be a simplify_replace_tree like simplify_replace_rtx Product: gcc Version: 4.1.0 Status: UNCONFIRMED Keywords: compile-time-hog Severity: minor Priority: P2 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pinskia at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org OtherBugsDependingO 23049 nThis: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23936