Don't attempt to autoload ints from is_a()

Summary: Fixes facebook/hhvm#4337

Reviewed By: @paulbiss, @elgenie

Differential Revision: D1701715

Signature: t1:1701715:1416874204:20c909c2e95a108273c9e2a67f0849f01f72f653
Turn off most of insertPhis

Summary: It's using incorrect values from predecessor blocks because it doesn't
distinguish between states on the taken or next edge.  Also this isn't the
place we want to do this long term (LCM pass or something should do it
instead).  We can't turn off the stacks yet, though.

Reviewed By: @swtaarrs

Differential Revision: D1698939
Move LocalStateHook driving out of FrameStateMgr

Summary: This lets refcount opts talk to it directly.  But it still requires a
FrameStateMgr& for now to be able to call MInstrEffects::get (which wants to
read the old type of a local on the other side of a pointer, and is assuming
FrameStateMgr knows what that type is, although it only kinda does (not really
sound after gen time)).  Also gets rid of forEachFrame (unused) and makes the
forEachLocal callback match how it's used.

walkAllInlinedLocals also only has a single callsite now, which needs it
because of the skipFrame stuff.  (You can't null the locals out more than once
or refcount opts thinks it's consuming things too many times.)

Reviewed By: @swtaarrs

Differential Revision: D1699847
Remove runtime/test/refcount-opts.cpp

Summary: It's the only user of FrameStateMgr's second constructor, which I want
to remove, and you can't pass a dummy marker to the normal constructor instead
as we end up hitting hasFunc assertions (which looks like it's explicitly
testing that it's not a dummy).  I could make it work (or leave the
constructor), but I think this test's days are numbered anyway, since we're
going to need to change how the refcount-opts pass works pretty fundamentally
for it to support arbitrary control flow.  So unless someone really likes it
can I delete it?

Reviewed By: @swtaarrs

Differential Revision: D1699848

Signature: t1:1699848:1416854866:70d6f636671ac0dd6c46773702e296b2d7003bc9
Fix frameSpansCall bugs, remove 'clearing' code and add m_status asserts

Summary: There was no merging at all of the frameSpansCall state, and the way
we handled it at a loop header or with an unprocessed pred was incorrect (it
left it dangling as whatever it used to be).  Rename it to make it clearer that
it's may-information, and refactor the various clear/reset state functions so
they don't exist anymore.  Expanded m_status with some assertions: it's pretty
clear with the status assertions that this class is still doing 3 unrelated
things (finding a fixed point, dag-only-legacy-reoptimize-or-analyze-stuff, and
the building mode), so it should be split up further.

Reviewed By: @swtaarrs

Differential Revision: D1699849

Signature: t1:1699849:1416856507:403366c23fa1471eaa1ded1486725ed93b83ad15
Remove LocalStateHook& from startBlock

Summary: Refcount opts doesn't support loops (or user-level dags), and is the
only user, so we can remove this code.

Reviewed By: @swtaarrs

Differential Revision: D1699850
Remove HhbcTranslator::replace

Summary: Probably dates to when EvalStack was a member of HhbcTranslator.

Reviewed By: @swtaarrs

Differential Revision: D1699851

Signature: t1:1699851:1416854158:f9374084856b9ea46433145241f91ced04479c25
Remove marker from FrameState

Summary: It seemed weird to duplicate spOff and curFunc with the marker, and
then I was a little worried that it isn't handle the same way for merging.  It
turns out it wasn't broken, just not necessary: ir-builder is just storing its
next-to-gen-marker there for presumably historical reasons.

This also changes splitEdge to use the marker from the source jump instead of
the destination, which seems to make more sense to me, but I think we could
choose either.

Reviewed By: @alexmalyshev

Differential Revision: D1699852

Signature: t1:1699852:1416889935:4735fb88a4ec8ed3f24a4d5937275e3fa7d2319b
Fix bundled PCRE build

Summary: Do not pass the "REQUIRED" argument when finding PCRE, since we now have
a bundled PCRE which we can use in the absence of a system library. The
only effect of REQUIRED was to make FIND_PACKAGE_HANDLE_STANDARD_ARGS()
fail with an error.
Closes https://github.com/facebook/hhvm/pull/4342

Reviewed By: @fredemmott

Differential Revision: D1706218

Signature: t1:1706218:1417023737:6d291bcddb6dd21273e12263614e4a59524b3d09