similar to: [LLVMdev] Recover variable name after mem2reg

Displaying 20 results from an estimated 30000 matches similar to: "[LLVMdev] Recover variable name after mem2reg"

2017 Sep 07
5
RFC: Unify debug and optimized variable locations with llvm.dbg.addr [was: DW_OP_LLVM_memory]
I chatted with Chandler in person and came up with what I think is a much simpler design than my previous design in the thread titled "RFC: Introduce DW_OP_LLVM_memory to describe variables in memory with dbg.value". The crux of the problem in that thread is that we need a representation, particularly in the middle-end, to describe a variables address, at a particular program point.
2012 Aug 20
0
[LLVMdev] Problem with "Does not dominate all uses"
In your original file, %6 is defined in if.end11 and is used in cond.end. if.end11 branches to cond.true and cond.false, both of which branch unconditionally to cond.end. Therefore %6 dominates its use. In your second file %18 is defined in end.11 and used in cond.end. However, end.11 no longer dominates cond.end because you have rewritten all branches to go through the switch statement in
2010 Aug 15
0
[LLVMdev] a LICM bug (in LLVM-2.7)?
I don't think licm looks at loads/stores to allocas -- these are usually handled by mem2reg which happens much earlier (if you run your example with -mem2reg you'll see it already deleted the store). In fact, licm sinks the stores by converting them to stores to allocas first and running mem2reg on that. If you change your example to void testLICM(int* restrict p) { int i,N=100;
2010 Jul 15
0
[LLVMdev] Trying to access the user defined variable name
On Wed, Jul 14, 2010 at 3:03 PM, Arvind Sudarsanam <arvind.sudarsanam at aggiemail.usu.edu> wrote: > Dear all, > > I have the following source code: > > long f(long x, long y) > { >        long u; > >   u = x+y; >   return u; > }; > > After clang (with debug option set) and llvm opt using mem2reg, I get > the following .ll file >
2010 Jul 14
2
[LLVMdev] Trying to access the user defined variable name
Dear all, I have the following source code: long f(long x, long y) { long u; u = x+y; return u; }; After clang (with debug option set) and llvm opt using mem2reg, I get the following .ll file *************************************************************************** ; ModuleID = '<stdin>' target datalayout =
2009 Nov 17
2
[LLVMdev] llvm-gcc: missing dbg.declare/dbg.stoppoint at optimization level > O0
Hi Devang, >> I use llvm and llvm-gcc as a C-to-C transformation tool using a >> modified version of the c backend, and rely on llvm debug instructions >> to link back to the original source code. >> >> Does anyone know how to get detailed line number and variable debug >> information at optimization levels beyond O0? >> >> Currently, I extract this
2012 Aug 20
3
[LLVMdev] Problem with "Does not dominate all uses"
Hi! I'm having some trouble with a pass I'm writing. I'm using DemotePHIToStack to remove all phi node in my code with this code (this is the first thing I do in my pass): // Erase phi node vector<PHINode*> phis; for (Function::iterator i=f->begin();i!=f->end();++i) { for(BasicBlock::iterator b=i->begin();b!=i->end();++b) {
2011 Apr 15
0
[LLVMdev] Valid debug information being deleted by DAGCombiner
John, Mem2reg actually modifies debug information in a way that at least suggests it's trying to maintain debugability. Specifically, it changes llvm.dbg.declare() calls (appropriate for variables that permanently reside in a single place) to llvm.dbg.value() calls (specifying that at this instant, this variable is in this register). In fact, the .bc after inlining and mem2reg
2009 Nov 16
0
[LLVMdev] llvm-gcc: missing dbg.declare/dbg.stoppoint at optimization level > O0
Hi Martijn On Fri, Nov 13, 2009 at 4:52 AM, Martijn <martijn at martijnrutten.com> wrote: > Hello, > > I use llvm and llvm-gcc as a C-to-C transformation tool using a > modified version of the c backend, and rely on llvm debug instructions > to link back to the original source code. > > Does anyone know how to get detailed line number and variable debug > information
2009 Nov 17
0
[LLVMdev] llvm-gcc: missing dbg.declare/dbg.stoppoint at optimization level > O0
Hi Martijn, On Tue, Nov 17, 2009 at 3:25 AM, Martijn <martijn at martijnrutten.com> wrote: >> >> Without mem2reg pass, you're unlikely to get much optimization done on your IR. > > Clear, thanks! I presume the mem2reg pass is also essential in the > CLang frontend, so CLang is not an alternative to llvm-gcc to keep > more debug information? Yes. > For the
2011 Apr 15
0
[LLVMdev] Valid debug information being deleted by DAGCombiner
On Apr 15, 2011, at 2:21 PM, Villmow, Micah wrote: > John/Richard, > I think I have found the problem to why the debug information is getting destroyed. The problem is in SelectionDAG and how it interacts with the SDDbgValue nodes and custom SDNodes. > > When the dbg_value intrinsic is encountered, it adds the debug value to a specific SD Node in
2011 Apr 15
2
[LLVMdev] Valid debug information being deleted by DAGCombiner
John/Richard, I think I have found the problem to why the debug information is getting destroyed. The problem is in SelectionDAG and how it interacts with the SDDbgValue nodes and custom SDNodes. When the dbg_value intrinsic is encountered, it adds the debug value to a specific SD Node in SelectionDAGBuilder.cpp::visitIntrinsicCall(). In one of my cases, it is vector_extract_elt. During
2010 Mar 16
0
[LLVMdev] Replacement for findStopPoint() in LLVM 2.7
On 03/16/2010 06:52 PM, John Criswell wrote: > Török Edwin wrote: >> [snip] >> >> Ah, the method got moved to the instruction itself! >> >> dbgKind = Context->getMDKindID("dbg"); >> if (MDNode *Dbg = I->getMetadata(dbgKind)) { >> ... >> > > Thanks! This appears to work. Ok. > > I also have code that looks up
2016 Jul 29
3
IR @llvm.dbg.value entries for variables when a phi node has been created
I have been investigating missing variables / incorrect variable values when debugging code compiled at -O1 (and above) and believe that I have tracked the issue down to the interaction of the generation of IR @llvm.dbg.value entries and phi nodes. I would welcome someone who is more familiar with the generation of debug information to help me determine if what I think is going wrong is correct
2010 Jul 15
2
[LLVMdev] Trying to access the user defined variable name
Hi Devang, Thanks for your reply. You mentioned " First parameter is the compiler generated temp. and 3rd parameter provides info about the variable, including its name 'u'." I did manage to get this far. But, I am finding it difficult to access this info using LLVM APIs. The third parameter is of type "metadata". So I was able to access it by casting it to MDNode.
2020 Oct 08
2
Notes from dbg.value coffee chat
I chatted with Jeremy Morse, Orlando, and Stephen Tozer at the dev meeting, and wanted to summarize the conversation for our benefit, and to share it with others. I aim to be brief, so I apologize if these notes aren't as helpful as they could be to folks who weren't present. Three project ideas, by priority: 1. Address https://llvm.org/pr34136, improving quality of variable location info
2010 Aug 15
2
[LLVMdev] a LICM bug (in LLVM-2.7)?
I am studying the Transform/Scalar/LICM.cpp pass, and wrote a simple test program to validate. void testLICM(void){ int i,N=100; int data; for(i=0;i<N;i++){ data = 1; printf("i: %d\n",i); } printf("data: %d\n", data); } I expect the "data=1" will be moved out of loop (either hoist or sink). However, to my surprise, that statement
2018 Apr 04
0
llvm.localsescape/recover
On Wed, Apr 4, 2018, at 08:58, Carlo Kok via llvm-dev wrote: > That's quite likely. I can reproduce this issue with llvm 6.0 though. > I'll try with svn HEAD. > > On Tue, Apr 3, 2018, at 19:22, Reid Kleckner wrote: > > I would guess that %threedoubles has a large alignment and that is making things go wrong. I thought we fixed this bug, though. I can't find it in
2018 Apr 04
2
llvm.localsescape/recover
That's quite likely. I can reproduce this issue with llvm 6.0 though. I'll try with svn HEAD. On Tue, Apr 3, 2018, at 19:22, Reid Kleckner wrote: > I would guess that %threedoubles has a large alignment and that is making things go wrong. I thought we fixed this bug, though. I can't find it in the tracker, but it's in there. Someone used __try with local variables of type
2018 Mar 20
0
Variable tracking in debug info
The debug information does try to track what happens to parameters and local variables. In the IR this is done with llvm.dbg.value intrinsic functions, and in Machine IR this is done with DBG_VALUE instructions. These have operands that point to the metadata describing the variable, and the location or value of the variable. Ideally each optimization would preserve this information, unless the