similar to: [LLVMdev] BlockAddress is a "User"

Displaying 20 results from an estimated 900 matches similar to: "[LLVMdev] BlockAddress is a "User""

2010 Feb 26
0
[LLVMdev] BlockAddress is a "User"
My apologies. This problem was indeed with my changes to the backend. Next time I will more carefully examine the source of the problem. :) On Fri, Feb 26, 2010 at 12:40 PM, Marc de Kruijf <dekruijf at wisc.edu> wrote: > I've been playing around with the new IndirectBr and BlockAddress types. > I'm finding that in CodeGen, during "EliminateMostlyEmptyBlocks", >
2010 Jul 18
2
[LLVMdev] MemoryDependenceAnalysis Bug or Feature?
Yes, I'm not arguing that there is a dependence, just that it's not a clobber dependence. The case of a load is already considered earlier in that function and with isLoad == false it returns MemDepResult::getDef(). My question is: why should a read-only call (which yields AliasAnalysis::Ref and is handled in this code fragment) be any different from e.g. a load. Isn't a read-only
2008 May 02
4
[LLVMdev] Pointer sizes, GetElementPtr, and offset sizes
The LLVA and LLVM papers motivate the GetElementPtr instruction by arguing that it abstracts implementation details, in particular pointer size, from the compiler. While it does this fine for pointer addresses, it does not manage it for address offsets. Consider the following code: $ cat test.c int main() { int *x[2]; int **y = &x[1]; return (y - x); } $ llvm-gcc -O3 -c test.c
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
2010 Mar 15
0
[LLVMdev] LLVM tries to remove labels used in blockaddress()
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 indirectbr. > > I attached a small test-case that produces this error. (The
2010 Mar 15
3
[LLVMdev] LLVM tries to remove labels used in blockaddress()
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 indirectbr. I attached a small test-case that produces this error. (The original problem is much more complicated, so i hope the reduced example, which has no
2008 Jul 31
2
[LLVMdev] Unwinds Gone Wild
On Thu, Jul 31, 2008 at 2:19 AM, Duncan Sands <baldrick at free.fr> wrote: > Hi, > > > Can anyone tell me if invoke/unwind is stable in 2.3? I'm seeing some > > really weird stuff -- unwinds are ending up in seemingly arbitrary > places... > > definitely not inside the caller's unwind block My target is x86. > > codegen doesn't know how to
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
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
2011 Jul 31
3
[LLVMdev] SwitchInst::addCase with BlockAddress
I'm trying to figure out how to feed a blockaddress to a switch condition AND destination (basically emulating an indirectbr via a switch; I know it's not a good approach, I'm just experimenting). Suppose I have the following: SwitchInst *s = SwitchInst::Create(...); BasicBlock *bb = ...; PtrToIntInst k = new PtrToIntInst(BlockAddress::get(bb), <TYPE>, "", s);
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
2010 Jul 18
0
[LLVMdev] MemoryDependenceAnalysis Bug or Feature?
Sorry, I misunderstood the question. The difference between a load and a read-only call is that load can be used as the value of the memory location. E.g. DeadStoreElimination pass removes a store that stores a just loaded value back into the same location. To do this it checks if the stored value is the value of load. Read-only call cannot be used like this. This being said, I don't know if
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
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
2011 Aug 01
0
[LLVMdev] SwitchInst::addCase with BlockAddress
On Sun, Jul 31, 2011 at 7:36 AM, Carlo Alberto Ferraris <cafxx at strayorange.com> wrote: > I'm trying to figure out how to feed a blockaddress to a switch condition > AND destination (basically emulating an indirectbr via a switch; I know it's > not a good approach, I'm just experimenting). > Suppose I have the following: > > SwitchInst *s =
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) >> }
2018 Apr 16
0
Question concerning llvm::BlockAddress class
On Mon, Apr 16, 2018 at 04:14:03PM -0400, Brenda So via llvm-dev wrote: > Hi all, > > I have a question concerning block address class in LLVM. I am currently > working on a project where I need to obtain and manipulate basic block virtual > addresses. I was searching the web and found the llvm::BlockAddress class ( > http://llvm.org/doxygen/classllvm_1_1BlockAddress.html). With
2018 Apr 16
2
Question concerning llvm::BlockAddress class
Hi all, I have a question concerning block address class in LLVM. I am currently working on a project where I need to obtain and manipulate basic block virtual addresses. I was searching the web and found the llvm::BlockAddress class (http://llvm.org/doxygen/classllvm_1_1BlockAddress.html). With this class I was able to obtain a printout like this: i8* blockaddress(@func_name, %bb_label) How do
2010 Jul 16
2
[LLVMdev] MemoryDependenceAnalysis Bug or Feature?
Hello, I'm taking a really good look at the MemoryDependenceAnalysis pass, but I'm slightly confused about one little thing. I think it's a bug but I'm not confident enough to submit a bug report. Is there a reason why read-only calls are considered to "clobber" pointers in the non-load case (which is what gets returned due to the fall-through in the switch -- see
2008 May 02
0
[LLVMdev] Pointer sizes, GetElementPtr, and offset sizes
On Fri, May 2, 2008 at 1:22 PM, Marc de Kruijf <dekruijf at cs.wisc.edu> wrote: > The LLVA and LLVM papers motivate the GetElementPtr instruction by arguing > that it abstracts implementation details, in particular pointer size, from > the compiler. While it does this fine for pointer addresses, it does not > manage it for address offsets. Consider the following code: > >