Displaying 5 results from an estimated 5 matches for "createinbound".
Did you mean:
createinbounds
2010 Mar 26
1
[LLVMdev] Using GetElementPtr to traverse large arrays
...etInt32Ty(ctx), i);
GetElementPtrInst *gep = GetElementPtrInst::Create(intVars, idx,
"ElemPtr", someBlock);
new StoreInst(idx, gep, entryBlock); //Store some value in it
}
Apart from the size issue, What is the idiomatic way to traverse small
arrays ? The above loop ? I tried to use CreateInBounds but got
totally confused..
--
Regards,
Gabi
http://bugspy.net
2010 May 05
2
[LLVMdev] How to cast an integer array to an integer pointer? (user question)
...lVariable(
*M,
ArrayType::get(Type::getInt8Ty(Context), 4),
true, GlobalValue::PrivateLinkage,
llvm::ConstantArray::get(ArrayType::get(Type::getInt8Ty(Context), 4),
Ivars),
"g_value_mine", 0, false, 0/*AddrSpace*/);
// ptr
GetElementPtrInst *gepi = GetElementPtrInst::CreateInBounds(
GGV,
ConstantInt::get(Type::getInt32Ty(Context), 0),
"zzz",
BB
);
// func call
Function *PutsF =
cast<Function>(M->getOrInsertFunction("puts", Type::getVoidTy(Context),
Type::getInt8Ty(Context)->...
2013 Aug 19
4
[LLVMdev] Generating GetElementPtr inlined in a function argument list programmatically
...= irb.CreateGlobalString(bbn, "bbname");std::vector<Value*> indices;indices.push_back(ConstantInt::get(IntegerType::getInt32Ty(getGlobalContext()), 0));indices.push_back(ConstantInt::get(IntegerType::getInt32Ty(getGlobalContext()), 0));GetElementPtrInst* gep_str = GetElementPtrInst::CreateInBounds(global_str_ptr, indices, "bbname", bb->getFirstNonPHI());args.push_back(gep_str);args.push_back(ConstantInt::get(IntegerType::getInt32Ty(getGlobalContext()), size));CallInst* inc_call = CallInst::Create(func_incrementFaultSitesEnumerated, args, "", first_inst);--------------...
2013 Aug 19
0
[LLVMdev] Generating GetElementPtr inlined in a function argument list programmatically
...(bbn, "bbname");
> std::vector<Value*> indices;
> indices.push_back(ConstantInt::get(IntegerType::getInt32Ty(getGlobalContext()), 0));
> indices.push_back(ConstantInt::get(IntegerType::getInt32Ty(getGlobalContext()), 0));
> GetElementPtrInst* gep_str = GetElementPtrInst::CreateInBounds(global_str_ptr,
> indices,
> "bbname", bb->getFirstNonPHI());
> args.push_back(gep_str);
> args.push_back(ConstantInt::get(IntegerType::getInt32Ty(getGlobalContext()),
> size));
> CallInst* inc_call = CallInst::Create(func_incrementFaultSitesEnumerated, args,
>...
2013 Aug 02
1
[LLVMdev] replacing GetElementPtrConstantExpr with GetElementPtrInst ... sometimes
...c;
for (ConstantExpr::op_iterator OpIt = CE->op_begin(), E = CE->op_end(); OpIt != E; ++OpIt) {
OpVec.push_back(cast<Value>(OpIt));
cast<Value>(OpIt)->dump();
}
ArrayRef<Value*> Ops(OpVec);
Instruction * NewInst = GetElementPtrInst::CreateInBounds(Ops[0], Ops.slice(1), CE->getName() );
ValuePair vp = {CE,NewInst};
Replace.push_back(vp);
}
}
for (SmallVectorImpl<ValuePair>::const_iterator I = Replace.begin(),
E = Replace.end();
I != E; ++I) {
dbgs() &...