MaskRay created this revision.
MaskRay added reviewers: Sanitizers, browneee, vitalybuka.
Herald added subscribers: StephenFan, hiraditya.
Herald added a reviewer: ctetreau.
Herald added a reviewer: ctetreau.
Herald added a reviewer: ctetreau.
Herald added a reviewer: ctetreau.
Herald added a project: All.
MaskRay requested review of this revision.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.

Using the legacy PM for the optimization pipeline was deprecated in 13.0.0.
Following recent changes to remove non-core features of the legacy
PM/optimization pipeline, remove ThreadSanitizerLegacyPass.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D124594

Files:
  clang/docs/tools/clang-formatted-files.txt
  llvm/bindings/go/llvm/InstrumentationBindings.cpp
  llvm/bindings/go/llvm/InstrumentationBindings.h
  llvm/bindings/go/llvm/transforms_instrumentation.go
  llvm/include/llvm/InitializePasses.h
  llvm/include/llvm/Transforms/Instrumentation.h
  llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
  llvm/lib/Transforms/Instrumentation/Instrumentation.cpp

Index: llvm/lib/Transforms/Instrumentation/Instrumentation.cpp
===================================================================
--- llvm/lib/Transforms/Instrumentation/Instrumentation.cpp
+++ llvm/lib/Transforms/Instrumentation/Instrumentation.cpp
@@ -99,7 +99,6 @@
   initializeInstrOrderFileLegacyPassPass(Registry);
   initializeInstrProfilingLegacyPassPass(Registry);
   initializeModuleSanitizerCoverageLegacyPassPass(Registry);
-  initializeDataFlowSanitizerLegacyPassPass(Registry);
 }
 
 /// LLVMInitializeInstrumentation - C binding for
Index: llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
===================================================================
--- llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
+++ llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
@@ -3104,34 +3104,6 @@
   DFSF.PHIFixups.push_back({&PN, ShadowPN, OriginPN});
 }
 
