Andrew Clinton
2011-Jan-07 19:08 UTC
[LLVMdev] Increasing TargetRegisterInfo::FirstVirtualRegister?
On 01/07/2011 02:07 AM, Chris Lattner wrote:> > Unless your goal is to merge this work onto LLVM mainline, the best thing to do is a local hack in your tree. > > -ChrisYes, I will create a patch for my tree to increase FirstVirtualRegister. Would this be a good change to include in 2.9?
Dale Johannesen
2011-Jan-07 19:25 UTC
[LLVMdev] Increasing TargetRegisterInfo::FirstVirtualRegister?
We might want to make physical registers negative and virtuals positive, or vice versa. Then FirstVirtualRegister is 0 or 1, and we could get rid of those annoying subtractions of FirstVirtualRegister all over the virtual-register-handling passes. Since 0 is used all over the place as "invalid register" it is probably best to leave this alone, let FirstVirtualRegister be 1, and simply ignore (i.e. treat as erroneous) the 0th element of anything keyed off FirstVirtualRegister. On Jan 7, 2011, at 11:08 AMPST, Andrew Clinton wrote:> On 01/07/2011 02:07 AM, Chris Lattner wrote: >> >> Unless your goal is to merge this work onto LLVM mainline, the best thing to do is a local hack in your tree. >> >> -Chris > > Yes, I will create a patch for my tree to increase > FirstVirtualRegister. Would this be a good change to include in 2.9? > _______________________________________________ > 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/20110107/d9f7bc34/attachment.html>
Chris Lattner
2011-Jan-07 19:59 UTC
[LLVMdev] Increasing TargetRegisterInfo::FirstVirtualRegister?
On Jan 7, 2011, at 11:08 AM, Andrew Clinton wrote:> On 01/07/2011 02:07 AM, Chris Lattner wrote: >> >> Unless your goal is to merge this work onto LLVM mainline, the best thing to do is a local hack in your tree. >> >> -Chris > > Yes, I will create a patch for my tree to increase > FirstVirtualRegister. Would this be a good change to include in 2.9?I think it makes the most sense to discuss that when you're interested in merging the dependent work onto mainline. Dales's idea of using positive/negative numbers makes sense to me. -Chris
Jakob Stoklund Olesen
2011-Jan-09 23:15 UTC
[LLVMdev] Increasing TargetRegisterInfo::FirstVirtualRegister?
On Jan 7, 2011, at 11:25 AM, Dale Johannesen wrote:> We might want to make physical registers negative and virtuals positive, or vice versa. Then FirstVirtualRegister is 0 or 1, and we could get rid of those annoying subtractions of FirstVirtualRegister all over the virtual-register-handling passes. Since 0 is used all over the place as "invalid register" it is probably best to leave this alone, let FirstVirtualRegister be 1, and simply ignore (i.e. treat as erroneous) the 0th element of anything keyed off FirstVirtualRegister.Fixed in r123137. I decided to move the virtual register numbers because there is so much code already using physical register numbers as direct indices. My first attempt was to let the virtuals run from -1 downwards, but it turns out that we have code in isel depending on createVirtualRegister() returning increasing numbers. DenseMap<unsigned> also complained because it uses -1u and -2u as sentinels. So I moved the virtual register range to 2^31 growing upwards. The range from 2^30 to 2^31 is reserved for representing stack slots. Physical registers get 1 .. 2^30-1. /jakob -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 1929 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110109/14fb5266/attachment.bin>
Possibly Parallel Threads
- [LLVMdev] Increasing TargetRegisterInfo::FirstVirtualRegister?
- [LLVMdev] Increasing TargetRegisterInfo::FirstVirtualRegister?
- [LLVMdev] Increasing TargetRegisterInfo::FirstVirtualRegister?
- [LLVMdev] Increasing TargetRegisterInfo::FirstVirtualRegister?
- [LLVMdev] Increasing TargetRegisterInfo::FirstVirtualRegister?