similar to: [LLVMdev] For a pointer to pointer ?How to fast get the pointee pointer?

Displaying 20 results from an estimated 2000 matches similar to: "[LLVMdev] For a pointer to pointer ?How to fast get the pointee pointer?"

2015 Jul 18
4
[LLVMdev] How can i differentiate pointer type int 32* from int 32** ?
John, thanks for your helpful advice. My ultimate goal is to construct a full instruction-level program dependence graph for a given IR file. The hard point is how to establish the correct data dependence edges when some function arguments are multi-level pointers. To solve this problem I hope to check the point-to level for each pointer variable. I think the data dependence through pointers can
2014 Mar 25
2
[LLVMdev] Alignment of pointee
Hi all, Is there a way to express in the IR that a pointer's value is a multiple of, say, 32 bytes? I.e. the data the pointer points to has an alignment of 32 bytes. I am not meaning the natural alignment determined by the object's size. I am talking about a double* pointer and like to explicitly overestimate the alignment. I am trying to add this pointer as a function's
2014 Mar 25
3
[LLVMdev] Alignment of pointee
On 03/25/2014 10:08 AM, Krzysztof Parzyszek wrote: > On 3/25/2014 8:53 AM, Frank Winter wrote: >> >> One can see that if the initial alignment of the pointee of %arg0 was 32 >> bytes and since the vectorizer operates on a loop with a fixed trip >> count of 4 and the size of double is 8 bytes, the vector loads and >> stores could be ideally aligned with 32 bytes
2014 Mar 25
2
[LLVMdev] Alignment of pointee
Related to this subject is the __attribute__(aligned(X)) that can be set on a type in C/C++. It is being used when generating the load / stores / memcpy / ... but is lost with respect to the type's attribute. In many a case this could help various analysis or transforms to provide more accurate results when such a type is used. The __builtin_assume_aligned could be an way to solve this.
2015 Mar 09
3
[LLVMdev] byval in a world without pointee types
On Mon, Mar 9, 2015 at 12:38 PM, Reid Kleckner <rnk at google.com> wrote: > If we're keeping types on GEP, > You mean rather than just dropping gep entirely & doing manual pointer arithmetic? (& moving inbounds to an attribute on pointer addition, I guess?) > then IMO we should keep them on allocas and globals. It keeps the IR human > readable. > & what of
2015 Apr 29
2
[LLVMdev] AliasAnalysis calling failed in Pass interaction
Dear LLVM developers, I am Shen, a PhD student at Lehigh Univ. PA. Now I am implementing a Program Dependence Graph(PDG) on LLVM. I have 4 passes here: 1. ProgramDependenceGraph (a *ModulePass *on the highest level) 2. DataDependenceGraph (a Intermediate *FunctionPass*). 3. FlowDependenceAnalysis Pass (a intermediate *FunctionPass*) which uses llvm built-in AliasAnalysis (-basicaa) 4.
2015 Mar 09
2
[LLVMdev] byval in a world without pointee types
Moving this to llvm-dev where I should've sent it in the first place (& +Chandler, because we discussed this offline a bit) On Thu, Feb 19, 2015 at 11:32 AM, Reid Kleckner <rnk at google.com> wrote: > On Thu, Feb 19, 2015 at 10:57 AM, David Blaikie <dblaikie at gmail.com> > wrote: > >> >> >> On Thu, Feb 19, 2015 at 8:31 AM, Rafael Espíndola <
2015 Jul 17
2
[LLVMdev] How can i differentiate pointer type int 32* from int 32** ?
John, thanks for you answer! But as far as I know LLVM doesn't provide any interface for finding the pointee of a pointer directly, so i have to process a multi-level pointer i need to write my own function to check pointers level by level, is that right? On Fri, Jul 17, 2015 at 1:47 PM, John Criswell <jtcriswel at gmail.com> wrote: > On 7/17/15 12:38 PM, Shen Liu wrote: > >
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
2011 Jul 04
2
[LLVMdev] Deleting unused C++ code
On Sun, Jul 3, 2011 at 10:34 PM, Reid Kleckner <reid.kleckner at gmail.com> wrote: > An easier way would be to use a coverage tool like gcov to see what's > actually *used* when the app is run normally.  Then you can ask the > question, what percentage of all lines of code are dead? We need something that can do this using static analysis... Otherwise we can just use Eclipse
2015 Jul 09
2
[LLVMdev] How to use get the memory location of a function argument correctly?
Hi all, i hope to get the MemoryLocation for argument %1 in a CallInst like "call void @function(i32* %1)", and i found an interface "getForArgument()" which seems available for this. However, i don't know how to correcly fill the 3rd argument TargetLibraryInfo in my own code and can't find an example in google. Does anybody know how to do it? Or some other advice for
2011 Jul 04
0
[LLVMdev] Deleting unused C++ code
On Mon, Jul 4, 2011 at 1:42 AM, Øyvind Harboe <oyvind.harboe at zylin.com> wrote: > On Sun, Jul 3, 2011 at 10:34 PM, Reid Kleckner <reid.kleckner at gmail.com> wrote: >> An easier way would be to use a coverage tool like gcov to see what's >> actually *used* when the app is run normally.  Then you can ask the >> question, what percentage of all lines of code
2006 Jul 18
3
[LLVMdev] Correctness of Optimization Phases
>> I may sound stupid but can someone tell me that after applying >> optimization sequences randomly whether we can surely say that the >> final output is correct? > > Answering this question is equivalent to solving the Halting Problem. Prooving correctness of a compiler is really an NP problem. This goes for any compiler backend. All you can do is have enough test
2010 Apr 21
2
[LLVMdev] determining the number of iteration of a loop
Hello I'm wandring to know how many times a block is executed inside a loop ? knowing that I can't use getSmallConstantTripCount() because the number is unkown "for (i=0;i<N;i++) for example" I'm using a Function pass for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) { if (Loop *L = LI->getLoopFor(BB)) { if (L->getHeader() ==
2002 Nov 21
2
[LLVMdev] DSnode type question
Dear LLVM, When I use analyze to construct the DSGraph for the lists.c program in test/Programs/SingleSource/Shootout directory. I found out the heap node in the function test_list() all have type FOLDED:R. I was wondering why it's not heapnode anymore? My pass need to use this type information to determine whether a node is heap node. Is there any way I can know this is a heap node in this
2015 Jan 16
2
Guests using more ram than specified
Hi, today I noticed that one of my HVs started swapping aggressively and noticed that the two guests running on it use quite a bit more ram than I assigned to them. They respectively were assigned 124G and 60G with the idea that the 192G system then has 8G for other purposes. In top I see the VMs using about 128G and 64G which means there is nothing left for the system. This is on a CentOS 7
2009 Mar 25
3
[LLVMdev] pragmas
Hello Is there a "generic" pragma that is supported by LLVM and is visible by optimization passes? or any other way for a programmer to pass meta-data information to the compiler? I am writing an analysis pass that could benefit from user provided information. At this stage, I could like to keep the kind of information that the user can provide as general as possible.
2017 Oct 03
2
Changing Alignment of global variables in LLVM
What is the best way to change the alignment of global variables and allocated structures in LLVM during one of its optimization passes? For example, I want to change, @u = internal unnamed_addr global [5 x [65 x [65 x [65 x double]]]] zeroinitializer, align 16 to align to 32 bytes. How can this be accomplished so that all other references in the code accessing this structure are also
2014 May 20
4
[LLVMdev] How to decide whether a function is executed or not
Hello everyone, I want to decide whether a function is executed or not. For example (the value of cond is not determined at compile time): br i1 %cond, label %if, label %else if: ... call void f() ... br label %exit else: ... br label %exit We could say that function f is control dependent on cond and may not be executed. On the other hand: br i1 %cond, label %if, label %else
2018 Apr 09
2
start a domain, minimal memory request.
Hi: I use libvirt manage virtual guest, When I start many virtual domain(my host 128G physical memory), example, I start 100 guest, 1G per guest。sometime I will encounter "cannot allocate memory", "cannot set up guest memory \'pc.ram\': cannot allocate memory". sometime encounter qemu process killed by system(oom), I want to know what minimal memory need when start