mirror of
https://github.com/matrix-construct/construct
synced 2024-12-27 07:54:05 +01:00
ircd::spirit: Isolate aggressive inlining; remove unit-level setting.
This commit is contained in:
parent
ae2bc801f9
commit
1a756f637f
2 changed files with 13 additions and 13 deletions
10
configure.ac
10
configure.ac
|
@ -2370,16 +2370,6 @@ SPIRIT_UNIT_CPPFLAGS+=" -include ircd/spirit.h"
|
||||||
|
|
||||||
AC_SUBST(SPIRIT_UNIT_CXXFLAGS)
|
AC_SUBST(SPIRIT_UNIT_CXXFLAGS)
|
||||||
|
|
||||||
dnl Slightly more aggressive than the default of 250. A large number of
|
|
||||||
dnl internal functions are generated out of some grammars at the default.
|
|
||||||
dnl The more aggressive value embeds rules together for optimization but
|
|
||||||
dnl may generate slightly larger functions.
|
|
||||||
AM_COND_IF([CLANG],
|
|
||||||
[
|
|
||||||
SPIRIT_UNIT_CXXFLAGS+=" -mllvm -inlinehint-threshold=1000"
|
|
||||||
SPIRIT_UNIT_CXXFLAGS+=" -mllvm -inline-threshold=400"
|
|
||||||
])
|
|
||||||
|
|
||||||
AM_COND_IF([GCC],
|
AM_COND_IF([GCC],
|
||||||
[
|
[
|
||||||
SPIRIT_UNIT_CXXFLAGS+=" -fno-var-tracking"
|
SPIRIT_UNIT_CXXFLAGS+=" -fno-var-tracking"
|
||||||
|
|
|
@ -26,12 +26,19 @@
|
||||||
// some false asserts around boolean character tests in spirit.
|
// some false asserts around boolean character tests in spirit.
|
||||||
#define BOOST_DISABLE_ASSERTS
|
#define BOOST_DISABLE_ASSERTS
|
||||||
|
|
||||||
#pragma GCC visibility push(default)
|
// This prevents spirit grammar rules from generating a very large and/or deep
|
||||||
|
// call-graph where rules compose together using wrapped indirect calls through
|
||||||
|
// boost::function -- this is higly inefficient as the grammar's logic ends up
|
||||||
|
// being a fraction of the generated code and the rest is invocation related
|
||||||
|
// overhead. By force-flattening here we can allow each entry-point into
|
||||||
|
// spirit to compose rules at once and eliminate the wrapping complex.
|
||||||
|
#pragma clang attribute push ([[gnu::always_inline]], apply_to = function)
|
||||||
|
#pragma clang attribute push ([[gnu::flatten]], apply_to = function)
|
||||||
|
|
||||||
#include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
#include <boost/function.hpp>
|
#include <boost/function.hpp>
|
||||||
#pragma GCC visibility pop
|
|
||||||
|
|
||||||
#pragma GCC visibility push(hidden)
|
#pragma GCC visibility push (internal)
|
||||||
#include <boost/fusion/sequence.hpp>
|
#include <boost/fusion/sequence.hpp>
|
||||||
#include <boost/fusion/iterator.hpp>
|
#include <boost/fusion/iterator.hpp>
|
||||||
#include <boost/fusion/adapted.hpp>
|
#include <boost/fusion/adapted.hpp>
|
||||||
|
@ -45,6 +52,9 @@
|
||||||
#include <boost/spirit/repository/include/qi_subrule.hpp>
|
#include <boost/spirit/repository/include/qi_subrule.hpp>
|
||||||
#pragma GCC visibility pop
|
#pragma GCC visibility pop
|
||||||
|
|
||||||
|
#pragma clang attribute pop
|
||||||
|
#pragma clang attribute pop
|
||||||
|
|
||||||
namespace ircd {
|
namespace ircd {
|
||||||
namespace spirit
|
namespace spirit
|
||||||
__attribute__((visibility("default")))
|
__attribute__((visibility("default")))
|
||||||
|
|
Loading…
Reference in a new issue