similar to: llvm isTokenTy() deprecated?

Displaying 16 results from an estimated 16 matches similar to: "llvm isTokenTy() deprecated?"

2016 Aug 25
2
InstList insert depreciated?
Hi llvm-devel, I have migrated my codebase from llvm-3.6 to llvm 3.8.1-stable. Although I was able to resolve most of the problems, I am facing issues resolving the following: To insert an instruction immediately after the first instruction within a basic block, I first get all instructions in my basic block in an instruction container list. Once that is done, I insert my new instruction in the
2016 Aug 25
2
InstList insert depreciated?
Jon, > You want: > TaintVar->insertAfter(FirstI); This worked! Thank you. On Thu, Aug 25, 2016 at 9:38 AM, Jonathan Roelofs <jonathan at codesourcery.com> wrote: > > > On 8/25/16 7:01 AM, Shehbaz Jaffer via llvm-dev wrote: >> >> I tried an alternative way of adding instruction by first getting the >> first instruction of the basic block, and then
2016 Mar 28
2
llvm extract struct elements and struct size in C++
LLVM Newbie here. I have the following C++ program using namespace std; struct A{ int i; int j; }; int main() { struct A obj; obj.i = 10; obj.j = obj.i; return 0; } Using clang++, I can see that LLVM IR contains struct field as below %struct.A = type { i32, i32 } I would like to obtain the structure elements using LLVM Pass. I write the following program - that iterates
2016 Mar 29
0
llvm extract struct elements and struct size in C++
On 28 March 2016 at 13:34, Shehbaz Jaffer via llvm-dev <llvm-dev at lists.llvm.org> wrote: > I want to create a database of all structures (global and local) > defined and being used in my program. Eg. < A , <int32, int32> , B , > <int32, bool , char *>>. I think the closest LLVM has is either Module::getIdentifiedStructTypes or the class it actually uses:
2020 Jun 17
2
InstCombine doesn't delete instructions with token
Hello David, I am having an issue with some custom intrinsics that return a token value: InstCombine deletes the users of the token but not the instruction that creates the token itself. The IR is still valid but it's wasted. The source of the issue is coming from an old patch of yours: commit 7204cff0a121ebc770cf81f7f94679ae7324daae Author: David Majnemer <david.majnemer at
2020 Jun 17
2
InstCombine doesn't delete instructions with token
Yes, it's still respected in this case, as the only instructions that will be deleted have been RAUW with undef. Originally, all instructions where RAUW but only non-EHPad were deleted (that means EHPad were RAUW but not deleted). Then it was later patched by not RAUW token instructions and now not deleting EHPad nor token instructions. My assumption is that the instructions we wanted to
2020 Jun 17
2
InstCombine doesn't delete instructions with token
I did not observe any assertion. In addition, the documentation ( https://llvm.org/docs/LangRef.html#undefined-values) says: The string ‘undef’ can be used anywhere a constant is expected, and indicates that the user of the value may receive an unspecified bit-pattern. Undefined values may be of any type (other than ‘label’ or ‘ void’) and be used anywhere a constant is permitted. Either way,
2008 Nov 13
0
[LLVMdev] Using isa with derived types
Zappel-Phillip wrote: > 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
2008 Dec 08
1
[LLVMdev] Using isa with derived types
I believe I failed to ask the question properly, I am not trying to determine whether the elements of an array are scalar type. Instead, I want to be able to iterate over the function's parameters and determine 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
2009 Oct 20
2
[LLVMdev] Dereference PointerType?
Daniel Waterworth <da.waterworth at googlemail.com> writes: [snip] Use the getElementType method of PointerType. >> size_t size; >> if (isa<PointerType>(allocated_type)) { >> size = sizeof(void*) * 8; >> } else { >> size = allocated_type->getPrimitiveSizeInBits(); >> } >> // size now equals the size (in bits) of the type allocated
2014 May 16
4
[LLVMdev] Writing an address space re-numbering pass?
Hi, I'm trying to figure how to write a Module pass that globally renumbers address space numbers e.g. >From -> To 0 -> 1 1 -> 3 2 -> 2 3 -> 4 4 -> 999 I see that the address space number is a property that belongs to Types[1] and that types are immutable, so I'm not sure how to correctly implement this. But if it is I'd greatly appreciate advise on how to do
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,
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
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
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]