diff options
author | Thomas Lively <tlively@google.com> | 2024-05-13 17:10:23 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-13 17:10:23 -0700 |
commit | 020d08e01ff506099c8293e69cd03f5f75f562d9 (patch) | |
tree | c61320e25d5945e9cd56a69d1fb013f867898951 /src/passes/OptimizeInstructions.cpp | |
parent | 924533fbcd0181f4460a13adc5762ee52f97de58 (diff) | |
download | binaryen-020d08e01ff506099c8293e69cd03f5f75f562d9.tar.gz binaryen-020d08e01ff506099c8293e69cd03f5f75f562d9.tar.bz2 binaryen-020d08e01ff506099c8293e69cd03f5f75f562d9.zip |
Simplify scratch local calculation (#6583)
Change `countScratchLocals` to return the count and type of necessary scratch
locals. It used to encode them as keys in the global map from scratch local
types to local indices, which could not handle having more than one scratch
local of a given type and was generally harder to reason about due to its use of
global state. Take the opportunity to avoid emitting unnecessary scratch locals
for `TupleExtract` expressions that will be optimized to not use them.
Also simplify and better document the calculation of the mapping from IR indices
to binary indices for all locals, scratch and non-scratch.
Diffstat (limited to 'src/passes/OptimizeInstructions.cpp')
0 files changed, 0 insertions, 0 deletions