Displaying 9 results from an estimated 9 matches for "castto".
2011 Oct 06
2
[LLVMdev] How to create arguments CallInst
...ss a value to a function that doesn't match the type, you
> will need to insert a cast instruction to cast the value to the correct
> type. Which cast instruction you insert will depend on the value's type and
> the type you want it to be.
>
> SAFECode has a utility function castTo() that takes a Value * and a desired
> Type * and inserts a cast instruction if Value * is not of the desired
> type. It's designed to minimize the number of cast instructions it inserts
> so that the resulting LLVM IR is more readable for debugging:
>
>
> http://llvm.org/vie...
2011 Oct 06
0
[LLVMdev] How to create arguments CallInst
...??
If you want to pass a value to a function that doesn't match the type,
you will need to insert a cast instruction to cast the value to the
correct type. Which cast instruction you insert will depend on the
value's type and the type you want it to be.
SAFECode has a utility function castTo() that takes a Value * and a
desired Type * and inserts a cast instruction if Value * is not of the
desired type. It's designed to minimize the number of cast instructions
it inserts so that the resulting LLVM IR is more readable for debugging:
http://llvm.org/viewvc/llvm-project/safecode/...
2011 Oct 06
2
[LLVMdev] How to create arguments CallInst
Hello,
I need create a CallInst to this function
define i32 @function(i32 %n, i8 %m){ ... }
I now how get argument's type but I do not know how to create arguments that
meet these types.
For example, if the argument is long, accurate pass CallInst an integer
argument, however, if a Char, Char must pass an argument.
How to get the type of the argument of the function definition and create
the
2014 Jan 08
3
[LLVMdev] reference to non-static member function must be called
...ype* Int64Type = IntegerType::getInt64Ty(M->getContext());
PointerType* VoidPtrType = PointerType::getUnqual(Int8Type);
Type* VoidType = Type::getVoidTy(M->getContext());
DataLayout *TD = &getAnalysis<DataLayout>();
Value *Pointer = SI.getPointerOperand();
Pointer = castTo(Pointer,VoidPtrType,Pointer->getName(),&SI);
uint64_t size = TD->getTypeStoreSize(SI.getOperand(0)->getType());
Value *StoreSize = ConstantInt::get(Int32Type, size);
std::vector<Value *> args;
args.push_back(StoreSize);
args.push_back(Pointer);
args.push_back(0)...
2011 Oct 06
0
[LLVMdev] How to create arguments CallInst
...function that doesn't match the
> type, you will need to insert a cast instruction to cast the value
> to the correct type. Which cast instruction you insert will
> depend on the value's type and the type you want it to be.
>
> SAFECode has a utility function castTo() that takes a Value * and
> a desired Type * and inserts a cast instruction if Value * is not
> of the desired type. It's designed to minimize the number of cast
> instructions it inserts so that the resulting LLVM IR is more
> readable for debugging:
>
>...
2008 Apr 12
0
[LLVMdev] Bitwidth analysis?
We have a bitwidth analysis that can be downloaded. It is not in LLVM.
There should be a link in the paper:
http://www.cs.utah.edu/~regehr/papers/pldi075-cooprider.pdf
John Regehr
2008 Apr 12
1
[LLVMdev] Bitwidth analysis?
...rnando/cil-cXprop'
bin/cilly -c test/small1/func.c -otest/small1/func.o
gcc -D_GNUCC -E -DCIL=1 test/small1/func.c -o /tmp/cil-UGzNLDHj.i
/project/fernando/cil-cXprop/obj/x86_LINUX/cilly.asm.exe --out
/tmp/cil-WsGP4BtF.cil.c /tmp/cil-UGzNLDHj.i
test/small1/func.c:17: Bug: unrollType failed in castTo
Context : 2cil: foo
error in doExp (Errormsg.Error)
Error: Cabs2cil had some errors
Fatal error: exception Errormsg.Error
make[1]: *** [test/func] Error 2
make[1]: Leaving directory `/misc/project/fernando/cil-cXprop'
make: *** [check] Error 2
bash-3.1$ exit
exit
---------------------------...
2008 Apr 09
4
[LLVMdev] Bitwidth analysis?
Hi, LLVMers,
has someone implemented bitwidth analysis for LLVM? I was looking for
something similar to the bitwise compiler described in
"Bidwidth analysis with application to silicon compilation, by Mark
Stephenson, Jonathan Babb and Saman Amarasinghe"
e.g.: http://portal.acm.org/citation.cfm?id=349299.349317
all the best,
Fernando
2011 Oct 06
0
[LLVMdev] MIPS 32bit code generation
...st???
If you want to pass a value to a function that doesn't match the type,
you will need to insert a cast instruction to cast the value to the
correct type. Which cast instruction you insert will depend on the
value's type and the type you want it to be.
SAFECode has a utility function castTo() that takes a Value * and a
desired Type * and inserts a cast instruction if Value * is not of the
desired type. It's designed to minimize the number of cast instructions
it inserts so that the resulting LLVM IR is more readable for debugging:
http://llvm.org/viewvc/llvm-project/safecode/tru...