I am trying to add a new hardware target in LLVM backend. I am starting from scratch based on LLVM 10.0 and wondering what the best strategy would be for my own instruction selection, FastISel, SelectionDAG, or GlobalISel? What are the factors I should consider and which existing target is a good reference for each choice?
If I understand correctly, FastIsel and GlobalISel both may fail and fall back to SelectionDAGISel. Therefore, it sounds like I cannot avoid SelectionDAG. However, I read somewhere that GlobalISel will replace SelectionDAGISel eventually. This makes me confused. If time to product is important, would FastISel + some optimizaitons a reasonable choice?
Any suggestions would be highly appreciated.