Inlining of guards is important for optimizing. Consider int flag;
int foo (void) { if (!flag) return 0; ... } we should be able to partially inline foo into its callers transforming if (foo ()) { ... } else { ... } to if (!flag) <ret> = 0; else <ret> = foo.clone(); if (<ret>) { ... } else { ... } to be able to perform optimizations across the path where foo.clone is not executed. -- Summary: GCC cannot perform partial inlining Product: gcc Version: 4.5.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: enhancement Priority: P3 Component: tree-optimization AssignedTo: hubicka at gcc dot gnu dot org ReportedBy: rguenth at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42971