Setup a virtual machine.
Use can use that install script install-hhvm.sh for compiling and installing hiphop https://github.com/jakoch/php-hhvm.
But change the hiphop source in function get_hiphop_source() to the special Magento hiphop https://github.com/danslo/hiphop-php source.
Optionally: You can remove all the last lines after ## Success in the script install-hhvm.sh.
Official FB "How to" compile: https://github.com/facebook/hiphop-php/wiki
Prebuild packages will not work with Magento.
Options for the config.hdf file: https://github.com/facebook/hiphop-php/blob/master/hphp/doc/options.compiled