llvm/llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp

//===-- WebAssemblyFastISel.cpp - WebAssembly FastISel implementation -----===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
///
/// \file
/// This file defines the WebAssembly-specific support for the FastISel
/// class. Some of the target-specific code is generated by tablegen in the file
/// WebAssemblyGenFastISel.inc, which is #included here.
///
/// TODO: kill flags
///
//===----------------------------------------------------------------------===//

#include "MCTargetDesc/WebAssemblyMCTargetDesc.h"
#include "Utils/WebAssemblyTypeUtilities.h"
#include "WebAssembly.h"
#include "WebAssemblyMachineFunctionInfo.h"
#include "WebAssemblySubtarget.h"
#include "WebAssemblyTargetMachine.h"
#include "WebAssemblyUtilities.h"
#include "llvm/Analysis/BranchProbabilityInfo.h"
#include "llvm/CodeGen/FastISel.h"
#include "llvm/CodeGen/FunctionLoweringInfo.h"
#include "llvm/CodeGen/MachineConstantPool.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/GetElementPtrTypeIterator.h"
#include "llvm/IR/GlobalAlias.h"
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Operator.h"
#include "llvm/IR/PatternMatch.h"

usingnamespacellvm;
usingnamespacePatternMatch;

#define DEBUG_TYPE

namespace {

class WebAssemblyFastISel final : public FastISel {};

} // end anonymous namespace

bool WebAssemblyFastISel::computeAddress(const Value *Obj, Address &Addr) {}

void WebAssemblyFastISel::materializeLoadStoreOperands(Address &Addr) {}

void WebAssemblyFastISel::addLoadStoreOperands(const Address &Addr,
                                               const MachineInstrBuilder &MIB,
                                               MachineMemOperand *MMO) {}

unsigned WebAssemblyFastISel::maskI1Value(unsigned Reg, const Value *V) {}

unsigned WebAssemblyFastISel::getRegForI1Value(const Value *V,
                                               const BasicBlock *BB,
                                               bool &Not) {}

unsigned WebAssemblyFastISel::zeroExtendToI32(unsigned Reg, const Value *V,
                                              MVT::SimpleValueType From) {}

unsigned WebAssemblyFastISel::signExtendToI32(unsigned Reg, const Value *V,
                                              MVT::SimpleValueType From) {}

unsigned WebAssemblyFastISel::zeroExtend(unsigned Reg, const Value *V,
                                         MVT::SimpleValueType From,
                                         MVT::SimpleValueType To) {}

unsigned WebAssemblyFastISel::signExtend(unsigned Reg, const Value *V,
                                         MVT::SimpleValueType From,
                                         MVT::SimpleValueType To) {}

unsigned WebAssemblyFastISel::getRegForUnsignedValue(const Value *V) {}

unsigned WebAssemblyFastISel::getRegForSignedValue(const Value *V) {}

unsigned WebAssemblyFastISel::getRegForPromotedValue(const Value *V,
                                                     bool IsSigned) {}

unsigned WebAssemblyFastISel::notValue(unsigned Reg) {}

unsigned WebAssemblyFastISel::copyValue(unsigned Reg) {}

unsigned WebAssemblyFastISel::fastMaterializeAlloca(const AllocaInst *AI) {}

unsigned WebAssemblyFastISel::fastMaterializeConstant(const Constant *C) {}

bool WebAssemblyFastISel::fastLowerArguments() {}

bool WebAssemblyFastISel::selectCall(const Instruction *I) {}

bool WebAssemblyFastISel::selectSelect(const Instruction *I) {}

bool WebAssemblyFastISel::selectTrunc(const Instruction *I) {}

bool WebAssemblyFastISel::selectZExt(const Instruction *I) {}

bool WebAssemblyFastISel::selectSExt(const Instruction *I) {}

bool WebAssemblyFastISel::selectICmp(const Instruction *I) {}

bool WebAssemblyFastISel::selectFCmp(const Instruction *I) {}

bool WebAssemblyFastISel::selectBitCast(const Instruction *I) {}

bool WebAssemblyFastISel::selectLoad(const Instruction *I) {}

bool WebAssemblyFastISel::selectStore(const Instruction *I) {}

bool WebAssemblyFastISel::selectBr(const Instruction *I) {}

bool WebAssemblyFastISel::selectRet(const Instruction *I) {}

bool WebAssemblyFastISel::selectUnreachable(const Instruction *I) {}

bool WebAssemblyFastISel::fastSelectInstruction(const Instruction *I) {}

FastISel *WebAssembly::createFastISel(FunctionLoweringInfo &FuncInfo,
                                      const TargetLibraryInfo *LibInfo) {}