[LLVMdev] Switching between sibling/cousin registers via API calls
Villmow, Micah
Micah.Villmow at amd.com
Tue Jul 17 15:24:21 PDT 2012
I have a register hierarchy that looks like a binary tree.
v4 -> {v2, v2} -> {s, s}{s, s}(or, {x, y}, {z, w})
I have an instruction that can access the 2nd and/or 4th scalar and an
instruction that can access the 1st and/or 3rd scalar. What I need to do
is that given the first scalar, I need to be able to select the 2nd scalar,
or/and given the 3rd, select the 4th. I define a sibling register as a register
that has the same parent and a cousin as a register that has the same grandparent.
So 'x' is a cousin of 'w' because of the grandparent class and 'x' is a sibling
of 'y' because of the parent class.
I know I can move to parent/children registers via super/sub classes,
but is there any way in LLVM currently to easily select a cousin/sibling registers that
I am not seeing?
Currently what I've found to work is I do register - base_scalar_1 + base_scalar_2,
but this doesn't seem like the best solution since this has an implicit
assumption on the ordering of the enumerated register values.
Any ideas?
Thanks,
Micah
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120717/bec9c90a/attachment.html>
More information about the llvm-dev
mailing list