-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
LLVM Code Generation
By :
Aside from the lowering of the formal arguments, the lowering of the ABI in FastISel is intermixed with the selection process itself and, as such, there are fewer target hooks that need to be implemented.
In practice, this means that you must handle the lowering of the ABI yourself when you do the selection of the LLVM IR call and ret instructions. You will see where this code lives in Chapter 17.
For formal arguments, you need to override the FastISel::fastLowerArguments method. This method returns true if you manage to handle the lowering of the formal arguments or false otherwise. When false is returned and the fallback mechanism is enabled, SDISel will switch to a selection process based purely on a SelectionDAG instance for the current basic block.
In the implementation of FastISel::fastLowerArguments (or any FastISel method), you are free to leverage the CCState class. However, usually, FastISel is only implemented for very specific...