diff options
author | Sebastian Poeplau <sebastian.poeplau@eurecom.fr> | 2020-08-26 10:29:35 +0200 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2020-09-03 19:16:15 +0100 |
commit | 45a194b06a98fe781a5547df174df50bd9ed9132 (patch) | |
tree | 27a41e57f6c240331a067a5efa454ffa3c723dee /lib | |
parent | 5a4823df4f3ead642e4a6e84a972db5ed61a075a (diff) | |
download | klee-45a194b06a98fe781a5547df174df50bd9ed9132.tar.gz |
Guard process-tree compression with a command-line switch
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Core/PTree.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/Core/PTree.cpp b/lib/Core/PTree.cpp index 4d2931cb..af5dbc36 100644 --- a/lib/Core/PTree.cpp +++ b/lib/Core/PTree.cpp @@ -13,11 +13,23 @@ #include "klee/Expr/Expr.h" #include "klee/Expr/ExprPPrinter.h" +#include "klee/Support/OptionCategories.h" #include <bitset> #include <vector> using namespace klee; +using namespace llvm; + +namespace { + +cl::opt<bool> + CompressProcessTree("compress-process-tree", + cl::desc("Remove intermediate nodes in the process " + "tree whenever possible (default=false)"), + cl::init(false), cl::cat(MiscCat)); + +} // namespace PTree::PTree(ExecutionState *initialState) : root(PTreeNodePtr(new PTreeNode(nullptr, initialState))) { @@ -55,7 +67,7 @@ void PTree::remove(PTreeNode *n) { n = p; } while (n && !n->left.getPointer() && !n->right.getPointer()); - if (n) { + if (n && CompressProcessTree) { // We're now at a node that has exactly one child; we've just deleted the // other one. Eliminate the node and connect its child to the parent // directly (if it's not the root). |