Skip to content

Commit a7971a0

Browse files
committed
Add BN_NOINLINE for keeping cold paths out of hot functions
1 parent c54968e commit a7971a0

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

base/compiler.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,13 @@
9696
#else
9797
#define BN_EMPTY_BASES
9898
#endif
99+
100+
// BN_NOINLINE
101+
//
102+
// Suppress inlining of a function at its call sites.
103+
104+
#if defined(_MSC_VER)
105+
#define BN_NOINLINE __declspec(noinline)
106+
#else
107+
#define BN_NOINLINE __attribute__((noinline))
108+
#endif

0 commit comments

Comments
 (0)