summaryrefslogtreecommitdiff
path: root/src/theory/fp/fp_converter.cpp
diff options
context:
space:
mode:
authorAndres Noetzli <noetzli@amazon.com>2021-04-02 15:43:15 -0700
committerAndres Noetzli <noetzli@amazon.com>2021-04-02 17:59:17 -0700
commitfc6336a011e099bfeff9c9ddd134f7aa6dad47b8 (patch)
tree43a98b7dd3ad2c942967c019a3a33f9095d27b3e /src/theory/fp/fp_converter.cpp
parentfba1437c772b6733ce678b93b5ef7d95e366c82d (diff)
Remove template argument from `NodeBuilder`an/refactor/NodeBuilder
Currently, `NodeBuilder` takes a single template argument: An integer that determines the expected number of arguments. This argument is used to determine the size of the `d_inlineNvChildSpace` array. This array is used to construct nodes inline. The advantage of this is that we don't have to allocate a `NodeValue` on the heap for the node under construction until we are sure that the node is new. While templating the array size may save some stack space (or avoid a heap allocation if we statically know that we a fixed number of children and that number is greater than 10), it complicates the code and leads to longer compile times. Thus, this commit removes the template argument and moves some of the `NodeBuilder` code to a source file for faster compilation. CPU build time before change (debug build): 2429.68s CPU build time after change (debug build): 2228.44s
Diffstat (limited to 'src/theory/fp/fp_converter.cpp')
-rw-r--r--src/theory/fp/fp_converter.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/theory/fp/fp_converter.cpp b/src/theory/fp/fp_converter.cpp
index 3b5a115c8..1d124045b 100644
--- a/src/theory/fp/fp_converter.cpp
+++ b/src/theory/fp/fp_converter.cpp
@@ -648,7 +648,7 @@ symbolicBitVector<false> symbolicBitVector<isSigned>::toUnsigned(void) const
template <>
symbolicBitVector<true> symbolicBitVector<true>::extend(bwt extension) const
{
- NodeBuilder<> construct(kind::BITVECTOR_SIGN_EXTEND);
+ NodeBuilder construct(kind::BITVECTOR_SIGN_EXTEND);
construct << NodeManager::currentNM()->mkConst<BitVectorSignExtend>(
BitVectorSignExtend(extension))
<< *this;
@@ -659,7 +659,7 @@ symbolicBitVector<true> symbolicBitVector<true>::extend(bwt extension) const
template <>
symbolicBitVector<false> symbolicBitVector<false>::extend(bwt extension) const
{
- NodeBuilder<> construct(kind::BITVECTOR_ZERO_EXTEND);
+ NodeBuilder construct(kind::BITVECTOR_ZERO_EXTEND);
construct << NodeManager::currentNM()->mkConst<BitVectorZeroExtend>(
BitVectorZeroExtend(extension))
<< *this;
@@ -673,7 +673,7 @@ symbolicBitVector<isSigned> symbolicBitVector<isSigned>::contract(
{
Assert(this->getWidth() > reduction);
- NodeBuilder<> construct(kind::BITVECTOR_EXTRACT);
+ NodeBuilder construct(kind::BITVECTOR_EXTRACT);
construct << NodeManager::currentNM()->mkConst<BitVectorExtract>(
BitVectorExtract((this->getWidth() - 1) - reduction, 0))
<< *this;
@@ -724,7 +724,7 @@ symbolicBitVector<isSigned> symbolicBitVector<isSigned>::extract(
{
Assert(upper >= lower);
- NodeBuilder<> construct(kind::BITVECTOR_EXTRACT);
+ NodeBuilder construct(kind::BITVECTOR_EXTRACT);
construct << NodeManager::currentNM()->mkConst<BitVectorExtract>(
BitVectorExtract(upper, lower))
<< *this;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback