summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/CtorUtils.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Re-commit r208025, reverted in r208030, with a fix for a conformance issueRichard Smith2014-05-061-3/+3
| | | | | | which GCC detects and Clang does not! llvm-svn: 208033
* Revert r208025, which made buildbots unhappy for unknown reasons.Richard Smith2014-05-061-3/+3
| | | | llvm-svn: 208030
* Add llvm::function_ref (and a couple of uses of it), representing a ↵Richard Smith2014-05-061-3/+3
| | | | | | type-erased reference to a callable object. llvm-svn: 208025
* Teach GlobalDCE how to remove empty global_ctor entries.Nico Weber2014-05-021-0/+181
This moves most of GlobalOpt's constructor optimization code out of GlobalOpt into Transforms/Utils/CDtorUtils.{h,cpp}. The public interface is a single function OptimizeGlobalCtorsList() that takes a predicate returning which constructors to remove. GlobalOpt calls this with a function that statically evaluates all constructors, just like it did before. This part of the change is behavior-preserving. Also add a call to this from GlobalDCE with a filter that removes global constructors that contain a "ret" instruction and nothing else – this fixes PR19590. llvm-svn: 207856
OpenPOWER on IntegriCloud