What I am trying to do: I am writing a custom backend to generate code for a new target using LLVM. As I get started with the MyOwnTargFrameLowering class, I am trying to keep things as simple as possible.
My question: What (if there is a requirement outside of the constructor) are the essential methods from the llvm::TargetFrameLowering Class for any custom backend, the functions that have to be overwritten for the minimum amount of customization in an LLVM backend?
I understand that for each target there are functions that will have to be overwritten for that particular architecture, but it was my understanding that in every LLVM there are some functions that are always required. I gathered this idea from the fact that in certain LLVM classes there are functions that state in the description that they must be implemented.
This is the reference for the class each backend's frame lowering class inherits from llvm::TargetFrameLowering Class Reference
and there is a good-sized list of functions here, which for the most part I have read through. Like I said, I know that it comes down to your architecture, but jus to be able to quickly have things up and running initially, I am wondering what would be the bare minimum.
I have compared the other target backends built into LLVM already and it seems that the constructor (of course), emitPrologue, emitEpilogue, and StackSlotSize are pretty standard across the board, but this is speculation by example on my part. I understand it is possible noboy has ever intended to make something so basic, but I am sort of in a time crunch to start getting some actual code to output. ;)
Any and all tips or points in the right direction are appreciated. If this question is too vague, please let me know. Iäm sort of new to being the asker rather than finding the answer out there already.
Search for the keyword "pure virtual" in the Class Reference or take a look into the code and search for "= 0" after the function declaration. These are the functions which have to be at least implemented in a derived class.