110e730a2SDan Gohman //===-- WebAssemblyTargetTransformInfo.cpp - WebAssembly-specific TTI -----===//
210e730a2SDan Gohman //
310e730a2SDan Gohman //                     The LLVM Compiler Infrastructure
410e730a2SDan Gohman //
510e730a2SDan Gohman // This file is distributed under the University of Illinois Open Source
610e730a2SDan Gohman // License. See LICENSE.TXT for details.
710e730a2SDan Gohman //
810e730a2SDan Gohman //===----------------------------------------------------------------------===//
910e730a2SDan Gohman ///
1010e730a2SDan Gohman /// \file
1110e730a2SDan Gohman /// \brief This file defines the WebAssembly-specific TargetTransformInfo
1210e730a2SDan Gohman /// implementation.
1310e730a2SDan Gohman ///
1410e730a2SDan Gohman //===----------------------------------------------------------------------===//
1510e730a2SDan Gohman 
1610e730a2SDan Gohman #include "WebAssemblyTargetTransformInfo.h"
1710e730a2SDan Gohman #include "llvm/Support/Debug.h"
1810e730a2SDan Gohman #include "llvm/Target/CostTable.h"
1910e730a2SDan Gohman using namespace llvm;
2010e730a2SDan Gohman 
2110e730a2SDan Gohman #define DEBUG_TYPE "wasmtti"
2210e730a2SDan Gohman 
2310e730a2SDan Gohman TargetTransformInfo::PopcntSupportKind
24*01612f62SDan Gohman WebAssemblyTTIImpl::getPopcntSupport(unsigned TyWidth) const {
2510e730a2SDan Gohman   assert(isPowerOf2_32(TyWidth) && "Ty width must be power of 2");
26*01612f62SDan Gohman   return TargetTransformInfo::PSK_FastHardware;
27*01612f62SDan Gohman }
28*01612f62SDan Gohman 
29*01612f62SDan Gohman bool
30*01612f62SDan Gohman WebAssemblyTTIImpl::haveFastSqrt(Type *Ty) const {
31*01612f62SDan Gohman   assert(Ty->isFPOrFPVectorTy() && "Ty must be floating point");
32*01612f62SDan Gohman   return true;
3310e730a2SDan Gohman }
34