Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SelectionDAG LegalizeTypes Phase
- addRegisterClass: backend register class and supported type
- SelectionDAG Legalize Phase
- SetOperatorAction, operator, related operand type, and the action.
- getTypeLegalizationCost, proper type supported by the backend.
- getTypeAction,
- isOperationExpand () etc. function, given an Op and operand type, what is the backend action for this?
- isOperationLegal ()
- isOperationCustom ()
- isOperationLegalOrCustom ()
- if the type is define with register class, it is legal. isTypeLegal () return true;
- RegClassForVT[]
- computeRegisterProperties ()
- RegisterTypeForVT[], NumRegistersForVT[] are initialized as itself and 1. Later will be updated, otherwise, stay the same.
- ValueTypeActions[] are initialized as TypeLegal. Later will be updated when necessary.
- types defined in SimpleValueType in MachineValueType.h are simple types.
- Other types which are not in the list are considered as extended value types.
- getTypeLegalizationCost () will return 1 and the type if the type action is TypeLegal.
- If the action is TypeSplitVector or TypeExpandInteger, the cost will be doubled.
- It will iterate until a legal type is found for the legalization.
- getTypeLegalizationCost will return the cost of legalization and the legalized type.
- Then you can calculate full cost by multiply with legalization cost and the cost for handling the legal type.
Add Comment
Please, Sign In to add comment