DxilTargetLowering.cpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. //===-- DxilTargetLowering.cpp - Implement the DxilTargetLowering class ---===//
  2. //
  3. // The LLVM Compiler Infrastructure
  4. //
  5. // This file is distributed under the University of Illinois Open Source
  6. // License. See LICENSE.TXT for details.
  7. //
  8. //===----------------------------------------------------------------------===//
  9. //
  10. // Empty implementation of TargetLoweringBase::InstructionOpcodeToISD and
  11. // TargetLoweringBase::getTypeLegalizationCost to make TargetTransformInfo
  12. // compile.
  13. //
  14. //===----------------------------------------------------------------------===//
  15. #include "llvm/Target/TargetLowering.h"
  16. using namespace llvm;
  17. //===----------------------------------------------------------------------===//
  18. // TargetTransformInfo Helpers
  19. //===----------------------------------------------------------------------===//
  20. int TargetLoweringBase::InstructionOpcodeToISD(unsigned Opcode) const {
  21. return 0;
  22. }
  23. std::pair<unsigned, MVT>
  24. TargetLoweringBase::getTypeLegalizationCost(const DataLayout &DL,
  25. Type *Ty) const {
  26. EVT MTy = getValueType(DL, Ty);
  27. unsigned Cost = 1;
  28. return std::make_pair(Cost, MTy.getSimpleVT());
  29. }