57b6ab3d30b3a9eef59333f7eb13b8afc1860672
[oota-llvm.git] / include / llvm / Transforms / Instrumentation.h
1 //===- Transforms/Instrumentation.h - Instrumentation passes ----*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines constructor functions for instrumentation passes.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef LLVM_TRANSFORMS_INSTRUMENTATION_H
15 #define LLVM_TRANSFORMS_INSTRUMENTATION_H
16
17 namespace llvm {
18
19 class ModulePass;
20 class FunctionPass;
21
22 // Insert edge profiling instrumentation
23 ModulePass *createEdgeProfilerPass();
24
25 // Insert optimal edge profiling instrumentation
26 ModulePass *createOptimalEdgeProfilerPass();
27
28 // Insert path profiling instrumentation
29 ModulePass *createPathProfilerPass();
30
31 // Insert GCOV profiling instrumentation
32 ModulePass *createGCOVProfilerPass(bool EmitNotes = true, bool EmitData = true,
33                                    bool Use402Format = false,
34                                    bool UseExtraChecksum = false);
35
36 // Insert AddressSanitizer (address sanity checking) instrumentation
37 FunctionPass *createAddressSanitizerFunctionPass();
38 ModulePass *createAddressSanitizerModulePass();
39 // Insert MemorySanitizer instrumentation (detection of uninitialized reads)
40 FunctionPass *createMemorySanitizerPass();
41 // Insert ThreadSanitizer (race detection) instrumentation
42 FunctionPass *createThreadSanitizerPass();
43
44
45 // BoundsChecking - This pass instruments the code to perform run-time bounds
46 // checking on loads, stores, and other memory intrinsics.
47 FunctionPass *createBoundsCheckingPass();
48
49 } // End llvm namespace
50
51 #endif