Hi all.
I am working on a project in academia where I need to write analysis and transformation passes that know about where variables are stored on the stack, what gets spilled, and where spills happen, so these things should not be changed by any passes after mine. Ideally, I would also like to have the passes work for several targets though I’m not sure how feasible this is.
I’ve read through the docs on MIR, the llvm docs, watched some developer meeting videos over the backend, and poked around the source, but I have some questions that I was having a hard time resolving myself:
-
Is the right place to put this after the
block-placement
pass? -
Would targeting
MachineInstr
s for my passes allow this to work for multiple target architectures? Or am I misunderstanding this and architectures just end up subclassing this? -
Could optimizations during LTO affect this?