Add a pass to strip the bodies of available_externally functions so string

literals and `TypeInfo`s only referenced by them can be deleted by `-globaldce`.
This commit is contained in:
Frits van Bommel
2009-06-07 16:00:13 +02:00
parent 96fdcd6347
commit 96650855ed
3 changed files with 99 additions and 1 deletions

View File

@@ -222,6 +222,9 @@ static void addPassesForOptLevel(PassManager& pm) {
}
if (optimizeLevel >= 1) {
#if LLVM_REV >= 68940
addPass(pm, createStripExternalsPass());
#endif
addPass(pm, createGlobalDCEPass());
}