similar to: [LLVMdev] indirectbr

Displaying 20 results from an estimated 4000 matches similar to: "[LLVMdev] indirectbr"

2010 Jan 02
3
[LLVMdev] indirectbr
Hello, I have a question about the indirectbr instruction. I attempted to use it according to the example in the Assembly Language Reference manual, but got an "expected instruction opcode" error. Poking about on the web I found this document: http://nondot.org/sabre/LLVMNotes/IndirectGoto.txt which appears to be a Nov 2, 2009 proposal to add indirectbr and blockaddress() to the IR
2010 Jan 02
0
[LLVMdev] indirectbr
On Jan 2, 2010, at 11:03 AM, Dustin Laurence wrote: > Hello, > > I have a question about the indirectbr instruction. I attempted to > use > it according to the example in the Assembly Language Reference manual, > but got an "expected instruction opcode" error. Poking about on the > web > I found this document: > >
2010 Jan 02
2
[LLVMdev] inbounds (was Re: indirectbr)
On 01/02/2010 11:24 AM, Bob Wilson wrote: > Yes, that is correct. It is supported in the trunk sources, but it has > not yet been released. Hmm. Would the same also be true of the "inbounds" keyword for GEP? It doesn't seem to be recognized ("expected type"). Dustin
2010 Jan 02
0
[LLVMdev] inbounds (was Re: indirectbr)
On Sat, Jan 2, 2010 at 2:31 PM, Dustin Laurence <dllaurence at dslextreme.com> wrote: > On 01/02/2010 11:24 AM, Bob Wilson wrote: > >> Yes, that is correct.  It is supported in the trunk sources, but it has >> not yet been released. > > Hmm.  Would the same also be true of the "inbounds" keyword for GEP?  It > doesn't seem to be recognized
2011 Mar 31
1
[LLVMdev] indirectbr implementation for Alpha backend
Hi, I encountered an error while trying to use the indirectbr instruction with Alpha backend (current build). Here's part of the code sequence that I tried to compile: bb1: %1 = load i32* %i, align 4 %2 = add nsw i32 %1, 1 store i32 %2, i32* %i, align 4 indirectbr i8* blockaddress(@main, %bb1), [ label %bb1 ] br label %return This compiles correctly when I use the X86 or PPC
2010 Dec 12
0
[LLVMdev] indirectbr/blockaddress question
On Sat, Dec 11, 2010 at 4:19 PM, Maurice Marks <maurice.marks at gmail.com> wrote: > In my llvm jit project I needed to lookup BB addresses at execution time and > then jump to the corresponding BB. A C++ routine called at runtime from IR > finds the right BB, gets its BlockAddress and returns it as an i8*. The IR > does an indirectbr on this value... > Well, not really. The
2010 Aug 02
2
[LLVMdev] indirectbr and phi instructions
Hi, How does the requirement that phi instructions have one value per predecessor basic block interact with indirectbr instructions? For instance, take the following code: L1: br i1 %somevalue, label %L2, label %L3 L2: %ret1 = i8* blockaddress(@myfunction, %L5) br label %L4 L3: %ret2 = i8* blockaddress(@myfunction, %L6) br label %L4 L4: %ret = phi i8* [%ret1, L2], [%ret2, L3]
2010 Sep 15
1
[LLVMdev] indirectbr across function boundaries
Hi according to [1] and [2] the blockaddress of any basic block can be obtained. But I am not sure about that fact that an indirectbr can only target at a basic block which is within the same function as the indirectbr instruction. [1] states: ---8<--- All possible destination blocks must be listed in the label list, otherwise this instruction has undefined behavior. This implies that jumps
2010 Dec 11
3
[LLVMdev] indirectbr/blockaddress question
In my llvm jit project I needed to lookup BB addresses at execution time and then jump to the corresponding BB. A C++ routine called at runtime from IR finds the right BB, gets its BlockAddress and returns it as an i8*. The IR does an indirectbr on this value... Well, not really. The routine returns the address of a BlockAddress node. Is there any way to get the real runtime code address for the
2011 Jul 07
3
[LLVMdev] Missed optimization with indirectbr terminator
Consider this IR fragment produced after -O3: > %7: > %8 = phi i8* [ blockaddress(@0, %19), %19 ], [ %12, %11 ] > %9 = phi i32 [ %20, %19 ], [ 0, %11 ] > indirectbr i8* %8, [label %4, label %19] > > %19: > %20 = add nsw i32 %9, 1 > %21 = icmp eq i32 %9, 9999 > br i1 %21, label %16, label %7 the br in %19 should be optimized to branch directly to itself rather than going
2011 Jul 07
0
[LLVMdev] Missed optimization with indirectbr terminator
On Jul 7, 2011, at 2:05 AM, Carlo Alberto Ferraris wrote: > Consider this IR fragment produced after -O3: >> %7: >> %8 = phi i8* [ blockaddress(@0, %19), %19 ], [ %12, %11 ] >> %9 = phi i32 [ %20, %19 ], [ 0, %11 ] >> indirectbr i8* %8, [label %4, label %19] >> >> %19: >> %20 = add nsw i32 %9, 1 >> %21 = icmp eq i32 %9, 9999 >> br i1 %21,
2010 Mar 15
2
[LLVMdev] LLVM tries to remove labels used in blockaddress()
On Mar 15, 2010, at 9:41 AM, Chris Lattner wrote: > > On Mar 15, 2010, at 7:11 AM, Sebastian Schlunke wrote: > >> Hi, >> >> i ran into a problem when using blockaddress() with a label in another function. It seems to me that LLVM tries to remove the label used in blockaddress because it seems like it is not used, but in fact it may be used somewhere with a
2013 Jul 25
0
[LLVMdev] Steps to addDestination
Hi Rasha, > for(rit=Result.begin();rit!=Result.end();++rit) > { > Value* Address= BlockAddress::get (*rit); > > IndirectBrInst *IBI = IndirectBrInst::Create(Address, Result.size(),i->getTerminator() ); > IBI->addDestination((*rit)); > } This would be creating a block looking something like: [ Do stuff ] indirectbr i8*
2010 Jan 03
0
[LLVMdev] 'Address of Label and Indirect Branches in LLVM IR' blog post
On 2010-01-03 10:33, Chris Lattner wrote: > If you're interested in this new extension, here is some more information with some less-than-obvious aspects of the design: > http://blog.llvm.org/2010/01/address-of-label-and-indirect-branches.html > > This feature was added to LLVM by Bob Wilson, Dan Gohman and I to mainline back in November. If you have questions or comments about
2010 Jan 03
1
[LLVMdev] 'Address of Label and Indirect Branches in LLVM IR' blog post
2010/1/3 Török Edwin <edwintorok at gmail.com>: > On 2010-01-03 10:33, Chris Lattner wrote: >> If you're interested in this new extension, here is some more information with some less-than-obvious aspects of the design: >> http://blog.llvm.org/2010/01/address-of-label-and-indirect-branches.html >> >> This feature was added to LLVM by Bob Wilson, Dan Gohman and
2010 Mar 15
0
[LLVMdev] LLVM tries to remove labels used in blockaddress()
On Mar 15, 2010, at 10:01 AM, Sebastian Schlunke wrote: > I see. But the block does not necessarily contain dead code. This case is now fixed in r98566, I will fix the 'dead block' case in a bit. -Chris > > My original problem is more like this: > > define i32 @main() { > entry: > %target = bitcast i8* blockaddress(@test_fun, %test_label) to i8* > > call
2010 Mar 15
0
[LLVMdev] LLVM tries to remove labels used in blockaddress()
On Mar 15, 2010, at 10:07 AM, Bob Wilson wrote: >>> An earlier revision simply generated asm-code, where the appropriate label was missing, thus causing gcc to fail when i wanted to compile the asm-file. >> >> Here is a slightly reduced testcase: >> >> define i8* @test1() nounwind { >> entry: >> ret i8* blockaddress(@test_fun, %test_label) >> }
2010 Feb 12
0
[LLVMdev] Portable I/O
Thanks everyone, a set of wrapper routines it will be then. Dustin, are the routines you wrote open source or do you know if there is already a project that provides such a portable interface to libc for LLVM? If not, I'll write my own routines, but if there is a way to adopt a common standard or avoid reinventing the wheel I'm all for it. Mike
2010 Mar 15
1
[LLVMdev] LLVM tries to remove labels used in blockaddress()
Works like a charm! Thanks for the fast help. :) - Sebastian On Monday 15 March 2010 20:10:54 you wrote: > > On Mar 15, 2010, at 10:01 AM, Sebastian Schlunke wrote: > > > I see. But the block does not necessarily contain dead code. > > This case is now fixed in r98566, I will fix the 'dead block' case in a bit. > > -Chris > > > > > My
2010 Mar 15
3
[LLVMdev] LLVM tries to remove labels used in blockaddress()
I see. But the block does not necessarily contain dead code. My original problem is more like this: define i32 @main() { entry: %target = bitcast i8* blockaddress(@test_fun, %test_label) to i8* call i32 @test_fun(i8* %target) ret i32 0 } define i32 @test_fun(i8* %target) { entry: indirectbr i8* %target, [label %test_label] test_label: ; assume some code here... br label %ret ret: ret