From: SourceForge.net <no...@so...> - 2008-01-26 15:48:25
|
Feature Requests item #1880202, was opened at 2008-01-26 10:17 Message generated for change (Comment added) made by spth You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=350599&aid=1880202&group_id=599 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Priority: 5 Private: No Submitted By: Philipp Krause (spth) Assigned to: Nobody/Anonymous (nobody) Summary: New function notUsed() to check for dead stores in peepholes Initial Comment: This function should return true if the value in it's argument is not used after the code in question. A simple approximation would be to return true if the next use of the argument before the next jump is writing to it. Currently there are many peephole rules like replace restart { ld b,%1 ld a,b pop bc } by { ld a,%1 ; peephole 25 removed load into b pop bc } which could be replaced by a simple replace restart { ld %1, %2 } by { } if notUsed(%1), notVolatile(%1 %2) thus greatly simplifying the peephole rules. There are further peephole rules that could use notUsed(), like peephole rules removing excessive ussage of iy for addresses in loads/stores on the Z80. See feature request #1861376 for some more explanations and examples of use. Philipp ---------------------------------------------------------------------- >Comment By: Philipp Krause (spth) Date: 2008-01-26 16:48 Message: Logged In: YES user_id=564030 Originator: YES Since the mcs51DeadMove() just checks weather it's being called for a pop instruction and then calls different functions for the two purposes I suggest to create separate functions. That would be less confusing. The current function would be used to check for dead push/pop pairs only (as comments suggest), the new function would serve the purpose of notUsed() as above. Philipp ---------------------------------------------------------------------- Comment By: Philipp Krause (spth) Date: 2008-01-26 16:40 Message: Logged In: YES user_id=564030 Originator: YES Looking at mcs51 peephole 301 it seems as if the current deadMove() does what I want notUsed() to do. However it seems to somehow serve two purposes, the other one related to dead push/pop pairs. The latter purpose is much more present in comments. Only in the mcs52-specific files the other one is mentioned. Question: Should separate functions for these purposes be created or should all ports use deadMove() for both purposes? Philipp ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=350599&aid=1880202&group_id=599 |