mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-17 22:32:51 +00:00
![Julian Seward](/assets/img/avatar_default.png)
This patch performs MIR-level folding of bitwise {and/or/xor}{32,64} arising from wasm inputs. JS handling of and/or/xor is unchanged -- this patch adds a new path (MIR node) for the wasm/machine-level-semantics versions of these operations, which then participates in constant folding (via GVN) in the "normal" way. Changes: jit-test/tests/wasm/binop-x64-ion-folding.js: * new file with test cases jit/MIR.h: * new node kind MWasmBinaryBitwise for wasm-only {and/or/xor}{32,64} jit/MIR.cpp: * new method MWasmBinaryBitwise::foldsTo to handle all folding cases * added a few small helper functions for ::foldsTo jit/Lowering.cpp: * LIRGenerator::visitTest: also accept MWasmBinaryBitwise with subopcode And when creating LBitAndBranch instructions. * LIRGenerator::lowerBitOp: change arg type from MBinaryBitwiseInstruction to MBinaryInstruction so as to also accept MWasmBinaryBitwise. * LIRGenerator::visitWasmBinaryBitwise: new function. Generate LIR using scheme identical to that of MBinaryBitwiseInstruction. wasm/WasmIonCompile.cpp * a new overload for MDefinition* binary(..), taking a MWasmBinaryBitwise::SubOpcode value * generate MWasmBinaryBitwise as appropriate, via function EmitBitwiseAndOrXor * remaining uses of EmitBitwise renamed to EmitShift Differential Revision: https://phabricator.services.mozilla.com/D130038
…
…
…
…
…
…
…
…
…
…
…
…
…
…
An explanation of the Firefox Source Code Directory Structure and links to project pages with documentation can be found at: https://firefox-source-docs.mozilla.org/contributing/directory_structure.html For information on how to build Firefox from the source code and create the patch see: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html If you have a question about developing Firefox, and can't find the solution on https://firefox-source-docs.mozilla.org/, you can try asking your question on Matrix at chat.mozilla.org in `Introduction` (https://chat.mozilla.org/#/room/#introduction:mozilla.org) channel. Nightly development builds can be downloaded from: https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/ - or - https://www.mozilla.org/firefox/channel/desktop/#nightly Keep in mind that nightly builds, which are used by Firefox developers for testing, may be buggy.
Description
Read-only Git mirror of the Mercurial gecko repositories at https://hg.mozilla.org. How to contribute: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
Languages
JavaScript
32.3%
C++
25.4%
HTML
21%
C
10.8%
Python
2.8%
Other
7.2%