> I would like to use indirect registers for arrays allocated on the stack (alloca) - such as IReg[index]. Is there a way to do this in LLVM (similar to that of mem2reg optimization)? Maybe the scalar replacement of aggregates pass? In opt this is: -scalarrepl - Scalar Replacement of Aggregates Ciao, Duncan.