similar to: [LLVMdev] JIT Stub Problem

Displaying 14 results from an estimated 14 matches similar to: "[LLVMdev] JIT Stub Problem"

2011 Sep 28
3
[LLVMdev] ICmpInst example?
I'm trying to come up with a simple example of using ICmpInst in a Pass. On each of the branches(true, false) I'd like to call a separate function and then resume(to the code that was already there). In this example i is a inst_iterator to Instruction the Pass is currently on. Now it segfaults opt before I can even get a dump() on it. Does anyone see what I am doing wrong? BasicBlock
2017 Nov 29
4
CodeExtractor buggy?
Hi All, I’m currently working on a simple task which needs to transform loops into tail-recursive functions. I found the CodeExtractor class a handy helper to use, but later encountered a problem. Consider the following CU struct S { int a, b; }; int foo(struct S *s, unsigned n) {   struct S *next = s;   unsigned i;   for (i = 0; i < n; ++i) {     if (!s[i].a)      
2013 Oct 25
3
[LLVMdev] Question About Function Cloning
Hello all; I have been writing this LLVM pass that extracts loops in a function and then duplicates the function so the loop is executed twice. The pass executes fine but the produced bit code does not behave correctly as it should (both the original and duplicated function in which the loop is extracted is called, but from the output it seems only one of them is executed.) Here is the source:
2011 Jan 27
0
[LLVMdev] Update PHINode after extracting code
I guess I didn't have a clear question. Suppose we have BB1 and BB2 both point to BB3. BB1 has variable x. BB2 also as variable x. BB3 will have PHINode for x with 2 value from BB1 and BB2. BB1 BB2 \ / BB3 Now if BB1 and BB2 is extracted into a function (using ExtractCodeRegion), they will be replaced by a basic block called codeRepl (which has a call to the extracted
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 ]
2011 Oct 12
2
[LLVMdev] insert ICmpInst/BranchIns in Pass?
In a pass I would like to insert a ICmpInst/BranchInst pair to check if 2 GlobalVariables are equal or not. If they are not I would like to call a function. I've tried splitting the current block and then inserting before the existing instructions, but for some reason this seems to ruin the iterator(i). What is the correct way todo something like this? void checkShadowPtr(Module &M,
2011 Jan 27
2
[LLVMdev] Update PHINode after extracting code
On 01/26/2011 07:50 PM, Vu Le wrote: > I guess I didn't have a clear question. > > Suppose we have BB1 and BB2 both point to BB3. > BB1 has variable x. BB2 also as variable x. > BB3 will have PHINode for x with 2 value from BB1 and BB2. > BB1 BB2 > \ / > BB3 > > Now if BB1 and BB2 is extracted into a function > (using ExtractCodeRegion), they
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.
2008 Nov 17
1
[LLVMdev] Question about ExtractLoop
Hi, I have a question about ExtractLoop() in CodeExtractor.cpp. The sample code is a simple list traversal, as attached. The generated bitcode (from llvm-gcc -O1) is shown below. -------------------------------------------------------------------------------------------------------------------------------- define i32 @walk(%struct.node2* %list2) nounwind { entry: %0 = icmp eq
2011 Mar 12
0
[LLVMdev] problems when the llvm::ExtractCodeRegion updates the Phi nodes in successors ... is there a method to eliminate phi nodes ?
Hi, I use the llvm::ExtractCodeRegion to extract each loop into a separate function, but I have a problem when I run this on the SPEC CPU 2006 on the 401.bzip2 benchmark. First I use clang -O3 to generate optimized llvm code and then I extract some loops from the module built from blocksort.c source file. The problem is that the PHI nodes contained in the successors of the codeRepl
2013 Feb 04
0
[LLVMdev] [Polly] Parallelizing outer loop containing inner reduction loop
Hi Dmitry, [FORTRAN code] > The difference between two versions is only in the way how inner > reduction loop is implemented. In first case it is explicit and in > second case - uses sum intrinsic, which is lowered to plain code by > DragonEgg. In first case Polly successfully detects parallel outer > loop, in second case - it can't. Thanks for the test
2013 Jan 04
4
[LLVMdev] [Polly] Aliasing problems escalation (WAS: Re: [DragonEgg] [Polly] Should we expect DragonEgg to produce identical LLVM IR for identical GIMPLE?)
Hi, Here's another case, different in high-level, but similar in low-level. When Fortran allocatable array is defined in module, its actual dimensions are kept in internal structure. Loads originated from reading these dimensions confuse Polly on any use of this array. Attachments: 1) Sample Fortran source code (to be compiled with and without -DMODULE to see failing and working version,
2013 Feb 03
2
[LLVMdev] [Polly] Parallelizing outer loop containing inner reduction loop
Oops, sorry for the message title, making it more descriptive now... 2013/2/3 Dmitry Mikushin <dmitry at kernelgen.org> > Dear all, > > Yesterday, from the customer's code I observed relatively simple case, > where Polly is unable to detect parallelizable outer loop. Consider two > versions of Fortran routine: > > 1) > > subroutine filter(H, szh, X, szx, Y,
2012 Jul 16
3
[LLVMdev] RFC: LLVM incubation, or requirements for committing new backends
Tom, I think it might be productive to fork this thread to discuss making the requirements for upstreaming a new LLVM target more explicit and open. I'd also like to gauge interest in an idea I've discussed privately with a few community members, namely the concept of having a semi-official "incubation" system whereby proposed backends could get a trial run before becoming part