search for: vmle

Displaying 12 results from an estimated 12 matches for "vmle".

Did you mean: vme
2011 Feb 11
3
[LLVMdev] Unit testing with random input using JIT
...gument is a pointer and the function changes the value it pointed to, do you know how to get that updated value after executing the wrapper function? Thanks. Vu On Tue, Jan 11, 2011 at 2:40 PM, Reid Kleckner <reid.kleckner at gmail.com>wrote: > On Tue, Jan 11, 2011 at 1:41 PM, Vu Le <vmle at ucdavis.edu> wrote: > > Hi, > > I want to implement a tool that probes a function with several input and > > records all the return output. > > The function might have more than 1 return value (by reference > parameters). > > > > Does ExecutionEngine::ru...
2011 Feb 11
0
[LLVMdev] Unit testing with random input using JIT
...n and cast the result: // Let F be an llvm::Function* referring to 'f'. void (*f)(int*) = (void (*)(int*))JIT->getPointerToFunction(F); int a; f(&a); // read a I haven't compiled this, it's a guess at the usage from memory. Reid On Fri, Feb 11, 2011 at 12:55 PM, Vu Le <vmle at ucdavis.edu> wrote: > Suppose I want to test the function f with zero. > f(int *t){ >   *t = 2 > } > What I did was that I create a wrapper > void Wrapper(){ >   int a = 1; >   int *b = &a; >   f(b); >   // now I want to print the value of b >   // but I d...
2011 Jan 11
0
[LLVMdev] Unit testing with random input using JIT
On Tue, Jan 11, 2011 at 1:41 PM, Vu Le <vmle at ucdavis.edu> wrote: > Hi, > I want to implement a tool that probes a function with several input and > records all the return output. > The function might have more than 1 return value (by reference parameters). > > Does ExecutionEngine::runFunction() support function call w...
2011 Jan 11
2
[LLVMdev] Unit testing with random input using JIT
Hi, I want to implement a tool that probes a function with several input and records all the return output. The function might have more than 1 return value (by reference parameters). Does ExecutionEngine::runFunction() support function call with complex argument type? If not, I guess that I have to create a wrapper function, prepare all the data, and call the original function. Am I on the right
2011 Jan 24
0
[LLVMdev] CodeExtractor.cpp potential bug?
...GraphT::child_end(NewBB)) == 1 && 00231 "NewBB should have a single successor!"); If A has 2 successors C, D, after it split to A->NewBB, NewBB should have 2 successors. Hope anyone could explain this to me. Thanks, Vu On Sat, Jan 22, 2011 at 10:28 PM, Vu Le <vmle at ucdavis.edu> wrote: > Hi Cameron, > I'm a bit confused on DominatorTreeBase::Split() ( > http://llvm.org/docs/doxygen/html/Dominators_8h_source.html#l00229) > If a basic block A splits into A->B, when I call Split(), which is NewBB? > A or B. > Thanks, > Vu > &...
2011 Jan 27
0
[LLVMdev] Update PHINode after extracting code
...before extracting BB1 and BB2, I split the PHINode in BB3 into another basic block BB1 BB2 \ / PhiBB | BB And extract BB1, BB2 and PhiBB. If you have any ideas or if you think this will not work, please let me know. Thanks. Vu On Tue, Jan 25, 2011 at 12:33 AM, Vu Le <vmle at ucdavis.edu> wrote: > Hi all, > I have problem with ExtractCodeRegion (CodeExtractor.cpp). > My original program is as follows. > bb: > ... > %tmp.15 = load %struct.MYSQL_ROWS** %3, align 4 > ... > bb1: > ... > %tmp.1 = load %struct.MYSQL_ROWS** %6, al...
2010 Dec 31
3
[LLVMdev] CodeExtractor.cpp potential bug?
There might be a misuse of DominatorTree::splitBasicBlock in CodeExtractor.cpp, line 145. Header is splited into two (OldPred->NewBB). Line 145 updates the dominator tree by calling DT->splitBasicBlock(NewBB). I think it should be DT->splitBasicBlock(OldPred). When I tried to extract a code region whose header has 2 successors, my pass crashed. It was because header (or OldPred) is the
2011 Jan 25
2
[LLVMdev] Update PHINode after extracting code
Hi all, I have problem with ExtractCodeRegion (CodeExtractor.cpp). My original program is as follows. bb: ... %tmp.15 = load %struct.MYSQL_ROWS** %3, align 4 ... bb1: ... %tmp.1 = load %struct.MYSQL_ROWS** %6, align 4 ... bb4: ; preds = %bb1, %bb, %entry %tmp.0 = phi %struct.MYSQL_ROWS* [ null, %entry ], [ %tmp.15, %bb ], [ %tmp.1, %bb1 ]
2010 Dec 22
0
[LLVMdev] Extracting Single-entry single-exit Regions into functions
Hi, I want to write a pass that pulls single-entry a single-exit (SESE) region into a function. The idea is similar to extracting a loop in LoopExtractor.cpp. Basically, for each region that meet our criteria, 1. Find all basic blocks in that regions 2. Call llvm::ExtractCodeRegion() to replace that region by a call to the extracted function. 3. Delete the region from the RegionPassManager queue
2011 Jan 27
0
[LLVMdev] Update PHINode after extracting code
Oh, yes. My algorithm extracts regions in a top-down manner. I modified your RegionPass so that it only visits 2nd level regions. Those regions are extracted into functions and the process continues for the new functions. It's kind of messy since I've just played with LLVM. I'll modify the algorithm so it can extract regions bottom-up. Vu On Wed, Jan 26, 2011 at 10:10 PM, Tobias
2011 Feb 03
1
[LLVMdev] Preserve RegionInfo after regionsimplify
Hi Tobias, My RegionSimplify pass adds new exit node for refined regions to convert them into simple region. However, the RegionInfo pass does not seem to recognize those changes. For example, in the attached file, bb4.region is supposed to be in the first region. My RegionExtractor pass required the extracted region to be simple. Should we modify RegionInfo or is their away to preserve the
2011 Jan 27
0
[LLVMdev] Update PHINode after extracting code
Hi Tobias, If the PHI node at exit block of region R has multiple inputs from the R, I split the exit block into 2. The first block contains all PHI nodes whose input are all from the region. The second is the new exit node. All branches (outside R) to the old exit now point the new exit. All regions whose exit is the old exit are also updated with the new exit node. It works like a charm.