From 2a75a6d6fdb665d92bafee75cb9c08ca3cc05ea1 Mon Sep 17 00:00:00 2001 From: Martin Nowack Date: Thu, 12 Oct 2023 11:16:18 +0100 Subject: Refactor invocation of old pass manager into legacy function --- lib/Module/ModuleHelper.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 lib/Module/ModuleHelper.h (limited to 'lib/Module/ModuleHelper.h') 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 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 preservedFunctions); +} // namespace klee + +#endif // KLEE_MODULEHELPER_H -- cgit 1.4.1