Displaying 20 results from an estimated 76 matches for "ispointerty".
2015 Dec 03
3
Function attributes for LibFunc and its impact on GlobalsAA
----- Original Message -----
> From: "James Molloy via llvm-dev" <llvm-dev at lists.llvm.org>
> To: "Vaivaswatha Nagaraj" <vn at compilertree.com>
> Cc: "LLVM Dev" <llvm-dev at lists.llvm.org>
> Sent: Thursday, December 3, 2015 4:41:46 AM
> Subject: Re: [llvm-dev] Function attributes for LibFunc and its impact on GlobalsAA
>
>
2012 Sep 21
0
[LLVMdev] How To Get The Name of the type the popinter is pointing to
i am using llvm ,
i did this
if ( AllocaInst *allocInst =
dyn_cast<AllocaInst>(&*bbit)){
PointerType *p = allocInst->getType();
if ( p->getElementType()->isPointerTy()){
StringRef name =
allocInst->getName();
Type *type =
allocInst->getOperand(0)->getType();;
errs() << type->getName() << " "
<< name &l...
2012 Sep 20
5
[LLVMdev] How To Get The Name of the type the popinter is pointing to
I want to know the type of pointer .
for example
if we have
int *p,
struct node *w
char *q
then i want int for p,char for q , struct node for w.
any help would be appreciated.
--
View this message in context: http://llvm.1065342.n5.nabble.com/How-To-Get-The-Name-of-the-type-the-popinter-is-pointing-to-tp49121.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.
2012 Aug 20
3
[LLVMdev] How to Identify if an Argument is a pointer?
Hello,
I was wondering how you can identify whether or not an Argument is a
pointer. The "isDereferenceablePointer" function for Values doesn't
seem to be what I want (I don't care whether or not the pointer points
to allocated memory or is suitably aligned). I want to be able to
discern between:
i32* %pArray
and
i32 %pArray
Thanks in advance.
- John
2015 Jul 17
2
[LLVMdev] How can i differentiate pointer type int 32* from int 32** ?
Hi all, as a LLVM beginner I would like to know how can i check the pointer
types with different levels like int 32* and int 32**, int 32***?
By using value->getType()->isPointerTy() i can just know they are pointers.
But the dump results clearly show they are different. Is there a good way
to calculate their actual point to levels? Thanks!
Best regards,
Shen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail...
2012 Dec 21
2
[LLVMdev] assert in InnerLoopVectorizer::createEmptyLoop
...It looks like it is
complaining because 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:...
2016 Aug 29
2
GVN / Alias Analysis issue with llvm.masked.scatter/gather intrinsics
this is definitely a bug in AA.
225 for (auto I = CS2.arg_begin(), E = CS2.arg_end(); I != E; ++I) {
226 const Value *Arg = *I;
227 if (!Arg->getType()->isPointerTy())
-> 228 continue;
229 unsigned CS2ArgIdx = std::distance(CS2.arg_begin(), I);
230 auto CS2ArgLoc = MemoryLocation::getForArgument(CS2,
CS2ArgIdx, TLI);
AliasAnalysis.cpp:228
It ignores every argument because they are vectors of pointers, not
pointers.
I'm...
2011 Jun 06
2
[LLVMdev] Explanation
Hi All,
I am trying to check if a Value type is a int32 pointer by using
if(T == Type::getInt1PtrTy(Context, AS)) ...
I am trying to understand the AS (address space).
How do I get it? Thanks.
George
*
*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110606/775e4f09/attachment.html>
2011 Jun 06
0
[LLVMdev] Explanation
On 6 June 2011 17:08, George Baah <georgebaah at gmail.com> wrote:
> if(T == Type::getInt1PtrTy(Context, AS)) ...
Hi,
You don't need to care about address spaces to check for an int32*:
if (T->isPointerTy()) {
const Type* intT = cast<PointerType>(T)->getElementType();
if (intT->isIntegerTy() && intT->getPrimitiveSizeInBits() == 32)
cout << "Yeah!" << endl;
}
Also, to create a pointer type, if you don't care about address space
at all, use the...
2012 Aug 20
0
[LLVMdev] How to Identify if an Argument is a pointer?
You can use isPointerTy() in Type class.
George
On Mon, Aug 20, 2012 at 12:39 PM, John Backes <back0145 at umn.edu> wrote:
> Hello,
>
> I was wondering how you can identify whether or not an Argument is a
> pointer. The "isDereferenceablePointer" function for Values doesn't
> seem to...
2012 Dec 21
0
[LLVMdev] assert in InnerLoopVectorizer::createEmptyLoop
...ing because 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
> }
>
>
>
> _______________________________________...
2015 Jul 17
2
[LLVMdev] How can i differentiate pointer type int 32* from int 32** ?
...M, John Criswell <jtcriswel at gmail.com> wrote:
> On 7/17/15 12:38 PM, Shen Liu wrote:
>
> Hi all, as a LLVM beginner I would like to know how can i check the
> pointer types with different levels like int 32* and int 32**, int 32***?
>
> By using value->getType()->isPointerTy() i can just know they are
> pointers. But the dump results clearly show they are different. Is there a
> good way to calculate their actual point to levels? Thanks!
>
>
> You will need to use dyn_cast<PointerType> to cast the Type * into a
> PointerType *. Once you do that...
2017 Jun 11
2
Force casting a Value*
...ant store. This
> is either a nuisance (if you were expecting the possibility and can
> deal with it) or a huge misunderstanding over compile-time vs runtime
> values.
>
I think it's a misunderstanding in may part. Let me explain my intention
first. I want to retrieve the value (if isPointerTy() returns true) to be
stored by a store instruction at run-time and pass on that value as either
an unsigned int (64) or a pointer (char*) to an external function. The call
to that function is inserted using IRBuilder.CreateCall().
Consider the code snippet below.
================================...
2012 Apr 04
3
[LLVMdev] [cfe-commits] Fix handling of ARM homogenous aggregates
...tputArg and incorporating it the
CCAssignFn interface allows a more straightforward implementation in the
targets, in my view (for both our uses). It's also information that's readily
available when InputArg/OutputArgs are being constructed. In your case:
CCIf<"SourceTy->isPointerTy()", CCAssignToReg<[P1, P2]>>;
I've got a patch which implements it for ARM and X86 (though not HFAs using
the features yet, I'm still musing on the best interface to present there --
"HFA* byval" for target simplicity or "HFA" for user simplicity), I'...
2016 Aug 29
2
GVN / Alias Analysis issue with llvm.masked.scatter/gather intrinsics
...niel Berlin <dberlin at dberlin.org>
> wrote:
>
>> this is definitely a bug in AA.
>>
>> 225 for (auto I = CS2.arg_begin(), E = CS2.arg_end(); I != E;
>> ++I) {
>> 226 const Value *Arg = *I;
>> 227 if (!Arg->getType()->isPointerTy())
>> -> 228 continue;
>> 229 unsigned CS2ArgIdx = std::distance(CS2.arg_begin(), I);
>> 230 auto CS2ArgLoc = MemoryLocation::getForArgument(CS2,
>> CS2ArgIdx, TLI);
>>
>> AliasAnalysis.cpp:228
>>
>> It ignores every a...
2012 Jun 18
0
[LLVMdev] Which pass converts call printf to puts?
...> (CI). So I am very curious about how the call instruction is replaced here.
>
> // printf("%s\n", str) --> puts(str)
> if (FormatStr == "%s\n" && CI->getNumArgOperands() > 1 &&
> CI->getArgOperand(1)->getType()->isPointerTy()) {
> EmitPutS(CI->getArgOperand(1), B, TD);
> return CI;
> }
>
> -Thomson
2013 Jan 15
2
[LLVMdev] [cfe-dev] no-alias generated as result of restrict function arguments
...both sides are different identified objects, they aren't equal
- // unless they're null.
- if (LHSPtr != RHSPtr && llvm::isIdentifiedObject(RHSPtr) &&
- Pred == CmpInst::ICMP_EQ)
+ // icmp <object*>, <object*/null>
+ if (LHS->getType()->isPointerTy() && RHS->getType()->isPointerTy()) {
+ // Ignore pointer casts, they are irrevelant for (in)equality tests.
+ Value *LHSPtr = LHS->stripPointerCasts();
+ Value *RHSPtr = RHS->stripPointerCasts();
+ if (isa<ConstantPointerNull>(RHSPtr) && isKnownNonNull...
2013 Feb 25
2
[LLVMdev] Queries regarding function's arguments data type
..."\n1 Argument type int 32 : " <<
FTy->getParamType(0)->isIntegerTy(32);
errs() << "\n2 Argument type char : " <<
FTy->getParamType(0)->isIntegerTy(8);
errs() << "\n4 Argument type pointer : " <<
FTy->getParamType(0)->isPointerTy();
errs() << "\n5 Argument type array : " <<
FTy->getParamType(0)->isArrayTy();
errs() << "\n6 Argument type structure : " <<
FTy->getParamType(0)->isStructTy();
I can just find these many data types for integer and characters. This just...
2015 Jul 18
4
[LLVMdev] How can i differentiate pointer type int 32* from int 32** ?
...gmail.com>
> wrote:
>
>> On 7/17/15 12:38 PM, Shen Liu wrote:
>>
>> Hi all, as a LLVM beginner I would like to know how can i check the
>> pointer types with different levels like int 32* and int 32**, int 32***?
>>
>> By using value->getType()->isPointerTy() i can just know they are
>> pointers. But the dump results clearly show they are different. Is there a
>> good way to calculate their actual point to levels? Thanks!
>>
>>
>> You will need to use dyn_cast<PointerType> to cast the Type * into a
>> Pointer...
2017 Jun 12
2
Force casting a Value*
...were expecting the possibility and can
>>> deal with it) or a huge misunderstanding over compile-time vs runtime
>>> values.
>>>
>>
>> I think it's a misunderstanding in may part. Let me explain my intention
>> first. I want to retrieve the value (if isPointerTy() returns true) to be
>> stored by a store instruction at run-time and pass on that value as either
>> an unsigned int (64) or a pointer (char*) to an external function. The call
>> to that function is inserted using IRBuilder.CreateCall().
>>
>> Consider the code snip...