LLVM  9.0.0svn
WebAssemblyInstrInfo.h
Go to the documentation of this file.
1 //=- WebAssemblyInstrInfo.h - WebAssembly Instruction Information -*- C++ -*-=//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 ///
9 /// \file
10 /// This file contains the WebAssembly implementation of the
11 /// TargetInstrInfo class.
12 ///
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYINSTRINFO_H
16 #define LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYINSTRINFO_H
17 
20 
21 #define GET_INSTRINFO_HEADER
22 #include "WebAssemblyGenInstrInfo.inc"
23 
24 namespace llvm {
25 
26 class WebAssemblySubtarget;
27 
29  const WebAssemblyRegisterInfo RI;
30 
31 public:
32  explicit WebAssemblyInstrInfo(const WebAssemblySubtarget &STI);
33 
34  const WebAssemblyRegisterInfo &getRegisterInfo() const { return RI; }
35 
37  AliasAnalysis *AA) const override;
38 
40  const DebugLoc &DL, unsigned DestReg, unsigned SrcReg,
41  bool KillSrc) const override;
43  unsigned OpIdx1,
44  unsigned OpIdx2) const override;
45 
47  MachineBasicBlock *&FBB,
49  bool AllowModify = false) const override;
50  unsigned removeBranch(MachineBasicBlock &MBB,
51  int *BytesRemoved = nullptr) const override;
54  const DebugLoc &DL,
55  int *BytesAdded = nullptr) const override;
56  bool
58 };
59 
60 } // end namespace llvm
61 
62 #endif
This class represents lattice values for constants.
Definition: AllocatorList.h:23
bool isReallyTriviallyReMaterializable(const MachineInstr &MI, AliasAnalysis *AA) const override
const WebAssemblyRegisterInfo & getRegisterInfo() const
unsigned removeBranch(MachineBasicBlock &MBB, int *BytesRemoved=nullptr) const override
A debug info location.
Definition: DebugLoc.h:33
MachineInstr * commuteInstructionImpl(MachineInstr &MI, bool NewMI, unsigned OpIdx1, unsigned OpIdx2) const override
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Definition: APFloat.h:41
bool reverseBranchCondition(SmallVectorImpl< MachineOperand > &Cond) const override
void copyPhysReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const DebugLoc &DL, unsigned DestReg, unsigned SrcReg, bool KillSrc) const override
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
Definition: APInt.h:32
bool analyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB, MachineBasicBlock *&FBB, SmallVectorImpl< MachineOperand > &Cond, bool AllowModify=false) const override
This file contains the WebAssembly implementation of the WebAssemblyRegisterInfo class.
unsigned insertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, ArrayRef< MachineOperand > Cond, const DebugLoc &DL, int *BytesAdded=nullptr) const override
Representation of each machine instruction.
Definition: MachineInstr.h:63
WebAssemblyInstrInfo(const WebAssemblySubtarget &STI)
IRTranslator LLVM IR MI