about summary refs log tree commit diff homepage
path: root/lib
AgeCommit message (Collapse)Author
2018-10-24ShiftChecker: Avoid unneeded checksMartin Nowack
Do not instrument shift operations with constant shift operations that are smaller than the type size.
2018-10-24ShiftCheck: Use llvm::Builder instead of Inst::Create*Martin Nowack
Use llvm::Builder instead of Inst::Create* to create instruction. This handles metadata automatically and does instruction folding if possible. Updated to C++11 and clang-formatted.
2018-10-24DivCheck do not instrument multiple timesMartin Nowack
DivChecker can be executed multiple times due to the new linking process. Avoid instrumenting div instructions multiple times by annotating checked instructions with marker. Only unmarked div instructions will be instrumented.
2018-10-24DivCheck Skip unneeded checksMartin Nowack
Do not instrument divisions which do have a constant non-zero value.
2018-10-24Use llvm::Builder for DivCheck instrumentationMartin Nowack
Use llvm::Builder instead of raw `*Inst::create()` functions. Builder automatically manages metadata (e.g. debug, TBAA, ..) such that we don't have to take care of this automatically. Updated code to C++11 and clang-formated it.
2018-10-24Introduce KLEEIRMetaData to manipulate LLVM-IR metadataMartin Nowack
Simplify the handling of metadata attached to LLVM IR that is specific to KLEE.
2018-10-24Added lowering passRafael Zaehl
2018-10-23refactor klee_open_output_file to return std::unique_ptrJulian Büning
and introduce klee_open_compressed_output_file with similar behavior along some other minor improvements
2018-10-23use klee_open_output_file for uncompressed logsJulian Büning
2018-10-23Updated an include to reflect a recent filename changeCristian Cadar
2018-10-23Move unrelated function from ReadExpr classMartin Nowack
2018-10-23Avoid unsafe static downcastsMartin Nowack
2018-10-23Modernize codeMartin Nowack
* use `using` instead of typdef * use `collection.empty()` instead of size * use `auto` if clear * use `emplace_back` where useful * use `nullptr` instead of NULL * use `override` if applicable * use `explicit` for constructor to avoid implicit conversion
2018-10-23Move optimization specific headers away from the project include directoryMartin Nowack
Don't pollute the project include directory with optimization specific headers.
2018-10-23Clean-up headersMartin Nowack
Remove unneeded headers from include files
2018-10-23Remove condition check before function invocationMartin Nowack
Conditions are checked inside of `optimizeExpr()` anyway. This simplifies the code a lot.
2018-10-23Move ConstantExpr check inside optimizeExpr functionMartin Nowack
2018-10-23optimizeExpr: return the result as return value instead as function argumentMartin Nowack
simplifies code a lot.
2018-10-23Make valueOnly parameter of optimizeExpr explicitMartin Nowack
avoid ambiguity of valueOnly parameter
2018-10-23Fixed compilation of array optimization patch with LLVM >= 4.0Cristian Cadar
2018-10-23Added missing headers and clang-format the filesCristian Cadar
2018-10-23Added support for KLEE value-based array optimizationAndrea Mattavelli
2018-10-23Added support for KLEE index-based array optimizationAndrea Mattavelli
2018-10-16Renamed klee/CommandLine.h to klee/SolverCmdLine.h, since this file is meant ↵Cristian Cadar
to have only solver options.
2018-10-10fix handling of failing external callsFrank Busse
Currently KLEE only handles the first segfault in external calls as it doesn't unblock SIGSEGV afterwards. This patch unblocks the signal and enables handling of multiple failing calls.
2018-10-04kleeModule: always link irreader (required since llvm 3.3)Julian Büning
2018-10-04remove obsolete dependency of kleeModule on kleeCoreJulian Büning
2018-10-03Marking resolve methods as constCristian Cadar
2018-10-03Refactored AddressSpace::resolve() by creating a new function ↵Cristian Cadar
AddressSpace::checkPointerInObject() that is called in both the forward and the backward searches. This makes the code more modular and removes a large part of duplicated code and should also address the non-deterministic coverage in the resolve() function which affects Codecov reports.
2018-09-30Fix a crash when the last running state is terminated during mergingLukas Wölfer
2018-09-20Silence an uninitialized variable compiler warning (and a tiny formatting ↵Cristian Cadar
change)
2018-09-18llvm4: gep_type_iterator has no operator*Jiri Slaby
Starting with LLVM 4, we have getStructTypeOrNull(), so use it. operator* in post-4 will have a different semantics. Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
2018-09-18llvm4: PointerType is not SequentialTypeJiri Slaby
So handle the type specially whenever needed. Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
2018-09-18llvm4: use chrono helpers from LLVMJiri Slaby
LLVM 4 removes the old time interface and starts using the C++11's chrono. So switch to that in klee for LLVM 4 too. Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
2018-09-18llvm4: errorOr and similarJiri Slaby
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
2018-09-18llvm4: APFloat members are functionsJiri Slaby
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
2018-09-18llvm4: handle different header namesJiri Slaby
LLVM 4 renamed and splitted some headers. Take this into account in includes. Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
2018-09-14llvm: make KLEE compile against LLVM 3.9Jiri Slaby
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
2018-09-10Unify the error message if that function has not been found.Martin Nowack
2018-09-10Fix generation of global constructors and destructorsMartin Nowack
Validate if the user-selected entry function exists. Do not assume it is `main`.
2018-09-06Fix missing includes and declarationsMartin Nowack
2018-08-03Replace remaining *Inst::Create() calls with llvm::BuilderMartin Nowack
Replace the remaining occurrences of `Inst::Create()` with `llvm::Builder` to manage metadata automatically and to fold instructions. C++11 it and clang-format
2018-07-28remove last comma from -debug-print-escaping-functionsJulian Büning
2018-07-28add declarations to escapingFunctionsJulian Büning
2018-07-23ModuleUtil: improve and test valueIsOnlyCalledJulian Büning
* handle BlockAddress (which is not a valid function pointer) * there is no instruction with opcode 0 * add test for functionality
2018-07-23fix: LLVM 3.5, begin_user() instead of begin_use()Julian Büning
With version 3.5, LLVM introduced a subtle semantic change in the API of `Value`. With that change, `use_begin()` is renamed to `user_begin()`. Additionally, a new method `use_begin()` with a different meaning was introduced. Now, `use_begin()` actually iterates over `Use`s, whereas before, dereferencing it would give a `User *`. For further details, please refer to https://reviews.llvm.org/rL203364. Due to the reintroduction of `use_begin()`, existing code may still compile, although the semantics have changed. In the code changed with this patch, all `dyn_cast`s for `Use` fail and the else branch is always taken.
2018-07-23ExternalDispatcher: setErrorStr for EngineBuilderJulian Büning
addresses comment made by @adrianherrera in #385
2018-07-12llvm38: no more implicit iteratorsRichard Trembecký
LLVM commit eac309550f25 removed implicit iterator conversions. So we have to get the iterators explicitly now. Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
2018-07-12llvm38: archive child iterator changesJiri Slaby
After LLVM commit 25569fdcdab0, archive iterator returns object::Archive::Child instead of child_iterator, adapt to that. Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
2018-07-12llvm38: adapt to new Linker::linkModulesJiri Slaby
LLVM commit d912be98f8eb changed the prototype of linkModules to accept std::unique_ptr. Adapt to that. Signed-off-by: Jiri Slaby <jirislaby@gmail.com>