Guest User

Untitled

a guest
Jul 19th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. SelectionDAG LegalizeTypes Phase
  2. addRegisterClass: backend register class and supported type
  3.  
  4. SelectionDAG Legalize Phase
  5. SetOperatorAction, operator, related operand type, and the action.
  6.  
  7. getTypeLegalizationCost, proper type supported by the backend.
  8. getTypeAction,
  9.  
  10. isOperationExpand () etc. function, given an Op and operand type, what is the backend action for this?
  11. isOperationLegal ()
  12. isOperationCustom ()
  13. isOperationLegalOrCustom ()
  14.  
  15. if the type is define with register class, it is legal. isTypeLegal () return true;
  16. RegClassForVT[]
  17.  
  18. computeRegisterProperties ()
  19. RegisterTypeForVT[], NumRegistersForVT[] are initialized as itself and 1. Later will be updated, otherwise, stay the same.
  20. ValueTypeActions[] are initialized as TypeLegal. Later will be updated when necessary.
  21.  
  22. types defined in SimpleValueType in MachineValueType.h are simple types.
  23. Other types which are not in the list are considered as extended value types.
  24.  
  25. getTypeLegalizationCost () will return 1 and the type if the type action is TypeLegal.
  26. If the action is TypeSplitVector or TypeExpandInteger, the cost will be doubled.
  27. It will iterate until a legal type is found for the legalization.
  28.  
  29. getTypeLegalizationCost will return the cost of legalization and the legalized type.
  30. 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