Don't use a red zone for code coverage if the user specified `-mno-red-zone'.
[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 #include "llvm/ADT/StringRef.h"
18
19 namespace llvm {
20
21 class ModulePass;
22 class FunctionPass;
23
24 // Insert edge profiling instrumentation
25 ModulePass *createEdgeProfilerPass();
26
27 // Insert optimal edge profiling instrumentation
28 ModulePass *createOptimalEdgeProfilerPass();
29
30 // Insert path profiling instrumentation
31 ModulePass *createPathProfilerPass();
32
33 // Insert GCOV profiling instrumentation
34 ModulePass *createGCOVProfilerPass(bool EmitNotes = true, bool EmitData = true,
35                                    bool Use402Format = false,
36                                    bool UseExtraChecksum = false,
37                                    bool NoRedZone = false);
38
39 // Insert AddressSanitizer (address sanity checking) instrumentation
40 FunctionPass *createAddressSanitizerFunctionPass(
41     bool CheckInitOrder = false, bool CheckUseAfterReturn = false,
42     bool CheckLifetime = false, StringRef BlacklistFile = StringRef());
43 ModulePass *createAddressSanitizerModulePass(
44     bool CheckInitOrder = false, StringRef BlacklistFile = StringRef());
45
46 // Insert MemorySanitizer instrumentation (detection of uninitialized reads)
47 FunctionPass *createMemorySanitizerPass();
48
49 // Insert ThreadSanitizer (race detection) instrumentation
50 FunctionPass *createThreadSanitizerPass();
51
52
53 // BoundsChecking - This pass instruments the code to perform run-time bounds
54 // checking on loads, stores, and other memory intrinsics.
55 FunctionPass *createBoundsCheckingPass();
56
57 } // End llvm namespace
58
59 #endif