diff --git a/llvm/include/llvm/InitializePasses.h b/llvm/include/llvm/InitializePasses.h --- a/llvm/include/llvm/InitializePasses.h +++ b/llvm/include/llvm/InitializePasses.h @@ -117,7 +117,6 @@ void initializeDCELegacyPassPass(PassRegistry&); void initializeDFAJumpThreadingLegacyPassPass(PassRegistry &); void initializeDSELegacyPassPass(PassRegistry&); -void initializeDataFlowSanitizerLegacyPassPass(PassRegistry &); void initializeDeadMachineInstructionElimPass(PassRegistry&); void initializeDebugifyMachineModulePass(PassRegistry &); void initializeDelinearizationPass(PassRegistry&); diff --git a/llvm/include/llvm/Transforms/Instrumentation.h b/llvm/include/llvm/Transforms/Instrumentation.h --- a/llvm/include/llvm/Transforms/Instrumentation.h +++ b/llvm/include/llvm/Transforms/Instrumentation.h @@ -123,10 +123,6 @@ InstrProfOptions() = default; }; -// Insert DataFlowSanitizer (dynamic data flow analysis) instrumentation -ModulePass *createDataFlowSanitizerLegacyPassPass( - const std::vector &ABIListFiles = std::vector()); - // Options for sanitizer coverage instrumentation. struct SanitizerCoverageOptions { enum Type { diff --git a/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp --- a/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp @@ -3329,46 +3329,6 @@ DFSF.PHIFixups.push_back({&PN, ShadowPN, OriginPN}); } -namespace { -class DataFlowSanitizerLegacyPass : public ModulePass { -private: - std::vector ABIListFiles; - -public: - static char ID; - - DataFlowSanitizerLegacyPass( - const std::vector &ABIListFiles = std::vector()) - : ModulePass(ID), ABIListFiles(ABIListFiles) {} - - void getAnalysisUsage(AnalysisUsage &AU) const override { - AU.addRequired(); - } - - bool runOnModule(Module &M) override { - return DataFlowSanitizer(ABIListFiles) - .runImpl(M, [&](Function &F) -> TargetLibraryInfo & { - return getAnalysis().getTLI(F); - }); - } -}; -} // namespace - -char DataFlowSanitizerLegacyPass::ID; - -INITIALIZE_PASS_BEGIN(DataFlowSanitizerLegacyPass, "dfsan", - "DataFlowSanitizer: dynamic data flow analysis.", false, - false) -INITIALIZE_PASS_DEPENDENCY(TargetLibraryInfoWrapperPass) -INITIALIZE_PASS_END(DataFlowSanitizerLegacyPass, "dfsan", - "DataFlowSanitizer: dynamic data flow analysis.", false, - false) - -ModulePass *llvm::createDataFlowSanitizerLegacyPassPass( - const std::vector &ABIListFiles) { - return new DataFlowSanitizerLegacyPass(ABIListFiles); -} - PreservedAnalyses DataFlowSanitizerPass::run(Module &M, ModuleAnalysisManager &AM) { auto GetTLI = [&](Function &F) -> TargetLibraryInfo & { diff --git a/llvm/lib/Transforms/Instrumentation/Instrumentation.cpp b/llvm/lib/Transforms/Instrumentation/Instrumentation.cpp --- a/llvm/lib/Transforms/Instrumentation/Instrumentation.cpp +++ b/llvm/lib/Transforms/Instrumentation/Instrumentation.cpp @@ -94,7 +94,6 @@ initializeMemProfilerLegacyPassPass(Registry); initializeModuleMemProfilerLegacyPassPass(Registry); initializeBoundsCheckingLegacyPassPass(Registry); - initializeDataFlowSanitizerLegacyPassPass(Registry); } /// LLVMInitializeInstrumentation - C binding for