http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55031
Bug #: 55031 Summary: Documentation on RTL GCSE pass is outdated Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other AssignedTo: unassig...@gcc.gnu.org ReportedBy: amker.ch...@gmail.com Quoting from GCCINT, section "9.5 RTL passes": "When optimizing for size, GCSE is done using Morel-Renvoise Partial Redundancy Elimination, with the exception that it does not try to move invariants out of loops—that is left to the loop optimization pass. If MR PRE GCSE is done, code hoisting (aka unification) is also done, as well as load motion." While the pass gate function is as below: static bool gate_rtl_pre (void) { return optimize > 0 && flag_gcse && !cfun->calls_setjmp && optimize_function_for_speed_p (cfun) && dbg_cnt (pre); } This conflicts with the documentation, which says Morel-Renvoise PRE will be used when optimizing for size. I think the document is outdated.