I am trying to implement a special compiler level LLVM pass, which will have to reserve 20 registers amongst the available 32 GPRs in ARM micro-architecture, so that I will be performing my experiments on these reserved registers. I am intending to do this at IR level. Is it possible?
You're probably looking to edit the RegisterInfo.td file. I haven't done specifically what you're trying to do but look at Target.td for some hints. IsAllocatable looks promising or possibly deleting the registers you don't want LLVM to use.