[PATCH] D11919: Enable EliminateAvailableExternally pass in the LTO pipeline.

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 10 14:40:04 PDT 2015


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

lgtm


================
Comment at: lib/Transforms/IPO/PassManagerBuilder.cpp:559-564
@@ -558,1 +558,8 @@
 
+  // Remove avail extern fns and globals definitions. Note if they
+  // are unreferenced they will be removed by GlobalDCE below, so
+  // this only impacts referenced available externally globals.
+  // Eventually they will be suppressed during codegen, but eliminating
+  // here enables more opportunity for GlobalDCE as it may make
+  // globals referenced by available external functions dead.
+  PM.add(createEliminateAvailableExternallyPass());
----------------
I think you can shorten this to something like:
  // Drop bodies of available externally objects to improve GlobalDCE.


http://reviews.llvm.org/D11919





More information about the llvm-commits mailing list