DxilTargetTransformInfo.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //===-- DxilTargetTransformInfo.h - DXIL specific TTI -------*- C++ -*-===//
  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. /// \file
  10. /// This file declares a TargetTransformInfo analysis pass specific to the DXIL.
  11. /// Only implemented isSourceOfDivergence for DivergenceAnalysis.
  12. ///
  13. //===----------------------------------------------------------------------===//
  14. #pragma once
  15. #include "llvm/CodeGen/BasicTTIImpl.h"
  16. namespace hlsl {
  17. class DxilModule;
  18. class OP;
  19. }
  20. namespace llvm {
  21. class DxilTTIImpl final : public BasicTTIImplBase<DxilTTIImpl> {
  22. typedef BasicTTIImplBase<DxilTTIImpl> BaseT;
  23. typedef TargetTransformInfo TTI;
  24. friend BaseT;
  25. hlsl::OP *m_pHlslOP;
  26. bool m_isThreadGroup;
  27. const TargetSubtargetInfo *getST() const { return nullptr; }
  28. const TargetLowering *getTLI() const { return nullptr; }
  29. public:
  30. explicit DxilTTIImpl(const TargetMachine *TM, const Function &F,
  31. hlsl::DxilModule &DM, bool ThreadGroup);
  32. bool hasBranchDivergence() { return true; }
  33. bool isSourceOfDivergence(const Value *V) const;
  34. };
  35. } // end namespace llvm