mapping memory accesses

   I would like to map a set memory accesses to instead registers.
I do have a way to support restricted indirect addressing with limits
on how many pointer registers and
offset size I can use. Considering this, what would be some
alternatives to do it ? I am wondering if it might be possible
to do a higher level transformation of these accesses to some special
IR which I then lower it in a special way. If so,
would it be easier to do it on the AST/LLVMIR ?