[PATCH] D98906: [X86] Improve lowering of the unrolled inline-asm probing
Simonas Kazlauskas via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 22 06:45:12 PDT 2021
nagisa added a comment.
Ah, I see!
Well, this isn't strictly just an optimization. This sequence came to me as I was thinking how to make CFI metadata correct with least amount of work on my end. It seems that in presence of tools such as valgrind we don't really have any other choice than to carefully emit a `-cfi_def_cfa_offset` for each of the `sub`s. Which is //fine// I guess, but leaves me not super happy about the code we emit.
Besides the accurate uwtables, there's another conflicting use-case here – signal handlers. If we `sub` and then probe, we may receive a signal (and allocate stack for it) in a potentially invalid stack slot. Whereas if we probe and then sub, any signal handlers that occur during probing would still execute on what is significantly more likely to be a valid stack.
So, I guess, my question here is this: Is the codegen responsible for generating code that's palatable to analysis tools, or are the analysis tools responsible for comprehending the code that they inspect?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98906/new/
https://reviews.llvm.org/D98906
More information about the llvm-commits
mailing list