@@ -338,12 +574,33 @@ PreservedAnalyses GlobalDCEPass::run(Module &M,
ModuleAnalysisManager &MAM) {
// The second pass drops the bodies of functions which are dead...
std::vector DeadFunctions;
- for (Function &F : M)
+ std::set DeadFunctionsSet;
+ auto funcRemovedInIn
@@ -34,12 +40,223 @@ static cl::opt
ClEnableVFE("enable-vfe", cl::Hidden, cl::init(true),
cl::desc("Enable virtual function elimination"));
+static cl::opt ClReadSummary(
+"globaldce-read-summary",
+cl::desc("Read summary from given bitcode before r
@@ -34,12 +40,223 @@ static cl::opt
ClEnableVFE("enable-vfe", cl::Hidden, cl::init(true),
cl::desc("Enable virtual function elimination"));
+static cl::opt ClReadSummary(
+"globaldce-read-summary",
+cl::desc("Read summary from given bitcode before r
@@ -775,6 +783,58 @@ static void computeVariableSummary(ModuleSummaryIndex
&Index,
Index.addGlobalValueSummary(V, std::move(GVarSummary));
}
+static void ComputeDependencies(
teresajohnson wrote:
nit: function should be lowerCamelCase
https://github.com/l
@@ -34,12 +40,223 @@ static cl::opt
ClEnableVFE("enable-vfe", cl::Hidden, cl::init(true),
cl::desc("Enable virtual function elimination"));
+static cl::opt ClReadSummary(
+"globaldce-read-summary",
+cl::desc("Read summary from given bitcode before r