[LLVMdev] InstructionSelectBasicBlock question

Vladimir Prus ghost at cs.msu.su
Wed Mar 1 08:09:22 PST 2006


Hi,

I have two questions about the above method of the SelectionDAGISel class.

1. The overrides in PPCDAGToDAGISel and in I64DAGToDAGISel are identical
(except for  PPCISD::FIRST_NUMBER vs. IA64ISD::FIRST_NUMBER).
Maybe, this means that it would be better if SelectionDAGISel had default
implementation? That would remove this code duplication.

If desired, SelectionDAGISel can have both implementation and be pure, so
that derived class authors are forced to think how they want this method to
behave, and still have the option to call the default implementation.

2. What are possible reasons for *not* using the default implementation? X86
has completely different code, why?

Thanks,
Volodya







More information about the llvm-dev mailing list