This is the mail archive of the gcc-patches@gcc.gnu.org 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] |
This patch avoids some useless work in the recently added phi cprop code. First, it's insanely stupid to call fold_stmt_in_place on PHI nodes and marginally stupid to call mark_new_vars_to_rename on PHI nodes. In fact, for PHIs, all we want/need to do is propagate the value, then mark the PHI node for later processing to see if it has turned into a degenerate PHI. For tramp3d most of our propagations are into PHIs, so this ultimately results in a lot fewer calls into fold_stmt_in_place. Second, it's rather dumb to call into the mark_new_vars_to_rename or fold_stmt_in_place when we're replacing one virtual SSA_NAME with another SSA_NAME and the two SSA_NAMEs have the same underlying _DECL node. In this case folding will never do anything useful and no vars will be exposed/removed from the statement. The net result of these two changes in roughly a 90% reduction in calls to fold_stmt_in_place (which calls walk_tree!) and mark_new_vars_to_rename from the cprop code. Sadly, this is only showing a teeny tiny compile-time improvement, small enough that it could just be noise. Bootstrapped and regression tested on i686-pc-linux-gnu.
Attachment:
PPP
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |