Disable xhp test for unparser.

Reviewed By: @paroski, @elgenie

Differential Revision: D1741708

Signature: t1:1741708:1418703859:629ec0d54165bd35a1e6d9dd207fd6dd3f059265
Don't sink IncRefs past SyncABIRegs

Summary: SyncABIRegs is supposed to ensure cross-tracelet ABI registers are in
the proper state for leaving the trace, so we shouldn't have anything between
it and the exit following it. We've never verified or depended on this, but the
llvm backend does check some aspects of it now, and this was causing a failure
in one repo mode test.

Reviewed By: @ottoni

Differential Revision: D1739443

Signature: t1:1739443:1418667644:9ea10fe09915ae0fb55215ff22d0b656a14db7e2
Fix some test*im operand sizes

Summary: We were using cmpqim and testlim on the same memory address, first to
check a pointer for null and then to inspect something in its bottom half. This
is only ok on little-endian machines, and the LLVM optimizer will do funky
things to endianness-dependent code. I shuffled things around so we always emit
a properly-sized test instruction in code-gen-x64.cpp, and vasm-x64.cpp will
emit a smaller instruction when appropriate. I know the instruction-shrinking
logic in vasm-x64.cpp could be smarter than it is; I decided to keep it exactly
as smart as it was before for simplicity.

Reviewed By: @jasone

Differential Revision: D1737884

Signature: t1:1737884:1418431658:638373b0d36ab6e731513d355c9306c93c121154
Add timers for llvm codegen

Summary: This will give us a rough idea of how much time we spend in the
various parts of the llvm backend. I considered adding a mode to Timer that
aborts if we punt by throwing an exception, but it looks like it's not possible
to get that 100% correct until std::uncaught_exceptions() in C++17.

Reviewed By: @jasone

Differential Revision: D1739445

Signature: t1:1739445:1418674406:e61081656e29da64c2ddabd98477cf0eab099bb7
Get test/quick passing under llvm

Summary: With this diff, all of test/quick passes with the llvm backend. We're
still punting on a few things (most notably bindcall), but this at least means
the stuff we do support is reasonably correct.

- Pass argument types to Intrinsic::getDeclaration for rounding, sqrt.
- Enable sse4.1 in ExecutionEngine.
- Allocate .rodata sections in mcg->globaData() so they stick around past
  codegen time (llvm likes to put double constants in .rodata).
- Make sure values from vcall's simdArgs tuple are passed as doubles.
- Change loadb to loadtqb, meaning load truncated quad to byte. This is
  necessary because we store Bools as 8 bytes but load them as 1 byte: if we
  actually emit llir with 8 byte stores and 1 byte loads to/from the same
  address the alias analysis pass gets upset.
- Make sure the m_data field of a TypedValue arguments to C++ helpers is always
  passed in a GP register, even when it's a double.

Reviewed By: @jasone

Differential Revision: D1738259

Signature: t1:1738259:1418671189:2a01f24f991302923660b6085678bbc2029e54f7
Fix some llvm issues from test/slow

Summary: - Fix a few places in code-gen-x64.cpp that should've been defining i8, not i64
- Split asInt into zext and narrow, requiring callers to be more explicit
- Class::classof can return a bool now that we handle it properly in the jit
- Add --llvm option to test/run
- Move some tracing around to make debugging locrec issues easier

Reviewed By: @jasone

Differential Revision: D1738588

Signature: t1:1738588:1418673994:fa8a102ab6bed3102f7fc2c9c0b7abb3ec4a276d
Fix ReflectionParameter::getClass() for self

Summary: fixes facebook/hhvm#4465

{sync, type="child", parent="internal", parentrevid="1742311", parentrevfbid="731149410302611", parentdiffid="5962255"}

Reviewed By: @JoelMarcey

Differential Revision: D1742311

Signature: t1:1742311:1418744128:2a04ebe20d1d47c81d9c4a01c949badbe4487389
Remove calls to ObjectData::o_getArray(arr, false).

Summary: The second argument already defaults to false.

While I'm here, make some Class* arguments into const Class*.

Reviewed By: @swtaarrs

