LLVM: lib/Transforms/Instrumentation/RealtimeSanitizer.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

21

24

25using namespace llvm;

26

29

32 for (Value *Arg : FunctionArgs)

34 return Types;

35}

36

38 const char *FunctionName,

46 Builder.CreateCall(Func, FunctionArgs);

47}

48

50 const char *InsertFnName,

53 FunctionArgs);

54}

55

57 const char *InsertFnName,

62}

63

69

75

82

87 {},

88

89

91

93 if (F.empty())

94 continue;

95

96 if (F.hasFnAttribute(Attribute::SanitizeRealtime))

98

99 if (F.hasFnAttribute(Attribute::SanitizeRealtimeBlocking))

101 }

102

104}

Expand Atomic instructions

Module.h This file contains the declarations for the Module class.

ModuleAnalysisManager MAM

static SmallVector< Type * > getArgTypes(ArrayRef< Value * > FunctionArgs)

Definition RealtimeSanitizer.cpp:30

static PreservedAnalyses runSanitizeRealtime(Function &Fn)

Definition RealtimeSanitizer.cpp:70

static PreservedAnalyses rtsanPreservedCFGAnalyses()

Definition RealtimeSanitizer.cpp:64

static PreservedAnalyses runSanitizeRealtimeBlocking(Function &Fn)

Definition RealtimeSanitizer.cpp:76

static void insertCallAtAllFunctionExitPoints(Function &Fn, const char *InsertFnName, ArrayRef< Value * > FunctionArgs)

Definition RealtimeSanitizer.cpp:56

static void insertCallBeforeInstruction(Function &Fn, Instruction &Instruction, const char *FunctionName, ArrayRef< Value * > FunctionArgs)

Definition RealtimeSanitizer.cpp:37

const char kRtsanInitName[]

Definition RealtimeSanitizer.cpp:28

static void insertCallAtFunctionEntryPoint(Function &Fn, const char *InsertFnName, ArrayRef< Value * > FunctionArgs)

Definition RealtimeSanitizer.cpp:49

const char kRtsanModuleCtorName[]

Definition RealtimeSanitizer.cpp:27

ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...

const Instruction & front() const

Represents analyses that only rely on functions' control flow.

A handy container for a FunctionType+Callee-pointer pair, which can be passed around as a single enti...

static LLVM_ABI FunctionType * get(Type *Result, ArrayRef< Type * > Params, bool isVarArg)

This static method is the primary way of constructing a FunctionType.

const BasicBlock & front() const

LLVMContext & getContext() const

getContext - Return a reference to the LLVMContext associated with this function.

Module * getParent()

Get the module that this global value is contained inside of...

CallInst * CreateCall(FunctionType *FTy, Value *Callee, ArrayRef< Value * > Args={}, const Twine &Name="", MDNode *FPMathTag=nullptr)

This provides a uniform API for creating instructions and inserting them into a basic block: either a...

This is an important class for using LLVM in a threaded context.

A Module instance is used to store all the information related to an LLVM module.

FunctionCallee getOrInsertFunction(StringRef Name, FunctionType *T, AttributeList AttributeList)

Look up the specified function in the module symbol table.

A set of analyses that are preserved following a run of a transformation pass.

static PreservedAnalyses none()

Convenience factory function for the empty preserved set.

PreservedAnalyses & preserveSet()

Mark an analysis set as preserved.

void push_back(const T &Elt)

This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.

static LLVM_ABI Type * getVoidTy(LLVMContext &C)

LLVM Value Representation.

LLVM_ABI StringRef getName() const

Return a constant reference to the value's name.

Pass manager infrastructure for declaring and invalidating analyses.

This is an optimization pass for GlobalISel generic memory operations.

LLVM_ABI std::pair< Function *, FunctionCallee > getOrCreateSanitizerCtorAndInitFunctions(Module &M, StringRef CtorName, StringRef InitName, ArrayRef< Type * > InitArgTypes, ArrayRef< Value * > InitArgs, function_ref< void(Function *, FunctionCallee)> FunctionsCreatedCallback, StringRef VersionCheckName=StringRef(), bool Weak=false)

Creates sanitizer constructor function lazily.

bool isa(const From &Val)

isa - Return true if the parameter to the template is an instance of one of the template type argu...

LLVM_ABI void appendToGlobalCtors(Module &M, Function *F, int Priority, Constant *Data=nullptr)

Append F to the list of global ctors of module M with the given Priority.

DEMANGLE_ABI std::string demangle(std::string_view MangledName)

Attempt to demangle a string using different demangling schemes.

AnalysisManager< Module > ModuleAnalysisManager

Convenience typedef for the Module analysis manager.

LLVM_ABI PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)

Definition RealtimeSanitizer.cpp:83