Edd Barrett via llvm-dev
2018-Jul-05 10:51 UTC
[llvm-dev] `llvm.experimental.stackmap` is erroneously marked `Throws`?
Hi llvm-dev, I've recently been experimenting with stackmaps as part of a research project, and I think I may have found a problem. In short, should `llvm.experimental.stackmap` be marked as `Throws` as it currently is? When it is marked in this way, it seems possible for optimisation passes, when inlining, to change calls to invokes, resulting in errors like this: ``` Cannot invoke an intrinsic other than donothing, patchpoint, statepoint, coro_resume or coro_destroy invoke void (i64, i32, ...%) @llvm.experimental.stackmap(i64 1, i32 0) to label 13 ``` I've raised a bug for this here: https://bugs.llvm.org/show_bug.cgi?id=37788 And posted a potential fix to phabricator here: https://reviews.llvm.org/D48602 It would be great if someone who knows about stackmaps could take a look, as I'm currently having to maintain a local LLVM patch for my work. Thanks -- Best Regards Edd Barrett http://www.theunixzoo.co.uk