-namespace {
-class DataFlowSanitizerLegacyPass : public ModulePass {
-private:
-  std::vector<std::string> ABIListFiles;
-
-public:
-  static char ID;
-
-  DataFlowSanitizerLegacyPass(
-      const std::vector<std::string> &ABIListFiles = std::vector<std::string>())
-      : ModulePass(ID), ABIListFiles(ABIListFiles) {}
-
-  bool runOnModule(Module &M) override {
-    return DataFlowSanitizer(ABIListFiles).runImpl(M);
-  }
-};
-} // namespace
-
-char DataFlowSanitizerLegacyPass::ID;
-
-INITIALIZE_PASS(DataFlowSanitizerLegacyPass, "dfsan",
-                "DataFlowSanitizer: dynamic data flow analysis.", false, false)
-
-ModulePass *llvm::createDataFlowSanitizerLegacyPassPass(
-    const std::vector<std::string> &ABIListFiles) {
-  return new DataFlowSanitizerLegacyPass(ABIListFiles);
-}
-
 PreservedAnalyses DataFlowSanitizerPass::run(Module &M,
                                              ModuleAnalysisManager &AM) {
   if (DataFlowSanitizer(ABIListFiles).runImpl(M)) {
Index: llvm/include/llvm/Transforms/Instrumentation.h
===================================================================
--- llvm/include/llvm/Transforms/Instrumentation.h
+++ llvm/include/llvm/Transforms/Instrumentation.h
@@ -129,10 +129,6 @@
 
 ModulePass *createInstrOrderFilePass();
 
-// Insert DataFlowSanitizer (dynamic data flow analysis) instrumentation
-ModulePass *createDataFlowSanitizerLegacyPassPass(
-    const std::vector<std::string> &ABIListFiles = std::vector<std::string>());
-
 // Options for sanitizer coverage instrumentation.
 struct SanitizerCoverageOptions {
   enum Type {
Index: llvm/include/llvm/InitializePasses.h
===================================================================
--- llvm/include/llvm/InitializePasses.h
+++ llvm/include/llvm/InitializePasses.h
@@ -123,7 +123,6 @@
 void initializeDCELegacyPassPass(PassRegistry&);
 void initializeDFAJumpThreadingLegacyPassPass(PassRegistry &);
 void initializeDSELegacyPassPass(PassRegistry&);
-void initializeDataFlowSanitizerLegacyPassPass(PassRegistry &);
 void initializeDeadMachineInstructionElimPass(PassRegistry&);
 void initializeDebugifyMachineModulePass(PassRegistry &);
 void initializeDelinearizationPass(PassRegistry&);
Index: llvm/bindings/go/llvm/transforms_instrumentation.go
===================================================================
--- llvm/bindings/go/llvm/transforms_instrumentation.go
+++ /dev/null
@@ -1,29 +0,0 @@
-//===- transforms_instrumentation.go - Bindings for instrumentation -------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// This file defines bindings for the instrumentation component.
-//
-//===----------------------------------------------------------------------===//
-
-package llvm
-
-/*
-#include "InstrumentationBindings.h"
-#include <stdlib.h>
-*/
-import "C"
-import "unsafe"
-
-func (pm PassManager) AddDataFlowSanitizerPass(abilist []string) {
-	abiliststrs := make([]*C.char, len(abilist))
-	for i, arg := range abilist {
-		abiliststrs[i] = C.CString(arg)
-		defer C.free(unsafe.Pointer(abiliststrs[i]))
-	}
-	C.LLVMAddDataFlowSanitizerPass(pm.C, C.int(len(abilist)), &abiliststrs[0])
-}
Index: llvm/bindings/go/llvm/InstrumentationBindings.h
===================================================================
--- llvm/bindings/go/llvm/InstrumentationBindings.h
+++ /dev/null
@@ -1,33 +0,0 @@
-//===- InstrumentationBindings.h - instrumentation bindings -----*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// This file defines C bindings for the Transforms/Instrumentation component.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_BINDINGS_GO_LLVM_INSTRUMENTATIONBINDINGS_H
-#define LLVM_BINDINGS_GO_LLVM_INSTRUMENTATIONBINDINGS_H
-
-#include "llvm-c/Core.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// FIXME: These bindings shouldn't be Go-specific and should eventually move to
-// a (somewhat) less stable collection of C APIs for use in creating bindings of
-// LLVM in other languages.
-
-void LLVMAddDataFlowSanitizerPass(LLVMPassManagerRef PM, int ABIListFilesNum,
-                                  const char **ABIListFiles);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
Index: llvm/bindings/go/llvm/InstrumentationBindings.cpp
===================================================================
--- llvm/bindings/go/llvm/InstrumentationBindings.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-//===- InstrumentationBindings.cpp - instrumentation bindings -------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// This file defines C bindings for the instrumentation component.
-//
-//===----------------------------------------------------------------------===//
-
-#include "InstrumentationBindings.h"
-#include "llvm-c/Core.h"
-#include "llvm/IR/LegacyPassManager.h"
-#include "llvm/IR/Module.h"
-#include "llvm/Pass.h"
-#include "llvm/Transforms/Instrumentation.h"
-
-using namespace llvm;
-
-void LLVMAddDataFlowSanitizerPass(LLVMPassManagerRef PM,
-                                  int ABIListFilesNum,
-                                  const char **ABIListFiles) {
-  std::vector<std::string> ABIListFilesVec;
-  for (int i = 0; i != ABIListFilesNum; ++i) {
-    ABIListFilesVec.push_back(ABIListFiles[i]);
-  }
-  unwrap(PM)->add(createDataFlowSanitizerLegacyPassPass(ABIListFilesVec));
-}
Index: clang/docs/tools/clang-formatted-files.txt
===================================================================
--- clang/docs/tools/clang-formatted-files.txt
+++ clang/docs/tools/clang-formatted-files.txt
@@ -4935,7 +4935,6 @@
 lldb/utils/TableGen/LLDBTableGenBackends.h
 lldb/utils/TableGen/LLDBTableGenUtils.cpp
 lldb/utils/TableGen/LLDBTableGenUtils.h
-llvm/bindings/go/llvm/InstrumentationBindings.h
 llvm/bindings/go/llvm/SupportBindings.cpp
 llvm/bindings/go/llvm/SupportBindings.h
 llvm/bindings/ocaml/llvm/llvm_ocaml.h
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to