2011/11/1 Georg-Johann Lay <a...@gjlay.de>: > Denis Chertykov schrieb: >> >> 2011/10/31 Georg-Johann Lay: >> >>> Since beginning of time, BRANCH_COST was set to 0 so that some >>> optimization >>> passes make code happily jumping around. The patch introduces a new >>> command >>> line option for that; mainly because I don't know the rationale behind >>> setting >>> BRANCH_COST to 0. >>> >>> Johann >>> >>> * config/avr/avr.opt (-mbranch-cost=): New option. >>> * config/avr/avr.h (BRANCH_COST): Define to avr_branch_cost. >>> * config/avr/avr.c (avr_rtx_costs_1): Adjust [U]DIV/[U]MOD costs. >>> * config/avr/avr.md (*addqi3.lt0, *addhi3.lt0, *addsi3.lt0): New >>> insns. >>> (*addhi3_zero_extend1): Remov % in constraint of operand 1. >>> (*addhi3.sign_extend1, *subhi3.sign_extend2): New insns. >> >> Approved. >> >> Denis. > > You know why the branch costs are set to 0 by default?
No. > Maybe it's better to have a default of 1 for the new avr_branch_cost? I don't know. (I forgot) Denis.