[LLVMdev] about switch and select instructions in SparcV9
sabre at nondot.org
Mon Oct 17 09:02:33 PDT 2005
On Mon, 17 Oct 2005 shding at mtu.edu wrote:
> In the file of SparcV9BurgISel.cpp, you said you didn't implement the
> "Switch" instruction and I also can't find how the "Select" instruction
> is implemented. So do you do some work to handle these two kind of
> instructions in other parts? Where can I find it? Thank you!
The SparcV9 backend does not handle these natively, instead lowering them
to branches. In particular, the SparcV9TargetMachine.cpp file includes
// FIXME: implement the switch instruction in the instruction selector.
However, you probably shouldn't be following the example of the SparcV9
backend. Instead, I would suggest following the example of one of the
targets that uses the target-independent code generator (e.g. the PowerPC
In particular, I just happened to update some documentation about this
More information about the llvm-dev