From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1486 invoked by alias); 26 Dec 2008 21:30:56 -0000 Received: (qmail 1086 invoked by uid 48); 26 Dec 2008 21:29:36 -0000 Date: Fri, 26 Dec 2008 21:30:00 -0000 Message-ID: <20081226212936.1085.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/38629] target-specific parameters for inline heuristics not defined for AVR In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "forwards dot from dot bugzilla at d81 dot de" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-12/txt/msg02347.txt.bz2 ------- Comment #2 from forwards dot from dot bugzilla at d81 dot de 2008-12-26 21:29 ------- Steven, thanks for your explanation. My point of view was that gcc-4.3.3 did do inlining code for "-Os", "-O1", "-O2" although the manual clearly states that it would not do inlining for these optimization levels. "-O2 Optimize even more. GCC performs... The compiler does not perform loop unrolling or function inlining when you specify -O2..." But for "-O/-O1" it is mentioned: "-O turns on the following optimization flags: ... -finline-small-functions ..." So the manual is a little ambiguous in this point. So to tune the heuristics for the AVR target, one needs to tell the compiler: 1) what's a "small function" 2) tell about the costs 3) maybe do something more Actually, in GCC-4.4, gcc/config/avr/avr.c, somebody did already some tuning as it seems to me: avr_override_options (void) { const struct mcu_type_s *t; flag_delete_null_pointer_checks = 0; if (!PARAM_SET_P (PARAM_INLINE_CALL_COST)) set_param_value ("inline-call-cost", 5); .... I don't feel qualified enough to find well working values for all AVR architectures since I do know the Attiny2313, Mega8 and Mega644 a little bit. Maybe someone is willing to help me. Wolfgang PS: Steven, do you have got administrative rights to edit my initial post. Could you please convert Till Harbaum's eMail address into something that cannot be parsed by eMail harvesting robots ('@' -> "(at)"). -- forwards dot from dot bugzilla at d81 dot de changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |forwards dot from dot | |bugzilla at d81 dot de http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38629