How to write a simple LLVM backend target?

38 views Asked by At

I have read this doc and first chapter of this example.

The doc and example are really good at helping me understanding backend of compiler and LLVM.

However, they still not answering the question of for adding a new target, what file (minimum) I need to modify and add, with the reasons of doing that.

In the example, it asked me to change bunch of llvm config files, while in the doc, it just ask me to add lib/Target/<name of target> and add config option -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=<name of target> or add target name into LLVM_ALL_TARGETS in llvm/CMakeLists.txt.

It actually makes me confused of how to add a new target simple and clear.

Thus I would like to ask if anyone knows, thanks!!!

0

There are 0 answers