diff options
| author | Martin Nowack <m.nowack@imperial.ac.uk> | 2023-10-12 11:16:18 +0100 |
|---|---|---|
| committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2024-02-08 13:17:19 +0000 |
| commit | 2a75a6d6fdb665d92bafee75cb9c08ca3cc05ea1 (patch) | |
| tree | ea95b2da9ff1b93bd1c2230b5065325f46d08fcc /lib/Module/ModuleHelper.h | |
| parent | 2b75ab2af15527c9051f1d236427232bb2295d93 (diff) | |
| download | klee-2a75a6d6fdb665d92bafee75cb9c08ca3cc05ea1.tar.gz | |
Refactor invocation of old pass manager into legacy function
Diffstat (limited to 'lib/Module/ModuleHelper.h')
| -rw-r--r-- | lib/Module/ModuleHelper.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/lib/Module/ModuleHelper.h b/lib/Module/ModuleHelper.h new file mode 100644 index 00000000..1b279edd --- /dev/null +++ b/lib/Module/ModuleHelper.h @@ -0,0 +1,37 @@ +//===-- ModuleHelper.h ------------------------------------------*- C++ -*-===// +// +// The KLEE Symbolic Virtual Machine +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef KLEE_MODULEHELPER_H +#define KLEE_MODULEHELPER_H + +#include "llvm/ADT/ArrayRef.h" +#include "llvm/IR/Module.h" + +namespace klee { +enum class SwitchImplType { + eSwitchTypeSimple, + eSwitchTypeLLVM, + eSwitchTypeInternal +}; + +void optimiseAndPrepare(bool OptimiseKLEECall, bool Optimize, + SwitchImplType SwitchType, std::string EntryPoint, + llvm::ArrayRef<const char *> preservedFunctions, + llvm::Module *module); +void checkModule(bool DontVerfify, llvm::Module *module); +void instrument(bool CheckDivZero, bool CheckOvershift, llvm::Module *module); + +void injectStaticConstructorsAndDestructors(llvm::Module *m, + llvm::StringRef entryFunction); + +void optimizeModule(llvm::Module *M, + llvm::ArrayRef<const char *> preservedFunctions); +} // namespace klee + +#endif // KLEE_MODULEHELPER_H |
