I found it so trouble when I try to insert some instruction in basicblock.
AllocaInst* pa = new AllocaInst(Type::getInt32Ty(getGlobalContext()), 0, 4, "dataKey");
Value* dataValue = ConstantInt::get(IntegerType::get(getGlobalContext(),6) , 100);
above are some code I used. Still now I don't understand the principle to insert all kinds of instructions in basicblock.(I just can insert a allocaInst). I wish someone could tell me some example that inset all kinds of instructions in basicblock.