Hi, LLVM developers!
I am working on software control flow checking. I have to work at the native assembly level, and rely on the code generator to provide various information. I’m considering ARM Cortex-M3 as my target CPU.
I would like to determine live-in and live-out PHYSICAL registers for every machine basic block after all code generation passes, such as the ARM Constant Island pass, and before code emission. Unfortunately, at this point, information about live-in/live-out registers has been invalidated by the ARM Constant Island pass. So I am considering re-computing it.
Class LivePhysRegs seems to be able to compute live-in/live-out registers for a given machine basic block based on live-in registers of its successors. It appears to me that, if I perform a depth-first traversal through the control flow graph of a function, calling LivePhysRegs::computeLiveIns on every machine basic block, live-in/live-out physical registers are computed for every basic block. Is this true?
Also, I would like to know whether APSR is dead or not on entry and exit of every basic block. Is the register treated by LLVM specially or in the same way as other general-purpose registers?