LLVM  8.0.1
WebAssemblyInstrInfo.h
Go to the documentation of this file.
1 //=- WebAssemblyInstrInfo.h - WebAssembly Instruction Information -*- C++ -*-=//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 ///
10 /// \file
11 /// This file contains the WebAssembly implementation of the
12 /// TargetInstrInfo class.
13 ///
14 //===----------------------------------------------------------------------===//
15 
16 #ifndef LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYINSTRINFO_H
17 #define LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYINSTRINFO_H
18 
21 
22 #define GET_INSTRINFO_HEADER
23 #include "WebAssemblyGenInstrInfo.inc"
24 
25 namespace llvm {
26 
27 class WebAssemblySubtarget;
28 
30  const WebAssemblyRegisterInfo RI;
31 
32 public:
33  explicit WebAssemblyInstrInfo(const WebAssemblySubtarget &STI);
34 
35  const WebAssemblyRegisterInfo &getRegisterInfo() const { return RI; }
36 
38  AliasAnalysis *AA) const override;
39 
41  const DebugLoc &DL, unsigned DestReg, unsigned SrcReg,
42  bool KillSrc) const override;
44  unsigned OpIdx1,
45  unsigned OpIdx2) const override;
46 
48  MachineBasicBlock *&FBB,
50  bool AllowModify = false) const override;
51  unsigned removeBranch(MachineBasicBlock &MBB,
52  int *BytesRemoved = nullptr) const override;
55  const DebugLoc &DL,
56  int *BytesAdded = nullptr) const override;
57  bool
59 };
60 
61 } // end namespace llvm
62 
63 #endif
This class represents lattice values for constants.
Definition: AllocatorList.h:24
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:34
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:42
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:33
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:64
WebAssemblyInstrInfo(const WebAssemblySubtarget &STI)
IRTranslator LLVM IR MI