Differential Revision: D1741711

Signature: t1:1741711:1418723072:aa3c21c17a5fa7617162cae9154a89b05dcaea23
Enable dead code warnings in typing/

Summary: @pikatchu said it was worth keeping the SubstPos code around,
because we ideally should re-implement it at some point. It was disabled
because it was buggy, but working right it would still be a useful
feature. To avoid OCaml yelling at us for unused code, we declare the
relevant functions in `mli`s.

Reviewed By: @elgenie

Differential Revision: D1742207

Signature: t1:1742207:1418746019:22aebbc9f8e6e099df3b6a3258206846a6ff0cb7
Delete unused method HttpServer::abortServers

Summary: Nothing calls it.

Reviewed By: @markw65

Differential Revision: D1741431

Signature: t1:1741431:1418741669:c3f49036452315a45b66509e3044ed343a680d0b
fix typo in name of LibreSSL in HPHPFindLibs.cmake

Summary: Closes https://github.com/facebook/hhvm/pull/4466

Reviewed By: @paulbiss

Differential Revision: D1742589

Signature: t1:1742589:1418766759:958691750c0a399ff9bb7114d2702538da36f943
Build with system fastlz if it exists

Summary: Fedora ships with fastlz package. This PR allows you to build with it.
Closes https://github.com/facebook/hhvm/pull/4470

Reviewed By: @paulbiss

Differential Revision: D1742586

Signature: t1:1742586:1418766893:37c3a5a36762769c2cd88aed57853020cfebfbe5
Fix infinite recursion in `non_null`

Summary: We need a more systematic way to deal with this, but let's fix
the worst one now.

Reviewed By: @elgenie

Differential Revision: D1743486
Update vfsstream framework test.

Summary: Update vfsstream framework test to include a fix for
vfsStreamWrapperWithoutRootTestCase::canNotOpen.
Closes https://github.com/facebook/hhvm/pull/4438

Reviewed By: @JoelMarcey

Differential Revision: D1737384

Signature: t1:1737384:1418767465:8f3c57e189d7bafae159dcfdd7012e712d28d1cc
Delete Class::zGetSProp.

Summary: It only had one callsite, inside of EZC. Inline that callsite and add an assert
that the returned sprop is not Uninit.

Reviewed By: @paulbiss

Differential Revision: D1742950

Signature: t1:1742950:1418759196:fb6f9218614904c59e1fd2fdc3d864321a89fdd9
Move verbose setting into benchy_config

Summary: Verbosity applies across all of the benchy scripts, so move it
into a central place so that it works correctly.

Reviewed By: @jdelong

Differential Revision: D1740138

Signature: t1:1740138:1418758374:ae750b3d59f76cd04d7d95964e44ad01f389b96a
Tell LLVM not to allocate space for stubs.

Summary: Disallow stub space allocation in LLVM.

Reviewed By: @jasone

Differential Revision: D1743007
Widen start/len of embedded_data to 64-bits

Summary: The ASAN-ified, unstripped binary is >4GiB, so the offset of systemlib
doesn't fit in 32 bits.

Reviewed By: @edwinsmith

Differential Revision: D1742979
Simplify ExtendsClass, InstanceOf, and InstanceOfIface

Summary: These cases are really hard to hit in the JIT right now, because
guard-relaxation likes to relax away a lot of specialized object
guards, and cases where the result of instanceof is known statically are
removed by some combination of hphpc and hhbbc.

That said, I would still like to be able to simplify them in the JIT.

I tested this by turning off guard-relaxation and looking at some
examples, plus running the test suite.

Reviewed By: @swtaarrs

Differential Revision: D1738285

Signature: t1:1738285:1418721826:6622d0c7da0ba7a63d317d28ad6c744eb3e65248
memcpy needs to be in .text.memcpy

Summary: It was in .text, so the linker script couldn't place it,
and it was ending up outside the map-huge portion of the text section
of the binary.

Reviewed By: @ottoni

Differential Revision: D1744089

Signature: t1:1744089:1418774491:2dd29f46100159efed7a8fca64165c284a14f97e