I am implementing a new back-end for LLVM starting with the target CBackend. The ultimate goal is to use "llc" to generate the source transformations of the C input code. However, there are a number of optimizations that I would like to do that do not seem to be very well supported in this context. The LLVM object code is very low, and I have to check it to rediscover what really happens. This would be much easier to do at the AST level. However, it seems that the AST level is an internal Clang construct, and there is no easy way to connect to it.
Do I need to check the LLVM object code and independently reconstruct a higher level stream? (Do I have to do this every back-end? It seems wasteful!)
source share