Jakob Stoklund Olesen
2010-Apr-21 18:19 UTC
[LLVMdev] On the transitivity of subregisterness
Woud it be reasonable to assert that TargetRegisterInfo::isSubRegister() is a transitive relation? In other words, if A is a subregister of B and B is a subregister of C then A is a subregister of C. With this assumption, we could teach TableGen to sort registers topologically such that all the subregisters of R are numbered R+1, R+2, ... This produces better locality of reference and allows other optimizations in the backend code that deals in subregisters a lot. /jakob
On Apr 21, 2010, at 11:19 AM, Jakob Stoklund Olesen wrote:> Woud it be reasonable to assert that TargetRegisterInfo::isSubRegister() is a transitive relation? > > In other words, if A is a subregister of B and B is a subregister of C then A is a subregister of C. >This certainly makes sense to me. I suspect any backends that are doing things that violate that are playing tricks with subregisters that would be (better?) solvable another way.> With this assumption, we could teach TableGen to sort registers topologically such that all the subregisters of R are numbered R+1, R+2, ... This produces better locality of reference and allows other optimizations in the backend code that deals in subregisters a lot.This sounds very useful. -J
On Apr 21, 2010, at 11:19 AM, Jakob Stoklund Olesen wrote:> Woud it be reasonable to assert that TargetRegisterInfo::isSubRegister() is a transitive relation?Yes. Evan> > In other words, if A is a subregister of B and B is a subregister of C then A is a subregister of C. > > With this assumption, we could teach TableGen to sort registers topologically such that all the subregisters of R are numbered R+1, R+2, ... This produces better locality of reference and allows other optimizations in the backend code that deals in subregisters a lot. > > /jakob > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reasonably Related Threads
- Addressing TableGen's error "Ran out of lanemask bits" in order to use more than 32 subregisters per register
- Addressing TableGen's error "Ran out of lanemask bits" in order to use more than 32 subregisters per register
- Addressing TableGen's error "Ran out of lanemask bits" in order to use more than 32 subregisters per register
- [LLVMdev] MachineOperand SubReg
- RFC: Implement variable-sized register classes