sabre at nondot.org
Sun Sep 29 12:24:01 PDT 2002
> I have a question. In the handout, it says that out pass
> should enable mem2reg to put as many scalar fields of
> structures in virtual registers as possible. Does that just
> mean that we should try to replace as many structures as
> possible to scalars? or it means something else special to
Yup, that's all you have to do. mem2reg will convert allocas of scalar
values into registers directly for you (doing an SSA construction phase).
Thus, all you have to do is transform as many things into 'alloca int' or
'alloca float' (etc) as possible.
More information about the llvm-dev