181ad6265SDimitry Andric //===- DirectXTargetTransformInfo.h - DirectX TTI ---------------*- C++ -*-===// 281ad6265SDimitry Andric // 381ad6265SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 481ad6265SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 581ad6265SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 681ad6265SDimitry Andric // 781ad6265SDimitry Andric //===----------------------------------------------------------------------===// 881ad6265SDimitry Andric /// 981ad6265SDimitry Andric //===----------------------------------------------------------------------===// 1081ad6265SDimitry Andric 1181ad6265SDimitry Andric #ifndef LLVM_DIRECTX_DIRECTXTARGETTRANSFORMINFO_H 1281ad6265SDimitry Andric #define LLVM_DIRECTX_DIRECTXTARGETTRANSFORMINFO_H 1381ad6265SDimitry Andric 1481ad6265SDimitry Andric #include "DirectXSubtarget.h" 1581ad6265SDimitry Andric #include "DirectXTargetMachine.h" 1681ad6265SDimitry Andric #include "llvm/CodeGen/BasicTTIImpl.h" 1781ad6265SDimitry Andric #include "llvm/IR/Function.h" 1881ad6265SDimitry Andric 1981ad6265SDimitry Andric namespace llvm { 2081ad6265SDimitry Andric class DirectXTTIImpl : public BasicTTIImplBase<DirectXTTIImpl> { 2181ad6265SDimitry Andric using BaseT = BasicTTIImplBase<DirectXTTIImpl>; 2281ad6265SDimitry Andric using TTI = TargetTransformInfo; 2381ad6265SDimitry Andric 2481ad6265SDimitry Andric friend BaseT; 2581ad6265SDimitry Andric 2681ad6265SDimitry Andric const DirectXSubtarget *ST; 2781ad6265SDimitry Andric const DirectXTargetLowering *TLI; 2881ad6265SDimitry Andric getST()2981ad6265SDimitry Andric const DirectXSubtarget *getST() const { return ST; } getTLI()3081ad6265SDimitry Andric const DirectXTargetLowering *getTLI() const { return TLI; } 3181ad6265SDimitry Andric 3281ad6265SDimitry Andric public: DirectXTTIImpl(const DirectXTargetMachine * TM,const Function & F)3381ad6265SDimitry Andric explicit DirectXTTIImpl(const DirectXTargetMachine *TM, const Function &F) 34*0fca6ea1SDimitry Andric : BaseT(TM, F.getDataLayout()), ST(TM->getSubtargetImpl(F)), 3581ad6265SDimitry Andric TLI(ST->getTargetLowering()) {} getMinVectorRegisterBitWidth()36bdd1243dSDimitry Andric unsigned getMinVectorRegisterBitWidth() const { return 32; } 3781ad6265SDimitry Andric }; 3881ad6265SDimitry Andric } // namespace llvm 3981ad6265SDimitry Andric 4081ad6265SDimitry Andric #endif // LLVM_DIRECTX_DIRECTXTARGETTRANSFORMINFO_H 41