blob: fa88ed526df2cbd77262096680dbf52f46758c86 [file] [log] [blame]
Dan Gohman10e730a2015-06-29 23:51:55 +00001//===-- WebAssemblyTargetTransformInfo.cpp - WebAssembly-specific TTI -----===//
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/// \file
11/// \brief This file defines the WebAssembly-specific TargetTransformInfo
12/// implementation.
13///
14//===----------------------------------------------------------------------===//
15
16#include "WebAssemblyTargetTransformInfo.h"
17#include "llvm/Support/Debug.h"
18#include "llvm/Target/CostTable.h"
19using namespace llvm;
20
21#define DEBUG_TYPE "wasmtti"
22
23TargetTransformInfo::PopcntSupportKind
24WebAssemblyTTIImpl::getPopcntSupport(unsigned TyWidth) {
25 assert(isPowerOf2_32(TyWidth) && "Ty width must be power of 2");
26 // TODO: Make Math.popcount32 happen in WebAssembly.
27 return TTI::PSK_Software;
28}