[llvm-dev] Some questions about writing compiler passes.
Matthias Braun via llvm-dev
llvm-dev at lists.llvm.org
Mon Nov 5 10:06:07 PST 2018
> On Nov 4, 2018, at 8:13 AM, Carter Cheng via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> Thanks for the help. I have a couple follow up questions-
>
> Where can I find the code which calculates the properties of inline asm nodes and examples of passes that make use of this information?
Generally the compiler does not calculate properties of inline asm. A good mental model is that inline assembly is just a string to the compiler where we just perform some replacements for register names and similar. Properties and constraints are expected to be specified by the user (you have to mark it volatile if it has side effects, you have to specify lists of registers to be clobbered, you have to specify register allocation constraints via letters, etc. see the gcc documentation for what is possible).
- Matthias
More information about the llvm-dev
mailing list