Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New macros galore (mostly codegen related) #82

Closed
wants to merge 8 commits into from

Conversation

psiha
Copy link

@psiha psiha commented Nov 16, 2015

New macros that mostly control codegen and/or provide optimiser hints. I don't expect this PR to be accepted as is, rather as a discussion starting point on what to do 'with all this'. I'll start a dedicated boost.devel thread where everyone can chime in...

BOOST_ASSUME(_UNCHECKED)()
BOOST_UNREACHABLE(_UNCHECKED)()
BOOST_UNREACHABLE()
BOOST_DEFAULT_CASE_UNREACHABLE(_UNCHECKED)()

BOOST_NOVTABLE
BOOST_OPTIMIZE_FOR_SPEED_BEGIN()
BOOST_OPTIMIZE_FOR_SPEED_END()
BOOST_OPTIMIZE_FOR_SIZE_BEGIN()
BOOST_OPTIMIZE_FOR_SIZE_END()
BOOST_FAST_MATH_(ON/OFF/ON_BEGIN/ON_END/OFF_BEGIN/OFF_END)()

BOOST_RESTRICTED
BOOST_RESTRICTED_PTR
BOOST_RESTRICTED_REF
BOOST_RESTRICTED_THIS
BOOST_NO_STRICT_ALIASING
BOOST_HAS_UNION_TYPE_PUNNING_TRICK
BOOST_HAS_MAY_ALIAS
BOOST_MAY_ALIAS

BOOST_HAS_OVERRIDABLE_SYMBOL
BOOST_OVERRIDABLE_SYMBOL
BOOST_OVERRIDABLE_MEMBER_SYMBOL
BOOST_OVERRIDABLE_FUNCTION

BOOST_CC_* (calling conventions: CDECL, FASTCALL, STDCALL, VECTORCALL, STACK, REG_ABI, REG)

BOOST_OVERRIDE
BOOST_FINAL
BOOST_NOTHROW_LITE

BOOST_ATTRIBUTES( ... ) function attributes macro, attributes prefixed with BOOST_:

  • EXCEPTIONLESS
  • DOES_NOT_RETURN
  • WARN_UNUSED_RESULT
  • RESTRICTED_FUNCTION_L1/L2/L3
  • RESTRICTED_FUNCTION_RETURN
  • HOT
  • COLD
  • MINSIZE

@psiha psiha changed the title Develop New macros galore (mostly codegen related) Dec 5, 2015
BOOST_ASSUME(_UNCHECKED)()
BOOST_UNREACHABLE(_UNCHECKED)()
BOOST_UNREACHABLE()
BOOST_DEFAULT_CASE_UNREACHABLE(_UNCHECKED)()
BOOST_OVERRIDE
BOOST_FINAL
BOOST_NOTHROW_LITE
BOOST_NOVTABLE
BOOST_OPTIMIZE_FOR_SPEED_BEGIN()
BOOST_OPTIMIZE_FOR_SPEED_END()
BOOST_OPTIMIZE_FOR_SIZE_BEGIN()
BOOST_OPTIMIZE_FOR_SIZE_END()
BOOST_FAST_MATH_(ON/OFF/ON_BEGIN/ON_END/OFF_BEGIN/OFF_END)()
BOOST_RESTRICTED
BOOST_RESTRICTED_PTR
BOOST_RESTRICTED_REF
BOOST_NO_STRICT_ALIASING
BOOST_HAS_UNION_TYPE_PUNNING_TRICK
BOOST_HAS_MAY_ALIAS
BOOST_MAY_ALIAS
BOOST_HAS_OVERRIDABLE_SYMBOL
BOOST_OVERRIDABLE_SYMBOL
BOOST_CC_CDECL
BOOST_CC_FASTCALL
BOOST_CC_STDCALL
BOOST_CC_STACK
BOOST_CC_REG_ABI
BOOST_CC_REG

(provided implementations only for MSVC, Clang and GCC&clones)
…OST_UNREACHABLE_UNCHECKED macro defining logic in some circumnstances).
MSVC: added implementations for the BOOST_RESTRICTED_PTR abd BOOST_RESTRICTED_REF macros.
 - new function attribute macros (EXCEPTIONLESS, DOES_NOT_RETURN and WARN_UNUSED_RESULT)
 - BOOST_THREAD_LOCAL_POD macro
 - BOOST_OVERRIDABLE_MEMBER_SYMBOL and BOOST_OVERRIDABLE_FUNCTION macros.
Updated the documentation.
@psiha
Copy link
Author

psiha commented Sep 3, 2016

FWIW: standalone version @ https://github.com/psiha/config_ex until I finally catch the time to apply the input from http://lists.boost.org/Archives/boost/2015/11/226556.php to actually get this included...

@jeking3
Copy link
Contributor

jeking3 commented Nov 1, 2018

Reminder - this has been sitting here for a long time untouched.

@jzmaddock
Copy link
Collaborator

As I recall this was raised on the ML and didn't find much support, IMO it's too much in one go as well, unless there are calls from library authors for support for this I'm not inclined to merge.

Closing for now.

@jzmaddock jzmaddock closed this Nov 2, 2018
@Kojoley Kojoley mentioned this pull request Nov 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants