------- Comment #8 from rguenth at gcc dot gnu dot org 2007-11-22 22:00 ------- Same results on current trunk. Early inlining is already doing it because we think putchs size (4 insns) when inlined will reduce the compilation units size by 4 insns (the out-of-line copy of putch).
putchs IL before inlining looks like <bb 2>: <bb 4>: D.1182_2 ={v} *43B; D.1183_3 = (int) D.1182_2; D.1184_4 = D.1183_3 & 32; if (D.1184_4 == 0) goto <bb 4>; else goto <bb 3>; <bb 3>: ch.0_7 = (volatile unsigned char) ch_6(D); *44B ={v} ch.0_7; return; we count INDIRECT_REFs as having no cost, the only thing what counts is the BIT_AND_EXPR and the comparison. Constants and registers also have no cost. Considering the (currently) recursive structure of estimate_num_insns_1 it is non-trivial to adjust the container-like reference trees (but the INDIREC_REF ones). -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |enhancement Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 GCC target triplet|*-*-* | Keywords| |missed-optimization Known to fail|4.1.2 |4.1.2 4.3.0 Last reconfirmed|0000-00-00 00:00:00 |2007-11-22 22:00:55 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31528