> It does, but you can dynamically reserve registers.So, if I'm understanding this correctly, the approach would then be to use a large upper bound on the number of registers (the instruction encoding limits it to 256, so that is safe), and then say "don't use registers [N,256)" in order to effectively codegen for registers [0,N)? Also, could you provide me some pointers to the APIs that allow dynamically reserving registers? Thanks, --Sean Silva On Sun, Aug 19, 2012 at 9:58 AM, Jakob Stoklund Olesen <stoklund at 2pi.dk> wrote:> > On Aug 18, 2012, at 8:51 PM, Sean Silva <silvas at purdue.edu> wrote: > >> Hi, I'm pondering using LLVM's backend pipeline to generate code for a >> virtual machine (the DTrace DIF emulator) where the number of >> registers must in general be queried dynamically*. Is this a >> functionality that LLVM's backend pipeline currently supports? Does >> LLVM's current backend pipeline assume a statically known register >> set? > > It does, but you can dynamically reserve registers. > > /jakob >
On Aug 19, 2012, at 10:09 AM, Sean Silva <silvas at purdue.edu> wrote:>> It does, but you can dynamically reserve registers. > > So, if I'm understanding this correctly, the approach would then be to > use a large upper bound on the number of registers (the instruction > encoding limits it to 256, so that is safe), and then say "don't use > registers [N,256)" in order to effectively codegen for registers > [0,N)?Right.> Also, could you provide me some pointers to the APIs that allow > dynamically reserving registers?TRI::getReservedRegs.
Thanks Jakob. --Sean Silva On Sun, Aug 19, 2012 at 11:21 AM, Jakob Stoklund Olesen <stoklund at 2pi.dk> wrote:> On Aug 19, 2012, at 10:09 AM, Sean Silva <silvas at purdue.edu> wrote: > >>> It does, but you can dynamically reserve registers. >> >> So, if I'm understanding this correctly, the approach would then be to >> use a large upper bound on the number of registers (the instruction >> encoding limits it to 256, so that is safe), and then say "don't use >> registers [N,256)" in order to effectively codegen for registers >> [0,N)? > > Right. > >> Also, could you provide me some pointers to the APIs that allow >> dynamically reserving registers? > > TRI::getReservedRegs. >
Possibly Parallel Threads
- [LLVMdev] Dynamic number of registers
- [LLVMdev] Dynamic number of registers
- [LLVMdev] Conceptual difference between "Unallocatable" and "Reserved" registers.
- [LLVMdev] Conceptual difference between "Unallocatable" and "Reserved" registers.
- [LLVMdev] Dynamic number of registers