How to assign undef value to a variable

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.

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.