summaryrefslogtreecommitdiff
path: root/src/passes/PrintFunctionMap.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Allow different arguments for multiple instances of a pass (#6687)Christian Speckner2024-07-151-1/+1
| | | | | | | | | | | | Each pass instance can now store an argument for it, which can be different. This may be a breaking change for the corner case of running a pass multiple times and setting the pass's argument multiple times as well (before, the last pass argument affected them all; now, it affects the last instance only). This only affects arguments with the name of a pass; others remain global, as before (and multiple passes can read them, in fact). See the CHANGELOG for details. Fixes #6646
* Refactor interaction between Pass and PassRunner (#5093)Thomas Lively2022-09-301-2/+2
| | | | | | | | | | | | | | Previously only WalkerPasses had access to the `getPassRunner` and `getPassOptions` methods. Move those methods to `Pass` so all passes can use them. As a result, the `PassRunner` passed to `Pass::run` and `Pass::runOnFunction` is no longer necessary, so remove it. Also update `Pass::create` to return a unique_ptr, which is more efficient than having it return a raw pointer only to have the `PassRunner` wrap that raw pointer in a `unique_ptr`. Delete the unused template `PassRunner::getLast()`, which looks like it was intended to enable retrieving previous analyses and has been in the code base since 2015 but is not implemented anywhere.
* Emit imported functions first in symbol maps (#3900)Thomas Lively2021-05-201-2/+5
| | | | | | | | Imported functions come first when modules are emitted, so to ensure the function indices are correct, they need to come first in the symbol maps. We never noticed this bug before because imported functions are always the first functions when a module is parsed, so the bug never mattered in practice. However, wasm-split adds new imported functions after parsing and these were causing the symbol map indices to be incorrect.
* Support --symbolmap and --symbolmap=FOO in wasm-opt (#3885)Alon Zakai2021-05-141-1/+7
| | | | | | | | | | wasm-as supports --symbolmap=FOO as an argument. We got a request to support the same in wasm-opt. wasm-opt does have --print-function-map which does the same, but as a pass. To unify them, use the new pass arg sugar from #3882 which allows us to add a --symbolmap pass whose argument can be set as --symbolmap=FOO. That perfectly matches the wasm-as notation. For now, keep the old --print-function-map notation as well, to not break emscripten. After we remove it there we can remove it here.
* Add --print-function-map to print out a map of function index to name (#2155)Alon Zakai2019-05-311-0/+45
* work * fix * fix * format