[PATCH] D77784: [WebAssembly] Use dummy debug info in Emscripten SjLj

Heejin Ahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 9 11:06:03 PDT 2020


aheejin added a comment.

In D77784#1972330 <https://reviews.llvm.org/D77784#1972330>, @dschuff wrote:

> It just occurred to me, could we just mark the calls as non-inlineable? I assume we won't be running the inliner after this anyway. Or is that a property of the called function and not the callsite?


As you can see here <https://github.com/llvm/llvm-project/blob/2481f26ac3f228cc085d4d68ee72dadc07afa48f/llvm/lib/IR/Verifier.cpp#L3052-L3060>, even if the error message says "inlinable call site blah blah", the condition being checked is not something about properties of the call instruction or callsite; it only checks three things:

- Is there a called function? (Not sure when this can be false though)
- Is the current caller function has a DISubprogram?
- Is the callee function has a DISubprogram?

So the reason it was OK so far after D74269 <https://reviews.llvm.org/D74269> was, even though the caller had a DISubprogram, the callees (`malloc` and `free`) didn't have one. But it turned out there can be cases in which declarations of `malloc` and `free` can have DISubprogram too. So it is not possible to make this function non-inlinable, because the conditions don't really check them anyway.

> Anyway this approach seems ok to me too. It seems to me that there are other places we inject calls to runtime functions too; but I guess the others are mostly to imported functions and don't have this problem?

Yes, all other functions we inject calls to in this pass are imported.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77784/new/

https://reviews.llvm.org/D77784





More information about the llvm-commits mailing list