LLVM MIR passes

Hey Guys ,
i am new to llvm passes and i wanted to start by exploring the built in machine Intermediate representation(MIR).So , what do you recommend me to read ?

The Machine IR is documented here: Machine IR (MIR) Format Reference Manual — LLVM 18.0.0git documentation

On that page, there should be additional links to other relevant material. You can also take a look at existing machine function passes, by searching for passes that subclass MachineFunctionPass.

What about any written sources codes as an example Specifically for LLVM MIR
where ca n i find such resources

Here it is llvm-project/llvm/test/CodeGen/MIR at main · llvm/llvm-project · GitHub

1 Like