------- Comment #8 from steven at gcc dot gnu dot org  2010-02-21 14:32 -------
I have played with CSiBE with this patch:

-------------------------------------------------- 8< -------------
--- ../../gcc/gcc/config/arm/arm.c      2010-02-12 21:45:29.000000000 +0100
+++ ../../combined/gcc/config/arm/arm.c 2010-02-21 14:54:23.000000000 +0100
@@ -7448,7 +7448,7 @@
 arm_arm_address_cost (rtx x)
 {
   enum rtx_code c  = GET_CODE (x);
-
+if (1) return 1;
   if (c == PRE_INC || c == PRE_DEC || c == POST_INC || c == POST_DEC)
     return 0;
   if (c == MEM || c == LABEL_REF || c == SYMBOL_REF)
-------------------------------------------------- 8< -------------

I tried CSiBE on arm-eabi with "-Os -mabi=aapcs-linux" (latter flag is required
for mpeg2dec-0.3.1), but I only looked at size because I have no ARM board to
test speed on.

Overall the patch results in smaller code:

   text    data     bss     dec     hex filename
3226845  316581  561788 4105214  3ea3fe (TOTALS)            unpatched
3226269  316581  561788 4104638  3ea1be (TOTALS)            patched

For the individual files the results vary. A more detailed investigation is
necessary to figure out when a patch like the above is a win, and when it is
not.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27016

Reply via email to