[Inline] Attempt to delete any discardable if unused functions
Previously we limited ourselves to only internal/private functions. We
can also delete linkonce_odr functions.
Minor compile time wins:
https://llvm-compile-time-tracker.com/compare.php?from=
d51e3474e060cb0e90dc2e2487f778b0d3e6a8de&to=
bccffe3f8d5dd4dda884c9ac1f93e51772519cad&stat=instructions
Major memory wins on tramp3d:
https://llvm-compile-time-tracker.com/compare.php?from=
d51e3474e060cb0e90dc2e2487f778b0d3e6a8de&to=
bccffe3f8d5dd4dda884c9ac1f93e51772519cad&stat=max-rss
Relanding with fix for compile times D117236.
Reviewed By: nikic, mtrofin
Differential Revision: https://reviews.llvm.org/D115545