mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-08 15:24:21 +00:00
[WebAssembly] Initial WebAssembly backend
This WebAssembly backend is just a skeleton at this time and is not yet functional. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241022 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
28
lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.cpp
Normal file
28
lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.cpp
Normal file
@ -0,0 +1,28 @@
|
||||
//===-- 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
|
||||
WebAssemblyTTIImpl::getPopcntSupport(unsigned TyWidth) {
|
||||
assert(isPowerOf2_32(TyWidth) && "Ty width must be power of 2");
|
||||
// TODO: Make Math.popcount32 happen in WebAssembly.
|
||||
return TTI::PSK_Software;
|
||||
}
|
Reference in New Issue
Block a user