Use jit::deque instead of jit::vector for cached operands in vasm-graph-color
commit04e258b02976db0568754f7ae75be6cde8083b48
authorRick Lavoie <rlavoie@fb.com>
Tue, 10 Sep 2019 03:37:10 +0000 (9 20:37 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Tue, 10 Sep 2019 03:39:35 +0000 (9 20:39 -0700)
tree70fbe9ac959dce5bd0e47dd9f8cd11b177db458a
parentb4e4fae9d1807f0d1e3c7d04b2372bf0079804bc
Use jit::deque instead of jit::vector for cached operands in vasm-graph-color

Summary:
We guarantee that you can hold a reference to the cached operand
VregSets indefinitely (since we never delete them). However, since
they are stored in jit::vector, we can resize and invalidate
references. Fix this by using jit::deque instead (which guarantees
references to elements are never invalidated).

I'm surprised this was never a problem until now, but with some other
changes this started causing problems.

Reviewed By: ottoni, mofarrell

Differential Revision: D17270519

fbshipit-source-id: a6c740ecbd186117c2adc5f0aaabcbc3cae55ddc
hphp/runtime/vm/jit/vasm-graph-color.cpp