[LLVMdev] ReplaceUses: curious

Dyson Wilkes dyson at akya.co.uk
Wed Sep 10 02:33:37 PDT 2008


Hi

I am looking at some of the existing targets to try to understand more 
about writing a backend. I was a little puzzled by the use of a method 
ReplaceUses in *ISelDAGToDAG.cpp (*=  most targets, e.g. ARM, X86..).   
I  found its definition in the *GenDAGISel.inc file that is 
autogenerated from the target description.  I can only assume TableGen 
emits this method definition for every traget.  Is this method 
implementation, in some way that I cannot see, specific to a given 
target?  I cannot see a reason for it not being a method of 
SelectionDAGISel and just implemented once?

Whilst the existing targets do offer a newcomer to LLWM a template to 
writing a new backend, can anyone point me to other sources of 
information to help me get up and running more quickly.  I have read the 
various LLVM documents but, for example, the Writing an LLVM Backend and 
TableGen documents are rather high level.  Am I going about this in the 
best way, i.e. trawling through the code and doxygen documents etc?  Am 
I missing something?

Thanks for any help you can give,

 - Dyson



More information about the llvm-dev mailing list