https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19661
--- Comment #16 from Andrew Pinski <pinskia at gcc dot gnu.org> --- So what is interesting is the way LLVM implements this as an IPO pass as how I described in comment #8, 6 years after I wrote that. Well they used "empty" rather than const . Note using it as an IPO pass I think is not wrong just having a specialized pass here where this is the same as DCE so just have DCE handle it instead seems better; plus with the availability of having pure/const flags with LTO and not having to load in the function seems much better really.