Displaying 12 results from an estimated 12 matches for "createpointercast".
2007 Feb 24
3
[LLVMdev] cast instruction
...instruction that casts an sbyte* to another
pointer type. Previously I was using the CastInst::createInferredCast()
function to do that; however, that function has been removed. Which of
the create() functions from CastInst should I use to do that? It seems
like the obdvious answer should be createPointerCast(). However, the
documentation for createPointerCast says, "Create a BitCast or a
PtrToInt cast instruction," and I'm not wanting to cast a pointer to an int.
Thanks,
Ryan
--
Ryan M. Lefever [http://www.ews.uiuc.edu/~lefever]
2011 Sep 22
2
[LLVMdev] Need help in converting int to double
...to int* and then did FPToSI...then did SHL...(
> because CreateShl only accepts integers... i pointer casted it to int64 type
> first)... Below is the code snippet....
>
>
> lhs = mBuilder.CreateStructGEP(firstArg, 0);
> lhs = mBuilder.CreateLoad(lhs);
> lhs = mBuilder.CreatePointerCast(lhs, PointerType::get(
> mBuilder.getInt64Ty(), 0));
> int typelhs = getValueType(lhs);
> rhs = mBuilder.CreateStructGEP(secondArg, 0);
> rhs = mBuilder.CreateLoad(rhs);
> rhs = mBuilder.CreatePointerCast(rhs, PointerType::get(
> mBuilder.ge...
2011 Sep 22
0
[LLVMdev] Need help in converting int to double
...es,
First i converted the void * to int* and then did FPToSI...then did SHL...( because CreateShl only accepts integers... i pointer casted it to int64 type first)... Below is the code snippet....
lhs = mBuilder.CreateStructGEP(firstArg, 0);
lhs = mBuilder.CreateLoad(lhs);
lhs = mBuilder.CreatePointerCast(lhs, PointerType::get(
mBuilder.getInt64Ty(), 0));
int typelhs = getValueType(lhs);
rhs = mBuilder.CreateStructGEP(secondArg, 0);
rhs = mBuilder.CreateLoad(rhs);
rhs = mBuilder.CreatePointerCast(rhs, PointerType::get(
mBuilder.getInt64Ty(), 0));
lhs = mB...
2011 Sep 22
3
[LLVMdev] Need help in converting int to double
Hi,
I'm pursuing M.Tech course. As a part of the project work i'm using
LLVM as back-end. My project area is "Enhancing the performance of V8
javascript engine using LLVM as a back-end".
Now i'm writing code for shift left(SHL) operator. I had my own Value
Structure .. it's like this
Struct Value
{
void *val ;
char type;
}
The "char type" holds
2011 Sep 22
1
[LLVMdev] Need help in converting int to double
...to int* and then did FPToSI...then did SHL...(
> because CreateShl only accepts integers... i pointer casted it to int64 type
> first)... Below is the code snippet....
>
>
> lhs = mBuilder.CreateStructGEP(firstArg, 0);
> lhs = mBuilder.CreateLoad(lhs);
> lhs = mBuilder.CreatePointerCast(lhs, PointerType::get(
> mBuilder.getInt64Ty(), 0));
> int typelhs = getValueType(lhs);
> rhs = mBuilder.CreateStructGEP(secondArg, 0);
> rhs = mBuilder.CreateLoad(rhs);
> rhs = mBuilder.CreatePointerCast(rhs, PointerType::get(
> mBuilder.ge...
2012 Dec 21
2
[LLVMdev] assert in InnerLoopVectorizer::createEmptyLoop
...e it is trying to zero-extend an i64 (type
Count->getType() returns i64) to an i32 (IdxTy).
if (Count->getType() != IdxTy) {
// The exit count can be of pointer type. Convert it to the correct
// integer type.
if (ExitCount->getType()->isPointerTy())
Count = CastInst::CreatePointerCast(Count, IdxTy, "ptrcnt.to.int",
Loc);
else
Count = CastInst::CreateZExtOrBitCast(Count, IdxTy, "zext.cnt", Loc);
// <= this line
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachmen...
2012 Dec 21
0
[LLVMdev] assert in InnerLoopVectorizer::createEmptyLoop
...64 (type
> Count->getType() returns i64) to an i32 (IdxTy).
>
> if (Count->getType() != IdxTy) {
> // The exit count can be of pointer type. Convert it to the correct
> // integer type.
> if (ExitCount->getType()->isPointerTy())
> Count = CastInst::CreatePointerCast(Count, IdxTy, "ptrcnt.to.int",
> Loc);
> else
> Count = CastInst::CreateZExtOrBitCast(Count, IdxTy, "zext.cnt",
> Loc); // <= this line
> }
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LL...
2012 Dec 21
0
[LLVMdev] assert in InnerLoopVectorizer::createEmptyLoop
...e it is trying to zero-extend an i64 (type
Count->getType() returns i64) to an i32 (IdxTy).
if (Count->getType() != IdxTy) {
// The exit count can be of pointer type. Convert it to the correct
// integer type.
if (ExitCount->getType()->isPointerTy())
Count = CastInst::CreatePointerCast(Count, IdxTy, "ptrcnt.to.int",
Loc);
else
Count = CastInst::CreateZExtOrBitCast(Count, IdxTy, "zext.cnt", Loc);
// <= this line
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachmen...
2014 Jun 27
2
[LLVMdev] how create a pointer to FILE*
Hi, all
I want to create a function in LLVM IR, whose type is:
void _to_prof( FILE* ptrF);
I do it within LLVM, but I don't know how build the parameter type for
FILE* ptrF.
Best Regards.
Eric Lu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140627/c49bdb2a/attachment.html>
2014 Feb 21
12
[LLVMdev] asan coverage
...ter doesn't work like this. We'll need to support
+ // Instructions as labels in LLVM codegen.
+ // * We actually store the PC on each increment, while we should
initialize
+ // this array at link time (need to refactor this code a bit).
+ //
+ Builder.CreateStore(
+ Builder.CreatePointerCast(
+ cast<llvm::Instruction>(Count)->getParent()->getParent(),
+ Builder.getInt64Ty() // FIXME: use a better type
+ ),
+ Builder.CreateConstInBoundsGEP2_64(RegionPCs, 0, Counter));
}
Index: lib/CodeGen/CodeGenPGO.h
=======================================...
2014 Feb 19
2
[LLVMdev] asan coverage
I've built chromium with " -fprofile-instr-generate -fsanitize=address" --
the performance looks good!
The file format from r198638 is indeed rudimentary.
Do you already know how the real output format will look like?
Just to summarize what I think is important:
- minimal size on disk, minimal amount of files
- minimal i/o while writing to disk, no lockf or some such
-
2014 Mar 07
3
[LLVMdev] [RFC] Add second "failure" AtomicOrdering to cmpxchg instruction
...b/lib/Transforms/Instrumentation/ThreadSanitizer.cpp
index fed7508..6ad5b6f 100644
--- a/lib/Transforms/Instrumentation/ThreadSanitizer.cpp
+++ b/lib/Transforms/Instrumentation/ThreadSanitizer.cpp
@@ -556,8 +556,8 @@ bool ThreadSanitizer::instrumentAtomic(Instruction *I) {
Value *Args[] = {IRB.CreatePointerCast(Addr, PtrTy),
IRB.CreateIntCast(CASI->getCompareOperand(), Ty, false),
IRB.CreateIntCast(CASI->getNewValOperand(), Ty, false),
- createOrdering(&IRB, CASI->getOrdering()),
- createFailOrdering(&IRB,...