summaryrefslogtreecommitdiff
path: root/test/lit/passes/simplify-globals-nested.wast
Commit message (Collapse)AuthorAgeFilesLines
* Add a pass to propagate global constants to other globals (#6287)Alon Zakai2024-02-081-2/+7
| | | | | | | | | | | | | | | | | SimplifyGlobals already does this, so this is a subset of that pass, and does not add anything new. It is useful for testing, however. In particular it allows testing that we propagate subsequent globals in a single pass, that is if one global reads from another and becomes constant, then it can be propagated as well. SimplifyGlobals runs multiple passes so this always worked, but with this pass we can test that we do it efficiently in one pass. This will also be useful for comparing stringref to imported strings, as it allows gathered strings to be propagated to other globals (possible with stringref, but not imported strings) but not anywhere else (which might have downsides as it could lead to more allocations). Also add an additional test for simplify-globals that we do not get confused by an unoptimizable global.get in the middle (see last part).
* SimplifyGlobals: Propagate constant globals into nested gets in other ↵Alon Zakai2024-02-071-0/+27
globals (#6285) Before we propagated to the top level, but not to anything interior.