Implement Not in terms of XorBool

Programming / Compilers / HHVM - Edwin Smith [fb.com] - 7 March 2014 12:09 EST

We need XorBool anyway, and in fact there's no obvious assembly unary-bool-not instruction anyway, so we were already implementing it with xor(x,1) in code generation.

Reviewed By: @alexmalyshev

Differential Revision: D1204481

91ab5ce Implement Not in terms of XorBool
hphp/doc/ir.specification | 4 --
hphp/runtime/vm/jit/code-gen-arm.cpp | 1 -
hphp/runtime/vm/jit/code-gen-x64.cpp | 16 -----
hphp/runtime/vm/jit/hhbc-translator.cpp | 12 ++--
hphp/runtime/vm/jit/ir.h | 1 -
hphp/runtime/vm/jit/reg-alloc.cpp | 3 +
hphp/runtime/vm/jit/simplifier.cpp | 104 +++++++++++++++----------------
hphp/runtime/vm/jit/simplifier.h | 1 +
8 files changed, 61 insertions(+), 81 deletions(-)

Upstream: github.com


  • Share