Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A straightforward port of tsan to the new PM, following the same path as D55647. Differential Revision: https://reviews.llvm.org/D56433 llvm-svn: 350647
- Loading branch information
Showing
8 changed files
with
82 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
llvm/include/llvm/Transforms/Instrumentation/ThreadSanitizer.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#ifndef LLVM_TRANSFORMS_INSTRUMENTATION_THREADSANITIZER_H | ||
#define LLVM_TRANSFORMS_INSTRUMENTATION_THREADSANITIZER_H | ||
|
||
#include "llvm/IR/PassManager.h" | ||
|
||
namespace llvm { | ||
// Insert ThreadSanitizer (race detection) instrumentation | ||
FunctionPass *createThreadSanitizerLegacyPassPass(); | ||
|
||
/// A function pass for tsan instrumentation. | ||
/// | ||
/// Instruments functions to detect race conditions reads. This function pass | ||
/// inserts calls to runtime library functions. If the functions aren't declared | ||
/// yet, the pass inserts the declarations. Otherwise the existing globals are | ||
struct ThreadSanitizerPass : public PassInfoMixin<ThreadSanitizerPass> { | ||
PreservedAnalyses run(Function &F, FunctionAnalysisManager &FAM); | ||
}; | ||
} | ||
#endif /* LLVM_TRANSFORMS_INSTRUMENTATION_THREADSANITIZER_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters