Shreyas Krishnan
2015-May-14 18:55 UTC
[LLVMdev] getnode(BB) = 0; block already in dominator tree
Hi I run into an issue as part of splitting a critical edge during LICM. When a new basic block is created and needs to be added into the dominator tree, the block is already in the dominator tree. I print the dominator tree and I see it is added into the tree as child of node it is supposed to dominate. How do I debug to find out why/when its getting added into the tree. ? Tips/suggestions on how to debug to find out how the densemap involved is getting updated will be great. thanks Shrey -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150514/92b647a8/attachment.html>
Daniel Berlin
2015-May-14 19:20 UTC
[LLVMdev] getnode(BB) = 0; block already in dominator tree
Are you calling splitCriticalEdge? If so, it will take care of updating dominators for you. On Thu, May 14, 2015 at 11:55 AM, Shreyas Krishnan <shreyas76 at gmail.com> wrote:> Hi > I run into an issue as part of splitting a critical edge during LICM. > When a new basic block is created and needs to be added into the dominator > tree, the block is already in the dominator tree. I print the dominator tree > and I see it is added into the tree as child of node it is supposed to > dominate. > > How do I debug to find out why/when its getting added into the tree. ? > Tips/suggestions on how to debug to find out how the densemap involved is > getting updated will be great. > > thanks > Shrey > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
Shreyas Krishnan
2015-May-14 20:50 UTC
[LLVMdev] getnode(BB) = 0; block already in dominator tree
yes, am just using the LICM that uses splitCriticalEdge I see the issue when the dominator tree is being updated On Thu, May 14, 2015 at 12:20 PM, Daniel Berlin <dberlin at dberlin.org> wrote:> Are you calling splitCriticalEdge? > If so, it will take care of updating dominators for you. > > > On Thu, May 14, 2015 at 11:55 AM, Shreyas Krishnan <shreyas76 at gmail.com> > wrote: > > Hi > > I run into an issue as part of splitting a critical edge during LICM. > > When a new basic block is created and needs to be added into the > dominator > > tree, the block is already in the dominator tree. I print the dominator > tree > > and I see it is added into the tree as child of node it is supposed to > > dominate. > > > > How do I debug to find out why/when its getting added into the tree. ? > > Tips/suggestions on how to debug to find out how the densemap involved is > > getting updated will be great. > > > > thanks > > Shrey > > > > _______________________________________________ > > LLVM Developers mailing list > > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150514/4a420e55/attachment.html>
Philip Reames
2015-May-14 20:57 UTC
[LLVMdev] getnode(BB) = 0; block already in dominator tree
Er, LICM currently does not modify the CFG at all. Are you proposing to change that? And if so, why? What's the motivating case? Philip On 05/14/2015 11:55 AM, Shreyas Krishnan wrote:> Hi > I run into an issue as part of splitting a critical edge during > LICM. When a new basic block is created and needs to be added into > the dominator tree, the block is already in the dominator tree. I > print the dominator tree and I see it is added into the tree as child > of node it is supposed to dominate. > > How do I debug to find out why/when its getting added into the tree. ? > Tips/suggestions on how to debug to find out how the densemap involved > is getting updated will be great. > > thanks > Shrey > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150514/a631f765/attachment.html>
Sumesh Udayakumaran
2015-May-14 21:13 UTC
[LLVMdev] getnode(BB) = 0; block already in dominator tree
Oh...its machine LICM ...in the following lines... CurPreheader = Pred->SplitCriticalEdge(CurLoop->getHeader(), this); 01463 if (!CurPreheader) { 01464 CurPreheader = reinterpret_cast<MachineBasicBlock *>(-1); 01465 return nullptr; 01466 } On Thu, May 14, 2015 at 1:57 PM, Philip Reames <listmail at philipreames.com> wrote:> Er, LICM currently does not modify the CFG at all. Are you proposing to > change that? And if so, why? What's the motivating case? > > Philip > > > On 05/14/2015 11:55 AM, Shreyas Krishnan wrote: > > Hi > I run into an issue as part of splitting a critical edge during LICM. > When a new basic block is created and needs to be added into the dominator > tree, the block is already in the dominator tree. I print the dominator tree > and I see it is added into the tree as child of node it is supposed to > dominate. > > How do I debug to find out why/when its getting added into the tree. ? > Tips/suggestions on how to debug to find out how the densemap involved is > getting updated will be great. > > thanks > Shrey > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >