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
22 // Insert edge profiling instrumentation
23 ModulePass *createEdgeProfilerPass();
25 // Insert optimal edge profiling instrumentation
26 ModulePass *createOptimalEdgeProfilerPass();
28 // Insert path profiling instrumentation
29 ModulePass *createPathProfilerPass();
31 // Insert GCOV profiling instrumentation
32 ModulePass *createGCOVProfilerPass(bool EmitNotes = true, bool EmitData = true,
33 bool Use402Format = false,
34 bool UseExtraChecksum = false);
36 // Insert AddressSanitizer (address sanity checking) instrumentation
37 FunctionPass *createAddressSanitizerFunctionPass(
38 bool CheckInitOrder = false, bool CheckUseAfterReturn = false,
39 bool CheckLifetime = false);
40 ModulePass *createAddressSanitizerModulePass(bool CheckInitOrder = false);
41 // Insert MemorySanitizer instrumentation (detection of uninitialized reads)
42 FunctionPass *createMemorySanitizerPass();
43 // Insert ThreadSanitizer (race detection) instrumentation
44 FunctionPass *createThreadSanitizerPass();
47 // BoundsChecking - This pass instruments the code to perform run-time bounds
48 // checking on loads, stores, and other memory intrinsics.
49 FunctionPass *createBoundsCheckingPass();
51 } // End llvm namespace