Compile out GroupVarint on non-Intel
authorOwen Yamauchi <oyamauchi@fb.com>
Thu, 21 Mar 2013 19:13:39 +0000 (12:13 -0700)
committerOwen Yamauchi <oyamauchi@fb.com>
Wed, 27 Mar 2013 21:40:17 +0000 (14:40 -0700)
commit5d43d2ab506d7b02a54ef5a5e1d662a1911d1aa2
tree9d0056f25a4c6d4f7a935b5b6186f981d3c3f77a
parent244a89966aa1bead86e9c2fb1263bbe8d837be28
Compile out GroupVarint on non-Intel

Summary:
Compile out instead of erroring.

In an ideal world, we'd have a fallback that would work across platforms
(i.e. no SSE, no unaligned 32-bit writes etc.) and compile some version
of GroupVarint in all environments. I actually tried this; the SSE stuff
is all behind #if __SSSE3__ already, so I thought it could work (modulo
the unaligned-writes problem). I ran into problems with the
SSSE3-vs.-not distinction that @simpkins alluded to in D652764, and
decided I'd rather not open that can of worms at the moment.

Test Plan:
fbmake runtests. Manually force the #ifs to false and make
sure fbmake runtests still passes (although GroupVarintTest is empty).

Reviewed By: delong.j@fb.com

FB internal diff: D747150
folly/GroupVarint.cpp
folly/GroupVarint.h
folly/build/generate_varint_tables.py
folly/test/GroupVarintTest.cpp