search for: classllvm_1_1typ

Displaying 10 results from an estimated 10 matches for "classllvm_1_1typ".

Did you mean: classllvm_1_1type
2016 Mar 29
1
llvm isTokenTy() deprecated?
...pe"; } /home/shehbaz/courses/ece1781/project/fslice/plugin/FSlice.cpp:147:14: error: ‘class llvm::Type’ has no member named ‘isTokenTy’ else if(T->isTokenTy()) ^ I am successfully able to do this for all other 20-25 types mentioned here: http://llvm.org/docs/doxygen/html/classllvm_1_1Type.html#a5e9e1c0dd93557be1b4ad72860f3cbda Also, I noticed that for type int32, When I do getTypeID(), I get return value 10. However, when I check the enum of Type IDs, I see that 10 corresponds to tokens and not integers. enum value 11 corresponds to integers : http://llvm.org/docs/doxygen/html/cla...
2008 Nov 13
0
[LLVMdev] Using isa with derived types
...ntifying pointers in general > using isa<PointerType>(...), but I can't seem to figure out how I can make > sure that the pointer is pointing to a scalar value and not a function, > array, struct, etc. > > What am I missing? Please see the doxygen: http://llvm.org/doxygen/classllvm_1_1Type.html if (const PointerType *PTy = dyn_cast<PointerType>(...)) { const Type *InnerTy = PTy->getElementType(); switch (InnerTy->getTypeID()) { case Type::ArrayTyID: ... case Type::FunctionTyID: ... case Type::StructTyID: ......
2008 Nov 13
3
[LLVMdev] Using isa with derived types
Hello, I am writing an optimization pass which optimizes code based on an online pointer analysis algorithm and need to detect pointers which are pointing to derived types. I have not had any problem identifying pointers in general using isa<PointerType>(...), but I can't seem to figure out how I can make sure that the pointer is pointing to a scalar value and not a function, array,
2008 Dec 08
1
[LLVMdev] Using isa with derived types
...ne whether a pointer argument is actually an array being passed which contains scalar values, or simply a pointer with a single scalar value. In other words, I want to ignore functions that accept arrays as arguments. Nick Lewycky wrote: > > Please see the doxygen: http://llvm.org/doxygen/classllvm_1_1Type.html > > if (const PointerType *PTy = dyn_cast<PointerType>(...)) { > const Type *InnerTy = PTy->getElementType(); > switch (InnerTy->getTypeID()) { > case Type::ArrayTyID: > ... > case Type::FunctionTyID: > ... >...
2009 Oct 20
0
[LLVMdev] Dereference PointerType?
2009/10/20 Daniel Waterworth <da.waterworth at googlemail.com> > Hello, > > I'm wondering if it's possible to dereference a PointerType. I have an > AllocaInst and although I can find the number of elements allocated, (using > Instruction::getOperand(0)), I can't find a way to get the size of each > element. What I'd like to do is: > > AllocaInst
2009 Oct 20
2
[LLVMdev] Dereference PointerType?
...to me. Maybe you intented if (isa<PointerType>(allocated_type)) { size = sizeof(void*); } else { size = allocated_type->getPrimitiveSizeInBits() * 8; } but take a look at getPrimitiveSizeInBits' documentation to make sure that it is really what you want: http://llvm.org/doxygen/classllvm_1_1Type.html -- Óscar
2009 Oct 20
3
[LLVMdev] Dereference PointerType?
Hello, I'm wondering if it's possible to dereference a PointerType. I have an AllocaInst and although I can find the number of elements allocated, (using Instruction::getOperand(0)), I can't find a way to get the size of each element. What I'd like to do is: AllocaInst *alloca; PointerType *ptr_type = dynamic_cast<PointerType*>(alloca); assert(ptr_type); Type
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
2014 May 16
4
[LLVMdev] Writing an address space re-numbering pass?
...sive** hack which is already broken if Subclass data is used for other things inside LLVM. Just in case someone asks, I can't change the frontend that produces the Module so I need a way of changing the address space numbers in a pre-existing LLVM module. [1] http://llvm.org/docs/doxygen/html/classllvm_1_1Type.html Thanks, -- Dan Liew
2012 Jan 27
3
[LLVMdev] How to get the string value?
Thanks Duncan, Yes, it is a ConstantExpr! Thank you! Now trying to find a clue in ConstantExpr's functions to get that string :-) Regards, Welson On Thu, Jan 26, 2012 at 9:04 PM, Duncan Sands <baldrick at free.fr> wrote: > Hi Welson Sun, > > > Hi, if I have some LLVM code like this: > > > > @.str = private unnamed_addr constant [7 x i8]