1 //===- Transforms/Instrumentation.h - Instrumentation passes ----*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines constructor functions for instrumentation passes.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_TRANSFORMS_INSTRUMENTATION_H
15 #define LLVM_TRANSFORMS_INSTRUMENTATION_H
17 #include "llvm/ADT/StringRef.h"
24 // Insert edge profiling instrumentation
25 ModulePass *createEdgeProfilerPass();
27 // Insert optimal edge profiling instrumentation
28 ModulePass *createOptimalEdgeProfilerPass();
30 // Insert path profiling instrumentation
31 ModulePass *createPathProfilerPass();
33 // Insert GCOV profiling instrumentation
34 ModulePass *createGCOVProfilerPass(bool EmitNotes = true, bool EmitData = true,
35 bool Use402Format = false,
36 bool UseExtraChecksum = false);
38 // Insert AddressSanitizer (address sanity checking) instrumentation
39 FunctionPass *createAddressSanitizerFunctionPass(
40 bool CheckInitOrder = false, bool CheckUseAfterReturn = false,
41 bool CheckLifetime = false, StringRef BlacklistFile = StringRef());
42 ModulePass *createAddressSanitizerModulePass(
43 bool CheckInitOrder = false, StringRef BlacklistFile = StringRef());
44 // Insert MemorySanitizer instrumentation (detection of uninitialized reads)
45 FunctionPass *createMemorySanitizerPass();
46 // Insert ThreadSanitizer (race detection) instrumentation
47 FunctionPass *createThreadSanitizerPass();
50 // BoundsChecking - This pass instruments the code to perform run-time bounds
51 // checking on loads, stores, and other memory intrinsics.
52 FunctionPass *createBoundsCheckingPass();
54 } // End llvm namespace