From: SourceForge.net <no...@so...> - 2012-06-05 09:27:33
|
Feature Requests item #3526268, was opened at 2012-05-13 02:32 Message generated for change (Comment added) made by epetrich You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=350599&aid=3526268&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: hc08 port Group: None Status: Open Priority: 5 Private: No Submitted By: Philipp Klaus Krause (spth) >Assigned to: Erik Petrich (epetrich) Summary: Right operand for GET_VALUE_AT_ADDRESS Initial Comment: Supporting a right operand for GET_VALUE_AT_ADDRESS would result in more efficient code genated for the hc08, which has a suitable x-relative addressing mode. This would help with aggregate and union accesses. Philipp ---------------------------------------------------------------------- >Comment By: Erik Petrich (epetrich) Date: 2012-06-05 02:27 Message: With revision #7856, it will handle rematerializable addresses too. However, loop invariance optimization and/or CSE conspire in some cases to move the addition iCode away from the GET_VALUE_AT_ADDRESS iCode, which then leaves an iTemp live across a larger span and is likely to be spilled. Need to find a good away to either prevent to movement of the original addition iCode or determine that the cast/assignment it is turned into can be safely moved back so that the iTemp can be assigned hx instead of spilling. I'll work on optimizing this after the release. ---------------------------------------------------------------------- Comment By: Erik Petrich (epetrich) Date: 2012-05-20 03:29 Message: I've implemented the case for a right operand literal in #7741. Still left is the more complicated case of your example, where the right operand would be a rematerializable address of a variable (but I did included support in the low-level loadRegIndexed() to handle this possibility later.) ---------------------------------------------------------------------- Comment By: Philipp Klaus Krause (spth) Date: 2012-05-20 02:21 Message: This one is probably the on eoptimization with the highest gain among teh easy-to-implement ones. It would trasform code like ; genPlus lda *_insertion_sort_sloc0_1_0 add #_spm_sprites_list tax clra adc #>_spm_sprites_list psha pulh ; genPointerGet ldx ,x into ; genPointerGet ldx *_insertion_sort_sloc0_1_0 clrh ldx #_spm_sprites_list, x Reducing code size from 13 to 5 bytes. And register a is freed, so it can be used for other purposes. This and similar ones are very common code sequences. Philipp ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=350599&aid=3526268&group_id=599 |