[LLVMdev] On the transitivity of subregisterness

Jakob Stoklund Olesen stoklund at 2pi.dk
Wed Apr 21 11:19:12 PDT 2010


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





More information about the llvm-dev mailing list