diff --git a/barretenberg/cpp/src/barretenberg/benchmark/honk_bench/main.simple.cpp b/barretenberg/cpp/src/barretenberg/benchmark/honk_bench/main.simple.cpp index b33d5a57097..84a2f3c8c88 100644 --- a/barretenberg/cpp/src/barretenberg/benchmark/honk_bench/main.simple.cpp +++ b/barretenberg/cpp/src/barretenberg/benchmark/honk_bench/main.simple.cpp @@ -22,15 +22,6 @@ #include "barretenberg/stdlib/primitives/packed_byte_array/packed_byte_array.hpp" #include "barretenberg/stdlib/primitives/witness/witness.hpp" -// TODO(AD): put this into a header -#if defined(__clang__) -#define BBERG_INSTRUMENT [[clang::xray_always_instrument]] -#define BBERG_NOINLINE [[clang::noinline]] -#else -#define BBERG_INSTRUMENT -#define BBERG_NOINLINE -#endif - using namespace proof_system; template void generate_sha256_test_circuit(Builder& builder, size_t num_iterations) diff --git a/barretenberg/cpp/src/barretenberg/common/inline.hpp b/barretenberg/cpp/src/barretenberg/common/inline.hpp deleted file mode 100644 index ee5be8ac78e..00000000000 --- a/barretenberg/cpp/src/barretenberg/common/inline.hpp +++ /dev/null @@ -1,7 +0,0 @@ -#pragma once - -#ifdef _WIN32 -#define BBERG_INLINE __forceinline inline -#else -#define BBERG_INLINE __attribute__((always_inline)) inline -#endif diff --git a/barretenberg/cpp/src/barretenberg/common/parallel_for_mutex_pool.cpp b/barretenberg/cpp/src/barretenberg/common/parallel_for_mutex_pool.cpp index beb9ab35e5a..47e03b5ea85 100644 --- a/barretenberg/cpp/src/barretenberg/common/parallel_for_mutex_pool.cpp +++ b/barretenberg/cpp/src/barretenberg/common/parallel_for_mutex_pool.cpp @@ -8,6 +8,8 @@ #include #include +#include "barretenberg/common/compiler_hints.hpp" + namespace { class ThreadPool { @@ -50,7 +52,7 @@ class ThreadPool { std::condition_variable complete_condition_; bool stop = false; - [[clang::xray_never_instrument]] void worker_loop(size_t thread_index); + BBERG_NO_INSTRUMENT void worker_loop(size_t thread_index); void do_iterations() { diff --git a/barretenberg/cpp/src/barretenberg/ecc/fields/field_declarations.hpp b/barretenberg/cpp/src/barretenberg/ecc/fields/field_declarations.hpp index 799c202f709..c64b1e35196 100644 --- a/barretenberg/cpp/src/barretenberg/ecc/fields/field_declarations.hpp +++ b/barretenberg/cpp/src/barretenberg/ecc/fields/field_declarations.hpp @@ -1,6 +1,6 @@ #pragma once #include "barretenberg/common/assert.hpp" -#include "barretenberg/common/inline.hpp" +#include "barretenberg/common/compiler_hints.hpp" #include "barretenberg/numeric/random/engine.hpp" #include "barretenberg/numeric/uint128/uint128.hpp" #include "barretenberg/numeric/uint256/uint256.hpp" diff --git a/barretenberg/cpp/src/barretenberg/ecc/groups/element.hpp b/barretenberg/cpp/src/barretenberg/ecc/groups/element.hpp index 3eba4298afb..0b2d13761f4 100644 --- a/barretenberg/cpp/src/barretenberg/ecc/groups/element.hpp +++ b/barretenberg/cpp/src/barretenberg/ecc/groups/element.hpp @@ -1,7 +1,7 @@ #pragma once #include "affine_element.hpp" -#include "barretenberg/common/inline.hpp" +#include "barretenberg/common/compiler_hints.hpp" #include "barretenberg/common/mem.hpp" #include "barretenberg/numeric/random/engine.hpp" #include "barretenberg/numeric/uint256/uint256.hpp"