[LLVMdev] Transforming ConstantExprs to Instructions

Matthijs Kooijman matthijs at stdin.nl
Thu Jun 19 01:05:07 PDT 2008


Hi Chris,

> What do you mean?  A constantexpr gep can be used as the size of an  
> alloca.
I meant the other way around. Ie,

@A = internal global { i32, i32 }
%B = load getelementptr { i32, i32 }* @A, i32 0, i32 0

would trivially translate to

%A = alloca { i32, i32 }
%B = load getelementptr { i32, i32 }* %A, i32 0, i32 0

which is not legal AFAICS (since %A is not a Constant).

Gr.

Matthijs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080619/fba33896/attachment.sig>


More information about the llvm-dev mailing list