binaryen icon indicating copy to clipboard operation
binaryen copied to clipboard

Make ASYNCIFY_ADD propagate

Open curiousdannii opened this issue 3 years ago • 0 comments

This was originally posted as an Emscripten issue (#13150) but it really involves a change to Binaryen so I'm reposting it here.

An app I'm porting has 3000 instrumented functions when ASYNCIFY_IGNORE_INDIRECT is disabled, and 100 instrumented functions when it is enabled. Somewhere in between is the actual number of functions that need to be instrumented.

After investigating the code I found one function with indirect calls that does need to be instrumented (there will probably be more), so I specified it in ASYNCIFY_ADD. But then I realised that its status is not propagated upwards, I would need to specify all the functions that call it, etc. I tried adding it to ASYNCIFY_IMPORTS instead, but it was ignored because it's not an import function.

I would like to request that either ASYNCIFY_ADD be changed to propagate by default, or that a setting be added to make it do so. I'm not sure on the arguments for or against propagating by default; @sbc100 thought it should, but @kripken thought it shouldn't.

curiousdannii avatar Apr 30 '22 02:04 curiousdannii