[LLVMdev] On the transitivity of subregisterness

Jim Grosbach grosbach at apple.com
Wed Apr 21 11:28:50 PDT 2010

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.


More information about the llvm-dev mailing list