From 4fc92099b0eb3acfcccd4a87f183712352f8e17a Mon Sep 17 00:00:00 2001 From: Francesco Biscani Date: Sun, 4 Aug 2024 20:11:21 +0200 Subject: [PATCH 1/2] Remove llvm_state::dump_object_code(). --- include/heyoka/llvm_state.hpp | 1 - src/llvm_state.cpp | 18 ------------------ 2 files changed, 19 deletions(-) diff --git a/include/heyoka/llvm_state.hpp b/include/heyoka/llvm_state.hpp index 1c021ecfa..d3b91aa54 100644 --- a/include/heyoka/llvm_state.hpp +++ b/include/heyoka/llvm_state.hpp @@ -315,7 +315,6 @@ class HEYOKA_DLL_PUBLIC llvm_state [[nodiscard]] std::string get_ir() const; [[nodiscard]] std::string get_bc() const; - void dump_object_code(const std::string &) const; [[nodiscard]] const std::string &get_object_code() const; void verify_function(const std::string &); diff --git a/src/llvm_state.cpp b/src/llvm_state.cpp index a5af287bf..47453861f 100644 --- a/src/llvm_state.cpp +++ b/src/llvm_state.cpp @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include @@ -1519,23 +1518,6 @@ std::string llvm_state::get_bc() const } } -// LCOV_EXCL_START - -void llvm_state::dump_object_code(const std::string &filename) const -{ - const auto &oc = get_object_code(); - - std::ofstream ofs; - // NOTE: turn on exceptions, and overwrite any existing content. - ofs.exceptions(std::ifstream::failbit | std::ifstream::badbit); - ofs.open(filename, std::ios_base::out | std::ios::trunc); - - // Write out the binary data to ofs. - ofs.write(oc.data(), boost::numeric_cast(oc.size())); -} - -// LCOV_EXCL_STOP - const std::string &llvm_state::get_object_code() const { if (!is_compiled()) { From ee42757fc10c81382ebba8946ded6363c941991d Mon Sep 17 00:00:00 2001 From: Francesco Biscani Date: Sun, 4 Aug 2024 20:32:33 +0200 Subject: [PATCH 2/2] Remove the verify_function() methods in llvm_state. --- benchmark/penc_comparison.cpp | 6 -- include/heyoka/detail/taylor_common.hpp | 3 - include/heyoka/llvm_state.hpp | 3 - src/continuous_output.cpp | 6 -- src/detail/div.cpp | 9 --- src/detail/event_detection.cpp | 9 --- src/detail/llvm_helpers.cpp | 3 - src/detail/llvm_helpers_celmec.cpp | 12 ---- src/detail/real_helpers.cpp | 10 --- src/detail/sub.cpp | 9 --- src/detail/sum_sq.cpp | 3 - src/detail/tm_data.cpp | 3 - src/expression_cfunc.cpp | 3 - src/func.cpp | 3 - src/llvm_state.cpp | 34 ---------- src/math/acos.cpp | 3 - src/math/acosh.cpp | 3 - src/math/asin.cpp | 3 - src/math/asinh.cpp | 3 - src/math/atan.cpp | 3 - src/math/atan2.cpp | 9 --- src/math/atanh.cpp | 3 - src/math/constants.cpp | 3 - src/math/cos.cpp | 3 - src/math/cosh.cpp | 3 - src/math/erf.cpp | 3 - src/math/exp.cpp | 3 - src/math/kepE.cpp | 9 --- src/math/kepF.cpp | 21 ------ src/math/log.cpp | 3 - src/math/logical.cpp | 3 - src/math/pow.cpp | 9 --- src/math/prod.cpp | 12 ---- src/math/relational.cpp | 3 - src/math/relu.cpp | 6 -- src/math/select.cpp | 3 - src/math/sigmoid.cpp | 3 - src/math/sin.cpp | 3 - src/math/sinh.cpp | 3 - src/math/sum.cpp | 3 - src/math/tan.cpp | 3 - src/math/tanh.cpp | 3 - src/math/time.cpp | 6 -- src/taylor_00.cpp | 6 -- src/taylor_01.cpp | 3 - src/taylor_02.cpp | 6 -- test/llvm_helpers.cpp | 89 +------------------------ test/number.cpp | 28 -------- test/poly_enclosures.cpp | 12 ---- 49 files changed, 1 insertion(+), 394 deletions(-) diff --git a/benchmark/penc_comparison.cpp b/benchmark/penc_comparison.cpp index 123ecb207..5d514b9dc 100644 --- a/benchmark/penc_comparison.cpp +++ b/benchmark/penc_comparison.cpp @@ -100,9 +100,6 @@ void run_benchmark(unsigned order) builder.CreateRetVoid(); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); @@ -130,9 +127,6 @@ void run_benchmark(unsigned order) builder.CreateRetVoid(); - // Verify. - s.verify_function(f); - // Compile. s.compile(); diff --git a/include/heyoka/detail/taylor_common.hpp b/include/heyoka/detail/taylor_common.hpp index 4b74fc223..54e50e6bb 100644 --- a/include/heyoka/detail/taylor_common.hpp +++ b/include/heyoka/detail/taylor_common.hpp @@ -150,9 +150,6 @@ llvm::Function *taylor_c_diff_func_numpar(llvm_state &s, llvm::Type *fp_t, std:: // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } diff --git a/include/heyoka/llvm_state.hpp b/include/heyoka/llvm_state.hpp index d3b91aa54..b14e90c02 100644 --- a/include/heyoka/llvm_state.hpp +++ b/include/heyoka/llvm_state.hpp @@ -317,9 +317,6 @@ class HEYOKA_DLL_PUBLIC llvm_state [[nodiscard]] std::string get_bc() const; [[nodiscard]] const std::string &get_object_code() const; - void verify_function(const std::string &); - void verify_function(llvm::Function *); - [[nodiscard]] bool is_compiled() const; void compile(); diff --git a/src/continuous_output.cpp b/src/continuous_output.cpp index ce83a8ede..1a10f1b8b 100644 --- a/src/continuous_output.cpp +++ b/src/continuous_output.cpp @@ -294,9 +294,6 @@ void continuous_output::add_c_out_function(std::uint32_t order, std::uint32_t // Create the return value. builder.CreateRetVoid(); - // Verify the function. - m_llvm_state.verify_function(f); - // Compile. m_llvm_state.compile(); @@ -981,9 +978,6 @@ void continuous_output_batch::add_c_out_function(std::uint32_t order, std::ui // Create the return value. builder.CreateRetVoid(); - // Verify the function. - m_llvm_state.verify_function(f); - // Compile. m_llvm_state.compile(); diff --git a/src/detail/div.cpp b/src/detail/div.cpp index 717cbb28a..ffc9a8786 100644 --- a/src/detail/div.cpp +++ b/src/detail/div.cpp @@ -273,9 +273,6 @@ llvm::Function *taylor_c_diff_func_div_impl(llvm_state &s, llvm::Type *fp_t, con // Create the return value. builder.CreateRet(llvm_fdiv(s, ret, taylor_c_diff_numparam_codegen(s, fp_t, n, num, par_ptr, batch_size))); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } @@ -367,9 +364,6 @@ llvm::Function *taylor_c_diff_func_div_impl(llvm_state &s, llvm::Type *fp_t, con // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } @@ -436,9 +430,6 @@ llvm::Function *taylor_c_diff_func_div_impl(llvm_state &s, llvm::Type *fp_t, con builder.CreateRet( llvm_fdiv(s, ret, taylor_c_load_diff(s, val_t, diff_ptr, n_uvars, builder.getInt32(0), var_idx1))); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } diff --git a/src/detail/event_detection.cpp b/src/detail/event_detection.cpp index f5bf6a8df..d241f908a 100644 --- a/src/detail/event_detection.cpp +++ b/src/detail/event_detection.cpp @@ -440,9 +440,6 @@ llvm::Function *add_poly_translator_1(llvm_state &s, llvm::Type *fp_t, std::uint // Create the return value. builder.CreateRetVoid(); - // Verify the function. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); @@ -633,9 +630,6 @@ llvm::Function *llvm_add_poly_rtscc(llvm_state &s, llvm::Type *fp_t, std::uint32 // Return. builder.CreateRetVoid(); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); @@ -758,9 +752,6 @@ llvm::Function *llvm_add_fex_check(llvm_state &s, llvm::Type *fp_t, std::uint32_ // Return. builder.CreateRetVoid(); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); diff --git a/src/detail/llvm_helpers.cpp b/src/detail/llvm_helpers.cpp index 279a7609e..987d8b83e 100644 --- a/src/detail/llvm_helpers.cpp +++ b/src/detail/llvm_helpers.cpp @@ -2495,9 +2495,6 @@ llvm::Function *llvm_add_csc(llvm_state &s, llvm::Type *scal_t, std::uint32_t n, // Return. builder.CreateRetVoid(); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } diff --git a/src/detail/llvm_helpers_celmec.cpp b/src/detail/llvm_helpers_celmec.cpp index f411a2736..43ae90dd1 100644 --- a/src/detail/llvm_helpers_celmec.cpp +++ b/src/detail/llvm_helpers_celmec.cpp @@ -602,9 +602,6 @@ llvm::Function *llvm_add_inv_kep_E(llvm_state &s, llvm::Type *fp_t, std::uint32_ // Return the result. builder.CreateRet(builder.CreateLoad(tp, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); @@ -678,9 +675,6 @@ void llvm_add_inv_kep_E_wrapper(llvm_state &s, llvm::Type *scal_t, std::uint32_t // Return. builder.CreateRetVoid(); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } @@ -996,9 +990,6 @@ llvm::Function *llvm_add_inv_kep_F(llvm_state &s, llvm::Type *fp_t, std::uint32_ // Return the result. builder.CreateRet(ret); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); @@ -1307,9 +1298,6 @@ llvm::Function *llvm_add_inv_kep_DE(llvm_state &s, llvm::Type *fp_t, std::uint32 // Return the result. builder.CreateRet(ret); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); diff --git a/src/detail/real_helpers.cpp b/src/detail/real_helpers.cpp index 05c2a9295..284c0cf60 100644 --- a/src/detail/real_helpers.cpp +++ b/src/detail/real_helpers.cpp @@ -351,8 +351,6 @@ llvm::Function *real_nary_op(llvm_state &s, llvm::Type *fp_t, const std::string builder.CreateRet(res); - s.verify_function(f); - builder.SetInsertPoint(orig_bb); } @@ -417,8 +415,6 @@ std::pair llvm_real_sincos(llvm_state &s, llvm::Va builder.CreateRet(res); - s.verify_function(f); - builder.SetInsertPoint(orig_bb); } @@ -478,8 +474,6 @@ llvm::Function *real_nary_cmp(llvm_state &s, llvm::Type *fp_t, const std::string // Truncate the result to a boolean and return. builder.CreateRet(builder.CreateTrunc(cmp_ret, builder.getInt1Ty())); - s.verify_function(f); - builder.SetInsertPoint(orig_bb); } @@ -686,8 +680,6 @@ llvm::Value *llvm_real_ui_to_fp(llvm_state &s, llvm::Value *n, llvm::Type *fp_t) builder.CreateRet(res); - s.verify_function(f); - builder.SetInsertPoint(orig_bb); } @@ -753,8 +745,6 @@ llvm::Value *llvm_real_sgn(llvm_state &s, llvm::Value *x) builder.CreateRet(ret); - s.verify_function(f); - builder.SetInsertPoint(orig_bb); } diff --git a/src/detail/sub.cpp b/src/detail/sub.cpp index 78b5c946a..434fd6fa7 100644 --- a/src/detail/sub.cpp +++ b/src/detail/sub.cpp @@ -272,9 +272,6 @@ llvm::Function *taylor_c_diff_func_sub_impl(llvm_state &s, llvm::Type *fp_t, con // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } @@ -345,9 +342,6 @@ llvm::Function *taylor_c_diff_func_sub_impl(llvm_state &s, llvm::Type *fp_t, con // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } @@ -402,9 +396,6 @@ llvm::Function *taylor_c_diff_func_sub_impl(llvm_state &s, llvm::Type *fp_t, con // Create the return value. builder.CreateRet(llvm_fsub(s, v0, v1)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } diff --git a/src/detail/sum_sq.cpp b/src/detail/sum_sq.cpp index eabbd65e3..f40c08413 100644 --- a/src/detail/sum_sq.cpp +++ b/src/detail/sum_sq.cpp @@ -507,9 +507,6 @@ llvm::Function *sum_sq_taylor_c_diff_func_impl(llvm_state &s, llvm::Type *fp_t, // Create the return value. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } diff --git a/src/detail/tm_data.cpp b/src/detail/tm_data.cpp index 58b3f9c37..aae9b701d 100644 --- a/src/detail/tm_data.cpp +++ b/src/detail/tm_data.cpp @@ -321,9 +321,6 @@ void add_tm_func_nc_mode(llvm_state &st, const std::vector &state, const var_ // Create the return value. builder.CreateRetVoid(); - - // Verify the function. - st.verify_function(f); } } // namespace diff --git a/src/expression_cfunc.cpp b/src/expression_cfunc.cpp index 81b260025..f77e73f2e 100644 --- a/src/expression_cfunc.cpp +++ b/src/expression_cfunc.cpp @@ -1528,9 +1528,6 @@ auto add_cfunc_impl(llvm_state &s, const std::string &name, const F &fn, std::ui // Finish off the function. builder.CreateRetVoid(); - // Verify it. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); diff --git a/src/func.cpp b/src/func.cpp index 6a742ef89..6e6c7a462 100644 --- a/src/func.cpp +++ b/src/func.cpp @@ -931,9 +931,6 @@ llvm::Function *llvm_c_eval_func_helper(const std::string &name, // Return it. builder.CreateRet(ret); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } diff --git a/src/llvm_state.cpp b/src/llvm_state.cpp index 47453861f..42410b2cc 100644 --- a/src/llvm_state.cpp +++ b/src/llvm_state.cpp @@ -1250,40 +1250,6 @@ void llvm_state::check_compiled(const char *f) const } } -void llvm_state::verify_function(llvm::Function *f) -{ - check_uncompiled(__func__); - - if (f == nullptr) { - throw std::invalid_argument("Cannot verify a null function pointer"); - } - - std::string err_report; - llvm::raw_string_ostream ostr(err_report); - if (llvm::verifyFunction(*f, &ostr)) { - // Remove function before throwing. - const auto fname = std::string(f->getName()); - f->eraseFromParent(); - - throw std::invalid_argument(fmt::format( - "The verification of the function '{}' failed. The full error message:\n{}", fname, ostr.str())); - } -} - -void llvm_state::verify_function(const std::string &name) -{ - check_uncompiled(__func__); - - // Lookup the function in the module. - auto *f = m_module->getFunction(name); - if (f == nullptr) { - throw std::invalid_argument(fmt::format("The function '{}' does not exist in the module", name)); - } - - // Run the actual check. - verify_function(f); -} - void llvm_state::optimise() { // NOTE: we used to fetch the target triple from the lljit object, diff --git a/src/math/acos.cpp b/src/math/acos.cpp index c90707e26..06d8bad1a 100644 --- a/src/math/acos.cpp +++ b/src/math/acos.cpp @@ -355,9 +355,6 @@ llvm::Function *taylor_c_diff_func_acos_impl(llvm_state &s, llvm::Type *fp_t, co // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } diff --git a/src/math/acosh.cpp b/src/math/acosh.cpp index 8d3c7826a..60d164676 100644 --- a/src/math/acosh.cpp +++ b/src/math/acosh.cpp @@ -346,9 +346,6 @@ llvm::Function *taylor_c_diff_func_acosh_impl(llvm_state &s, llvm::Type *fp_t, c // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } diff --git a/src/math/asin.cpp b/src/math/asin.cpp index c44fa58f0..85b104895 100644 --- a/src/math/asin.cpp +++ b/src/math/asin.cpp @@ -353,9 +353,6 @@ llvm::Function *taylor_c_diff_func_asin_impl(llvm_state &s, llvm::Type *fp_t, co // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } diff --git a/src/math/asinh.cpp b/src/math/asinh.cpp index 772ab7e58..ab7adff7f 100644 --- a/src/math/asinh.cpp +++ b/src/math/asinh.cpp @@ -346,9 +346,6 @@ llvm::Function *taylor_c_diff_func_asinh_impl(llvm_state &s, llvm::Type *fp_t, c // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } diff --git a/src/math/atan.cpp b/src/math/atan.cpp index 9af9ea2d9..fed03a14b 100644 --- a/src/math/atan.cpp +++ b/src/math/atan.cpp @@ -344,9 +344,6 @@ llvm::Function *taylor_c_diff_func_atan_impl(llvm_state &s, llvm::Type *fp_t, co // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } diff --git a/src/math/atan2.cpp b/src/math/atan2.cpp index 321c37bb5..d7c761910 100644 --- a/src/math/atan2.cpp +++ b/src/math/atan2.cpp @@ -501,9 +501,6 @@ llvm::Function *taylor_c_diff_func_atan2_impl(llvm_state &s, llvm::Type *fp_t, c // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } @@ -608,9 +605,6 @@ llvm::Function *taylor_c_diff_func_atan2_impl(llvm_state &s, llvm::Type *fp_t, c // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } @@ -725,9 +719,6 @@ llvm::Function *taylor_c_diff_func_atan2_impl(llvm_state &s, llvm::Type *fp_t, c // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } diff --git a/src/math/atanh.cpp b/src/math/atanh.cpp index dabe31c4c..a4865b0e7 100644 --- a/src/math/atanh.cpp +++ b/src/math/atanh.cpp @@ -344,9 +344,6 @@ llvm::Function *taylor_c_diff_func_atanh_impl(llvm_state &s, llvm::Type *fp_t, c // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } diff --git a/src/math/constants.cpp b/src/math/constants.cpp index 5bf06107c..ab454c016 100644 --- a/src/math/constants.cpp +++ b/src/math/constants.cpp @@ -327,9 +327,6 @@ llvm::Function *constant::taylor_c_diff_func(llvm_state &s, llvm::Type *fp_t, st // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } diff --git a/src/math/cos.cpp b/src/math/cos.cpp index 6f2a58a75..7167276c7 100644 --- a/src/math/cos.cpp +++ b/src/math/cos.cpp @@ -303,9 +303,6 @@ llvm::Function *taylor_c_diff_func_cos_impl(llvm_state &s, llvm::Type *fp_t, con // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } diff --git a/src/math/cosh.cpp b/src/math/cosh.cpp index f324c94a2..f13e657b5 100644 --- a/src/math/cosh.cpp +++ b/src/math/cosh.cpp @@ -306,9 +306,6 @@ llvm::Function *taylor_c_diff_func_cosh_impl(llvm_state &s, llvm::Type *fp_t, co // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } diff --git a/src/math/erf.cpp b/src/math/erf.cpp index de5e93175..8cd162ca8 100644 --- a/src/math/erf.cpp +++ b/src/math/erf.cpp @@ -359,9 +359,6 @@ llvm::Function *taylor_c_diff_func_erf_impl(llvm_state &s, llvm::Type *fp_t, con // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } diff --git a/src/math/exp.cpp b/src/math/exp.cpp index 394431b4a..0ab918707 100644 --- a/src/math/exp.cpp +++ b/src/math/exp.cpp @@ -275,9 +275,6 @@ llvm::Function *taylor_c_diff_func_exp_impl(llvm_state &s, llvm::Type *fp_t, con // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } diff --git a/src/math/kepE.cpp b/src/math/kepE.cpp index d17737f93..a8705979e 100644 --- a/src/math/kepE.cpp +++ b/src/math/kepE.cpp @@ -567,9 +567,6 @@ llvm::Function *taylor_c_diff_func_kepE_impl(llvm_state &s, llvm::Type *fp_t, co // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } @@ -676,9 +673,6 @@ llvm::Function *taylor_c_diff_func_kepE_impl(llvm_state &s, llvm::Type *fp_t, co // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } @@ -792,9 +786,6 @@ llvm::Function *taylor_c_diff_func_kepE_impl(llvm_state &s, llvm::Type *fp_t, co // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } diff --git a/src/math/kepF.cpp b/src/math/kepF.cpp index b08cc5784..28a8b72dc 100644 --- a/src/math/kepF.cpp +++ b/src/math/kepF.cpp @@ -925,9 +925,6 @@ llvm::Function *taylor_c_diff_func_kepF_impl(llvm_state &s, llvm::Type *fp_t, co // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); @@ -1049,9 +1046,6 @@ llvm::Function *taylor_c_diff_func_kepF_impl(llvm_state &s, llvm::Type *fp_t, co // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); @@ -1174,9 +1168,6 @@ llvm::Function *taylor_c_diff_func_kepF_impl(llvm_state &s, llvm::Type *fp_t, co // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); @@ -1300,9 +1291,6 @@ llvm::Function *taylor_c_diff_func_kepF_impl(llvm_state &s, llvm::Type *fp_t, co // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); @@ -1426,9 +1414,6 @@ llvm::Function *taylor_c_diff_func_kepF_impl(llvm_state &s, llvm::Type *fp_t, co // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); @@ -1559,9 +1544,6 @@ llvm::Function *taylor_c_diff_func_kepF_impl(llvm_state &s, llvm::Type *fp_t, co // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); @@ -1693,9 +1675,6 @@ llvm::Function *taylor_c_diff_func_kepF_impl(llvm_state &s, llvm::Type *fp_t, co // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); diff --git a/src/math/log.cpp b/src/math/log.cpp index c80d9824d..8c004fc4a 100644 --- a/src/math/log.cpp +++ b/src/math/log.cpp @@ -296,9 +296,6 @@ llvm::Function *taylor_c_diff_func_log_impl(llvm_state &s, llvm::Type *fp_t, con // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } diff --git a/src/math/logical.cpp b/src/math/logical.cpp index 883ce63af..ddf6d5e19 100644 --- a/src/math/logical.cpp +++ b/src/math/logical.cpp @@ -242,9 +242,6 @@ llvm::Function *taylor_c_diff_func_logical_andor_impl(const func_base &fb, llvm_ builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); diff --git a/src/math/pow.cpp b/src/math/pow.cpp index 3513dcd4f..399f62aef 100644 --- a/src/math/pow.cpp +++ b/src/math/pow.cpp @@ -731,9 +731,6 @@ llvm::Function *taylor_c_diff_func_square_impl(llvm_state &s, llvm::Type *fp_t, // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } @@ -847,9 +844,6 @@ llvm::Function *taylor_c_diff_func_sqrt_impl(llvm_state &s, llvm::Type *fp_t, co // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } @@ -968,9 +962,6 @@ llvm::Function *taylor_c_diff_func_pow_impl(llvm_state &s, llvm::Type *fp_t, con // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } diff --git a/src/math/prod.cpp b/src/math/prod.cpp index d2699820d..37d33f7f2 100644 --- a/src/math/prod.cpp +++ b/src/math/prod.cpp @@ -547,9 +547,6 @@ llvm::Function *prod_taylor_c_diff_func_impl(llvm_state &s, llvm::Type *fp_t, co // Create the return value. builder.CreateRet(llvm_fmul(s, ret, taylor_c_diff_numparam_codegen(s, fp_t, n, num, par_ptr, batch_size))); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } @@ -602,9 +599,6 @@ llvm::Function *taylor_c_diff_func_neg_impl(llvm_state &s, llvm::Type *fp_t, con // Return the result. builder.CreateRet(retval); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } @@ -667,9 +661,6 @@ llvm::Function *prod_taylor_c_diff_func_impl(llvm_state &s, llvm::Type *fp_t, co // Create the return value. builder.CreateRet(llvm_fmul(s, ret, taylor_c_diff_numparam_codegen(s, fp_t, n, num, par_ptr, batch_size))); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } @@ -731,9 +722,6 @@ llvm::Function *prod_taylor_c_diff_func_impl(llvm_state &s, llvm::Type *fp_t, co // Create the return value. builder.CreateRet(builder.CreateLoad(val_t, acc)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } diff --git a/src/math/relational.cpp b/src/math/relational.cpp index ed50d5bf8..530cb2bb5 100644 --- a/src/math/relational.cpp +++ b/src/math/relational.cpp @@ -342,9 +342,6 @@ llvm::Function *rel_impl::taylor_c_diff_func(llvm_state &s, llvm::Type *fp_t, st builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); diff --git a/src/math/relu.cpp b/src/math/relu.cpp index 1bb985530..a2c67d3d1 100644 --- a/src/math/relu.cpp +++ b/src/math/relu.cpp @@ -311,9 +311,6 @@ llvm::Function *taylor_c_diff_func_relu_impl(llvm_state &s, llvm::Type *fp_t, co builder.CreateRet(builder.CreateSelect(llvm_fcmp_ogt(s, u_zero, zero_c), u_ord, llvm_fmul(s, slope_c, u_ord))); } - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); @@ -583,9 +580,6 @@ llvm::Function *taylor_c_diff_func_relup_impl(llvm_state &s, llvm::Type *fp_t, c // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); diff --git a/src/math/select.cpp b/src/math/select.cpp index 10c487a01..7fed9eda9 100644 --- a/src/math/select.cpp +++ b/src/math/select.cpp @@ -265,9 +265,6 @@ llvm::Function *select_impl::taylor_c_diff_func(llvm_state &s, llvm::Type *fp_t, builder.CreateRet(select_eval_impl(s, vals)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); diff --git a/src/math/sigmoid.cpp b/src/math/sigmoid.cpp index f408d9a9d..b4097a890 100644 --- a/src/math/sigmoid.cpp +++ b/src/math/sigmoid.cpp @@ -344,9 +344,6 @@ llvm::Function *taylor_c_diff_func_sigmoid_impl(llvm_state &s, llvm::Type *fp_t, // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } diff --git a/src/math/sin.cpp b/src/math/sin.cpp index caf7cd588..3e8ef3f29 100644 --- a/src/math/sin.cpp +++ b/src/math/sin.cpp @@ -305,9 +305,6 @@ llvm::Function *taylor_c_diff_func_sin_impl(llvm_state &s, llvm::Type *fp_t, con // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } diff --git a/src/math/sinh.cpp b/src/math/sinh.cpp index 286e62d5b..1120ce716 100644 --- a/src/math/sinh.cpp +++ b/src/math/sinh.cpp @@ -307,9 +307,6 @@ llvm::Function *taylor_c_diff_func_sinh_impl(llvm_state &s, llvm::Type *fp_t, co // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } diff --git a/src/math/sum.cpp b/src/math/sum.cpp index 4825ec709..5459b75ca 100644 --- a/src/math/sum.cpp +++ b/src/math/sum.cpp @@ -386,9 +386,6 @@ llvm::Function *sum_taylor_c_diff_func_impl(llvm_state &s, llvm::Type *fp_t, con builder.CreateRet(pairwise_sum(s, vals)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } diff --git a/src/math/tan.cpp b/src/math/tan.cpp index 4f6c011a2..41d013513 100644 --- a/src/math/tan.cpp +++ b/src/math/tan.cpp @@ -300,9 +300,6 @@ llvm::Function *taylor_c_diff_func_tan_impl(llvm_state &s, llvm::Type *fp_t, con // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } diff --git a/src/math/tanh.cpp b/src/math/tanh.cpp index 0d2035f7f..7896967ad 100644 --- a/src/math/tanh.cpp +++ b/src/math/tanh.cpp @@ -310,9 +310,6 @@ llvm::Function *taylor_c_diff_func_tanh_impl(llvm_state &s, llvm::Type *fp_t, co // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } diff --git a/src/math/time.cpp b/src/math/time.cpp index 9342feeaa..e1ee3ebcc 100644 --- a/src/math/time.cpp +++ b/src/math/time.cpp @@ -117,9 +117,6 @@ llvm::Function *time_impl::llvm_c_eval_func(llvm_state &s, llvm::Type *fp_t, std // Return it. builder.CreateRet(ret); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } @@ -235,9 +232,6 @@ llvm::Function *taylor_c_diff_time_impl(llvm_state &s, llvm::Type *fp_t, std::ui // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } diff --git a/src/taylor_00.cpp b/src/taylor_00.cpp index ae4e63404..031316fc1 100644 --- a/src/taylor_00.cpp +++ b/src/taylor_00.cpp @@ -685,9 +685,6 @@ taylor_dc_t taylor_add_adaptive_step_with_events(llvm_state &s, llvm::Type *ext_ // Create the return value. builder.CreateRetVoid(); - // Verify the function. - s.verify_function(f); - return dc; } @@ -833,9 +830,6 @@ taylor_dc_t taylor_add_adaptive_step(llvm_state &s, llvm::Type *ext_fp_t, llvm:: // Create the return value. builder.CreateRetVoid(); - // Verify the function. - s.verify_function(f); - return dc; } diff --git a/src/taylor_01.cpp b/src/taylor_01.cpp index 562138f49..8f6b9c047 100644 --- a/src/taylor_01.cpp +++ b/src/taylor_01.cpp @@ -1102,9 +1102,6 @@ void taylor_add_d_out_function(llvm_state &s, llvm::Type *fp_scal_t, std::uint32 // Create the return value. builder.CreateRetVoid(); - // Verify the function. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); } diff --git a/src/taylor_02.cpp b/src/taylor_02.cpp index c1307072b..62568abc1 100644 --- a/src/taylor_02.cpp +++ b/src/taylor_02.cpp @@ -857,9 +857,6 @@ std::pair taylor_compute_jet_compact_mode( // Return. builder.CreateRetVoid(); - // Verify. - s.verify_function(worker); - // Create the wrapper function. This will execute multiple calls // to the worker in parallel, until the entire range [0, ncalls) has // been consumed. @@ -878,9 +875,6 @@ std::pair taylor_compute_jet_compact_mode( // Return. builder.CreateRetVoid(); - // Verify. - s.verify_function(wrapper); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); diff --git a/test/llvm_helpers.cpp b/test/llvm_helpers.cpp index aed6f8b5f..711f09216 100644 --- a/test/llvm_helpers.cpp +++ b/test/llvm_helpers.cpp @@ -97,9 +97,6 @@ TEST_CASE("sgn scalar") // Create the return value. builder.CreateRet(llvm_sgn(s, x)); - // Verify. - s.verify_function(f); - // Compile. s.compile(); @@ -148,9 +145,6 @@ TEST_CASE("sgn scalar mp") // Create the return value. builder.CreateRet(llvm_sgn(s, x)); - // Verify. - s.verify_function(f); - // Compile. s.compile(); @@ -217,9 +211,6 @@ TEST_CASE("sgn batch") builder.CreateRetVoid(); - // Verify. - s.verify_function(f); - // Compile. s.compile(); @@ -285,9 +276,6 @@ TEST_CASE("sincos scalar") // Create the return value. builder.CreateRetVoid(); - // Verify. - s.verify_function(f); - // Compile. s.compile(); @@ -349,9 +337,6 @@ TEST_CASE("sincos batch") // Create the return value. builder.CreateRetVoid(); - // Verify. - s.verify_function(f); - // Compile. s.compile(); @@ -417,9 +402,6 @@ TEST_CASE("sincos mp") // Create the return value. builder.CreateRetVoid(); - // Verify. - s.verify_function(f); - // Compile. s.compile(); @@ -993,9 +975,6 @@ TEST_CASE("while_loop") // Return the result. builder.CreateRet(builder.CreateLoad(val_t, retval)); - // Verify. - s.verify_function(f); - // Compile. s.compile(); @@ -1043,8 +1022,7 @@ TEST_CASE("while_loop") // exceptions? auto thrower = [&]() { try { - llvm_while_loop( - s, [&]() -> llvm::Value * { throw std::runtime_error{"aa"}; }, [&]() {}); + llvm_while_loop(s, [&]() -> llvm::Value * { throw std::runtime_error{"aa"}; }, [&]() {}); } catch (...) { f->eraseFromParent(); @@ -1288,9 +1266,6 @@ TEST_CASE("minmax") // Create the return value. builder.CreateRetVoid(); - // Verify. - s.verify_function(f); - // llvm_max. f = llvm::Function::Create(ft, llvm::Function::ExternalLinkage, "max", &md); @@ -1310,9 +1285,6 @@ TEST_CASE("minmax") // Create the return value. builder.CreateRetVoid(); - // Verify. - s.verify_function(f); - // llvm_min_nan. f = llvm::Function::Create(ft, llvm::Function::ExternalLinkage, "min_nan", &md); @@ -1332,9 +1304,6 @@ TEST_CASE("minmax") // Create the return value. builder.CreateRetVoid(); - // Verify. - s.verify_function(f); - // llvm_max_nan. f = llvm::Function::Create(ft, llvm::Function::ExternalLinkage, "max_nan", &md); @@ -1354,9 +1323,6 @@ TEST_CASE("minmax") // Create the return value. builder.CreateRetVoid(); - // Verify. - s.verify_function(f); - // Compile. s.compile(); @@ -1498,9 +1464,6 @@ TEST_CASE("fma scalar") builder.CreateRet(llvm_fma(s, x, y, z)); - // Verify. - s.verify_function(f); - // Compile. s.compile(); @@ -1556,9 +1519,6 @@ TEST_CASE("fma batch") builder.CreateRetVoid(); - // Verify. - s.verify_function(f); - // Compile. s.compile(); @@ -1628,9 +1588,6 @@ TEST_CASE("fma scalar mp") builder.CreateRetVoid(); - // Verify. - s.verify_function(f); - // Compile. s.compile(); @@ -1691,9 +1648,6 @@ TEST_CASE("eft_product scalar") builder.CreateRetVoid(); - // Verify. - s.verify_function(f); - // Compile. s.compile(); @@ -1773,9 +1727,6 @@ TEST_CASE("eft_product batch") builder.CreateRetVoid(); - // Verify. - s.verify_function(f); - // Compile. s.compile(); @@ -1869,9 +1820,6 @@ TEST_CASE("dl mul scalar") builder.CreateRetVoid(); - // Verify. - s.verify_function(f); - // Compile. s.compile(); @@ -1974,9 +1922,6 @@ TEST_CASE("dl mul batch") builder.CreateRetVoid(); - // Verify. - s.verify_function(f); - // Compile. s.compile(); // Fetch the function pointer. @@ -2090,9 +2035,6 @@ TEST_CASE("dl div scalar") builder.CreateRetVoid(); - // Verify. - s.verify_function(f); - // Compile. s.compile(); @@ -2191,9 +2133,6 @@ TEST_CASE("dl div batch") builder.CreateRetVoid(); - // Verify. - s.verify_function(f); - // Compile. s.compile(); // Fetch the function pointer. @@ -2288,9 +2227,6 @@ TEST_CASE("floor scalar") builder.CreateRet(llvm_floor(s, x)); - // Verify. - s.verify_function(f); - // Compile. s.compile(); @@ -2341,9 +2277,6 @@ TEST_CASE("floor batch") builder.CreateRetVoid(); - // Verify. - s.verify_function(f); - // Compile. s.compile(); @@ -2409,9 +2342,6 @@ TEST_CASE("dl floor scalar") builder.CreateRetVoid(); - // Verify. - s.verify_function(f); - // Compile. s.compile(); @@ -2496,9 +2426,6 @@ TEST_CASE("dl floor batch") builder.CreateRetVoid(); - // Verify. - s.verify_function(f); - // Compile. s.compile(); @@ -2592,9 +2519,6 @@ TEST_CASE("dl modulus scalar") builder.CreateRetVoid(); - // Verify. - s.verify_function(f); - // Compile. s.compile(); @@ -2677,9 +2601,6 @@ TEST_CASE("dl modulus batch") builder.CreateRetVoid(); - // Verify. - s.verify_function(f); - // Compile. s.compile(); @@ -2921,8 +2842,6 @@ TEST_CASE("real_ext_load") builder.CreateRetVoid(); - s.verify_function(f); - s.compile(); auto f_ptr = reinterpret_cast(s.jit_lookup("test")); @@ -2962,8 +2881,6 @@ TEST_CASE("switch") builder.CreateRet(builder.CreateLoad(builder.getInt32Ty(), out_storage)); - s.verify_function(f); - s.compile(); auto f_ptr = reinterpret_cast(s.jit_lookup("test")); @@ -2994,8 +2911,6 @@ TEST_CASE("switch") builder.CreateRet(builder.CreateLoad(builder.getInt32Ty(), out_storage)); - s.verify_function(f); - s.compile(); auto f_ptr = reinterpret_cast(s.jit_lookup("test")); @@ -3028,8 +2943,6 @@ TEST_CASE("switch") builder.CreateRet(builder.CreateLoad(builder.getInt32Ty(), out_storage)); - s.verify_function(f); - s.compile(); auto f_ptr = reinterpret_cast(s.jit_lookup("test")); diff --git a/test/number.cpp b/test/number.cpp index 2afe9c486..f22881578 100644 --- a/test/number.cpp +++ b/test/number.cpp @@ -365,8 +365,6 @@ TEST_CASE("llvm_codegen") builder.CreateRet(llvm_codegen(s, fp_t, number{boost::math::constants::pi()})); - s.verify_function(f); - s.compile(); auto f_ptr = reinterpret_cast(s.jit_lookup("test")); @@ -391,8 +389,6 @@ TEST_CASE("llvm_codegen") builder.CreateRet(llvm_codegen(s, fp_t, number{-std::numeric_limits::infinity()})); - s.verify_function(f); - s.compile(); auto f_ptr = reinterpret_cast(s.jit_lookup("test")); @@ -416,8 +412,6 @@ TEST_CASE("llvm_codegen") builder.CreateRet(llvm_codegen(s, fp_t, number{-std::numeric_limits::quiet_NaN()})); - s.verify_function(f); - s.compile(); auto f_ptr = reinterpret_cast(s.jit_lookup("test")); @@ -444,8 +438,6 @@ TEST_CASE("llvm_codegen") builder.CreateRet(llvm_codegen(s, fp_t, number{boost::math::constants::pi()})); - s.verify_function(f); - s.compile(); auto f_ptr = reinterpret_cast(s.jit_lookup("test")); @@ -470,8 +462,6 @@ TEST_CASE("llvm_codegen") builder.CreateRet(llvm_codegen(s, fp_t, number{-std::numeric_limits::infinity()})); - s.verify_function(f); - s.compile(); auto f_ptr = reinterpret_cast(s.jit_lookup("test")); @@ -495,8 +485,6 @@ TEST_CASE("llvm_codegen") builder.CreateRet(llvm_codegen(s, fp_t, number{-std::numeric_limits::quiet_NaN()})); - s.verify_function(f); - s.compile(); auto f_ptr = reinterpret_cast(s.jit_lookup("test")); @@ -525,8 +513,6 @@ TEST_CASE("llvm_codegen") builder.CreateRet(llvm_codegen(s, fp_t, number{mppp::pi_128})); - s.verify_function(f); - s.compile(); auto f_ptr = reinterpret_cast(s.jit_lookup("test")); @@ -551,8 +537,6 @@ TEST_CASE("llvm_codegen") builder.CreateRet(llvm_codegen(s, fp_t, number{-std::numeric_limits::infinity()})); - s.verify_function(f); - s.compile(); auto f_ptr = reinterpret_cast(s.jit_lookup("test")); @@ -576,8 +560,6 @@ TEST_CASE("llvm_codegen") builder.CreateRet(llvm_codegen(s, fp_t, number{-std::numeric_limits::quiet_NaN()})); - s.verify_function(f); - s.compile(); auto f_ptr = reinterpret_cast(s.jit_lookup("test")); @@ -604,8 +586,6 @@ TEST_CASE("llvm_codegen") builder.CreateRet(llvm_codegen(s, fp_t, number{boost::math::constants::pi()})); - s.verify_function(f); - s.compile(); auto f_ptr = reinterpret_cast(s.jit_lookup("test")); @@ -630,8 +610,6 @@ TEST_CASE("llvm_codegen") builder.CreateRet(llvm_codegen(s, fp_t, number{boost::math::constants::pi()})); - s.verify_function(f); - s.compile(); auto f_ptr = reinterpret_cast(s.jit_lookup("test")); @@ -655,8 +633,6 @@ TEST_CASE("llvm_codegen") builder.CreateRet(llvm_codegen(s, fp_t, number{boost::math::constants::pi()})); - s.verify_function(f); - s.compile(); auto f_ptr = reinterpret_cast(s.jit_lookup("test")); @@ -683,8 +659,6 @@ TEST_CASE("llvm_codegen") builder.CreateRet(llvm_codegen(s, fp_t, number{mppp::real_pi(256)})); - s.verify_function(f); - s.compile(); auto f_ptr = reinterpret_cast(s.jit_lookup("test")); @@ -715,8 +689,6 @@ TEST_CASE("llvm_codegen") builder.CreateRetVoid(); - s.verify_function(f); - s.compile(); auto f_ptr = reinterpret_cast(s.jit_lookup("test")); diff --git a/test/poly_enclosures.cpp b/test/poly_enclosures.cpp index 25529f2c9..0d4979567 100644 --- a/test/poly_enclosures.cpp +++ b/test/poly_enclosures.cpp @@ -108,9 +108,6 @@ TEST_CASE("polynomial enclosures") builder.CreateRetVoid(); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); @@ -138,9 +135,6 @@ TEST_CASE("polynomial enclosures") builder.CreateRetVoid(); - // Verify. - s.verify_function(f); - // Compile. s.compile(); @@ -249,9 +243,6 @@ TEST_CASE("polynomial enclosures mp") builder.CreateRetVoid(); - // Verify. - s.verify_function(f); - // Restore the original insertion block. builder.SetInsertPoint(orig_bb); @@ -279,9 +270,6 @@ TEST_CASE("polynomial enclosures mp") builder.CreateRetVoid(); - // Verify. - s.verify_function(f); - // Compile. s.compile();