2015-06-30 07:51:55 +08:00
|
|
|
//===-- WebAssemblyTargetTransformInfo.cpp - WebAssembly-specific TTI -----===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
///
|
|
|
|
/// \file
|
|
|
|
/// \brief This file defines the WebAssembly-specific TargetTransformInfo
|
|
|
|
/// implementation.
|
|
|
|
///
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "WebAssemblyTargetTransformInfo.h"
|
|
|
|
#include "llvm/Support/Debug.h"
|
|
|
|
#include "llvm/Target/CostTable.h"
|
|
|
|
using namespace llvm;
|
|
|
|
|
|
|
|
#define DEBUG_TYPE "wasmtti"
|
|
|
|
|
|
|
|
TargetTransformInfo::PopcntSupportKind
|
2015-08-25 00:51:46 +08:00
|
|
|
WebAssemblyTTIImpl::getPopcntSupport(unsigned TyWidth) const {
|
2015-06-30 07:51:55 +08:00
|
|
|
assert(isPowerOf2_32(TyWidth) && "Ty width must be power of 2");
|
2015-08-25 00:51:46 +08:00
|
|
|
return TargetTransformInfo::PSK_FastHardware;
|
|
|
|
}
|