[LLVMdev] How to assign undef value to a variable

Eugene Toder eltoder at gmail.com
Sun Jun 27 11:10:45 PDT 2010


Will this have much effect? If I understand correctly, propagating
undef to loads is done by GVN, but it already knows that loads from
fresh allocas are undef.

On Sun, Jun 27, 2010 at 7:03 PM, John Criswell <criswell at illinois.edu> wrote:
> Simply create an undef constant value and add a store instruction to store the undef value into the memory allocated by the alloca.
>
> I believe there is an llvm::Undef class.  Check doxygen docs for details.
>
>
> -----Original Message-----
> From: Chayan Sarkar <chayan.ju at gmail.com>
> Sent: Sunday, June 27, 2010 12:05 PM
> To: llvmdev at cs.uiuc.edu <llvmdev at cs.uiuc.edu>; chayan.ju at gmail.com <chayan.ju at gmail.com>
> Subject: [LLVMdev] How to assign undef value to a variable
>
> Hi,
>
> Can any one tell me how to assign 'undef' to variable? I want to
> assign each variable an undef, immediately after the alloca
> instruction.
>
> Regards,
> Chayan
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>




More information about the llvm-dev mailing list