marxin added a comment. I'll do it in a separate patch. Can you please @kcc explain me how should I use the lock for stack access in order to have it less locking? I'm planning also to come up with a multi-threaded test-case. https://reviews.llvm.org/D38971