switch back to inline assembly in compression::instructions v2016.10.03.00
authorPhilip Pronin <philipp@fb.com>
Mon, 3 Oct 2016 04:25:03 +0000 (21:25 -0700)
committerFacebook Github Bot <facebook-github-bot-bot@fb.com>
Mon, 3 Oct 2016 04:38:26 +0000 (21:38 -0700)
commit11e98e939c840f416e38ecd7a0208f518a99e5c1
tree5279fffdf892bc5405420c1e8da120825b82c183
parent806a09e4bc1624dadee3622e9acbd4b3fa5cf5af
switch back to inline assembly in compression::instructions

Summary:
D3278901 never worked, GCC (at least 4.9) failed to propagate
`FOLLY_TARGET_ATTRIBUTE("arch=haswell")` down, `blsr` and `select64`
weren't inlined in EF coding on Haswell, showing up in CPU profile.

This diff switches back to inline assembly, removing second dispatching
mechanism (IFUNC; in additional to caller-side `Default` / `Nehalem` / `Haswell`
dispatching) for `compression::instructions`, and disables functionality on
compilers not supporting AT&T syntax (MSVC++) for now.

Added `FOLLY_ALWAYS_INLINE` to make sure failure to inline results in
compilation failure.

Reviewed By: ot

Differential Revision: D3959438

fbshipit-source-id: e40573fbfbf38991caa2cd70293aeaeeec3afad7
folly/experimental/Instructions.h
folly/experimental/Select64.h