Dale Johannesen
2010-Sep-03 00:05 UTC
[LLVMdev] [LLVMDev] [Modeling] About the structure of my allocator
It is at the end allowing for oddities like debug info and multiple branches. You might want to look at AnalyzeBranch. On Sep 2, 2010, at 4:19 PMPDT, Jeff Kunkel wrote:> Is there any way to tell where in the Instruction list, the branch > to the other MachineBasicBlock happens? I know in the BasicBlock had > a nice api for it. > > Thanks, > Jeff Kunkel > > On Thu, Sep 2, 2010 at 5:56 PM, Dale Johannesen <dalej at apple.com> > wrote: > > On Sep 2, 2010, at 2:44 PMPDT, Jeff Kunkel wrote: > I need to track which MachineBasicBlocks branch into other > MachineBasicBlocks. How do I do it? > > Look at the Predecessor/Successor lists, which are target-independent > > > I see a MachineOperand can hold a MachineBasicBlock*. Does this mean > the instruction may branch to the MachineBasicBlock, or can it be > something like an object reference? > > It can also be the dreaded gcc "address of label" extension. Number > and ordering of instruction operands is target-dependent. > > > > _______________________________________________ > 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/20100902/5b22972a/attachment.html>
Jeff Kunkel
2010-Sep-03 10:20 UTC
[LLVMdev] [LLVMDev] [Modeling] About the structure of my allocator
Perhaps what I think is a problem really is not a problem. So when a jump occurs from one block A to block B, then the registers are certain state, and register allocation happens with the initial state defined by A->B. When a third block C jumps to block B, the state of the registers are different. Thus register allocation needs to account for the jump from C->B, by a few ways: 1. The allocator defines A->B as the conformity state. Thus when C->B, C must conform to the state of the register from A. 2. A branch may occur where B' = B in respect to the instructions, but register allocation from C->B' will be different because of differing initial states. The information I need is where the jumps occurs in the instructions vector. Thanks, Jeff Kunkel On Thu, Sep 2, 2010 at 8:05 PM, Dale Johannesen <dalej at apple.com> wrote:> It is at the end allowing for oddities like debug info and multiple > branches. You might want to look at AnalyzeBranch. > > On Sep 2, 2010, at 4:19 PMPDT, Jeff Kunkel wrote: > > Is there any way to tell where in the Instruction list, the branch to the > other MachineBasicBlock happens? I know in the BasicBlock had a nice api for > it. > > Thanks, > Jeff Kunkel > > On Thu, Sep 2, 2010 at 5:56 PM, Dale Johannesen <dalej at apple.com> wrote: > >> >> On Sep 2, 2010, at 2:44 PMPDT, Jeff Kunkel wrote: >> >>> I need to track which MachineBasicBlocks branch into other >>> MachineBasicBlocks. How do I do it? >>> >> >> Look at the Predecessor/Successor lists, which are target-independent >> >> >> I see a MachineOperand can hold a MachineBasicBlock*. Does this mean the >>> instruction may branch to the MachineBasicBlock, or can it be something like >>> an object reference? >>> >> >> It can also be the dreaded gcc "address of label" extension. Number and >> ordering of instruction operands is target-dependent. >> >> >> > _______________________________________________ > 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/20100903/63825cc1/attachment.html>
Jakob Stoklund Olesen
2010-Sep-03 20:19 UTC
[LLVMdev] [LLVMDev] [Modeling] About the structure of my allocator
On Sep 3, 2010, at 3:20 AM, Jeff Kunkel wrote:> Perhaps what I think is a problem really is not a problem.Yep.> The information I need is where the jumps occurs in the instructions vector.The machine instructions are already separated into basic blocks. http://en.wikipedia.org/wiki/Basic_block /jakob
Possibly Parallel Threads
- [LLVMdev] [LLVMDev] [Modeling] About the structure of my allocator
- [LLVMdev] [LLVMDev] [Modeling] About the structure of my allocator
- [LLVMdev] [LLVMDev] The Basic Register allocator
- [LLVMdev] [LLVMDev] The Basic Register allocator
- [LLVMdev] [LLVMDev] Live Intervals and Finding the next usage