1*10e730a2SDan Gohman //===-- WebAssemblyTargetTransformInfo.cpp - WebAssembly-specific TTI -----===//
2*10e730a2SDan Gohman //
3*10e730a2SDan Gohman //                     The LLVM Compiler Infrastructure
4*10e730a2SDan Gohman //
5*10e730a2SDan Gohman // This file is distributed under the University of Illinois Open Source
6*10e730a2SDan Gohman // License. See LICENSE.TXT for details.
7*10e730a2SDan Gohman //
8*10e730a2SDan Gohman //===----------------------------------------------------------------------===//
9*10e730a2SDan Gohman ///
10*10e730a2SDan Gohman /// \file
11*10e730a2SDan Gohman /// \brief This file defines the WebAssembly-specific TargetTransformInfo
12*10e730a2SDan Gohman /// implementation.
13*10e730a2SDan Gohman ///
14*10e730a2SDan Gohman //===----------------------------------------------------------------------===//
15*10e730a2SDan Gohman 
16*10e730a2SDan Gohman #include "WebAssemblyTargetTransformInfo.h"
17*10e730a2SDan Gohman #include "llvm/Support/Debug.h"
18*10e730a2SDan Gohman #include "llvm/Target/CostTable.h"
19*10e730a2SDan Gohman using namespace llvm;
20*10e730a2SDan Gohman 
21*10e730a2SDan Gohman #define DEBUG_TYPE "wasmtti"
22*10e730a2SDan Gohman 
23*10e730a2SDan Gohman TargetTransformInfo::PopcntSupportKind
24*10e730a2SDan Gohman WebAssemblyTTIImpl::getPopcntSupport(unsigned TyWidth) {
25*10e730a2SDan Gohman   assert(isPowerOf2_32(TyWidth) && "Ty width must be power of 2");
26*10e730a2SDan Gohman   // TODO: Make Math.popcount32 happen in WebAssembly.
27*10e730a2SDan Gohman   return TTI::PSK_Software;
28*10e730a2SDan Gohman }
29