2015-06-30 07:51:55 +08:00
|
|
|
//=- WebAssemblyInstrInfo.h - WebAssembly Instruction Information -*- C++ -*-=//
|
|
|
|
//
|
|
|
|
// 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 contains the WebAssembly implementation of the
|
|
|
|
/// TargetInstrInfo class.
|
|
|
|
///
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYINSTRINFO_H
|
|
|
|
#define LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYINSTRINFO_H
|
|
|
|
|
|
|
|
#include "WebAssemblyRegisterInfo.h"
|
|
|
|
#include "llvm/Target/TargetInstrInfo.h"
|
|
|
|
|
2015-07-23 05:28:15 +08:00
|
|
|
#define GET_INSTRINFO_HEADER
|
|
|
|
#include "WebAssemblyGenInstrInfo.inc"
|
|
|
|
|
2015-06-30 07:51:55 +08:00
|
|
|
namespace llvm {
|
|
|
|
|
|
|
|
class WebAssemblySubtarget;
|
|
|
|
|
2015-07-23 05:28:15 +08:00
|
|
|
class WebAssemblyInstrInfo final : public WebAssemblyGenInstrInfo {
|
2015-06-30 07:51:55 +08:00
|
|
|
const WebAssemblyRegisterInfo RI;
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit WebAssemblyInstrInfo(const WebAssemblySubtarget &STI);
|
|
|
|
|
|
|
|
const WebAssemblyRegisterInfo &getRegisterInfo() const { return RI; }
|
2015-09-09 08:52:47 +08:00
|
|
|
|
|
|
|
void copyPhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI,
|
|
|
|
DebugLoc DL, unsigned DestReg, unsigned SrcReg,
|
|
|
|
bool KillSrc) const override;
|
2015-09-17 00:51:30 +08:00
|
|
|
|
|
|
|
bool AnalyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB,
|
|
|
|
MachineBasicBlock *&FBB,
|
|
|
|
SmallVectorImpl<MachineOperand> &Cond,
|
|
|
|
bool AllowModify = false) const override;
|
|
|
|
unsigned RemoveBranch(MachineBasicBlock &MBB) const override;
|
|
|
|
unsigned InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB,
|
2015-11-30 06:32:02 +08:00
|
|
|
MachineBasicBlock *FBB, ArrayRef<MachineOperand> Cond,
|
2015-09-17 00:51:30 +08:00
|
|
|
DebugLoc DL) const override;
|
|
|
|
bool
|
|
|
|
ReverseBranchCondition(SmallVectorImpl<MachineOperand> &Cond) const override;
|
2015-06-30 07:51:55 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif
|