LLVM  6.0.0svn
WebAssemblyUtilities.h
Go to the documentation of this file.
1 //===-- WebAssemblyUtilities - WebAssembly Utility Functions ---*- 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 /// \brief This file contains the declaration of the WebAssembly-specific
12 /// utility functions.
13 ///
14 //===----------------------------------------------------------------------===//
15 
16 #ifndef LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYUTILITIES_H
17 #define LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYUTILITIES_H
18 
19 namespace llvm {
20 
21 class MachineBasicBlock;
22 class MachineInstr;
23 class MachineLoop;
24 class WebAssemblyFunctionInfo;
25 
26 namespace WebAssembly {
27 
28 bool isArgument(const MachineInstr &MI);
29 bool isCopy(const MachineInstr &MI);
30 bool isTee(const MachineInstr &MI);
31 bool isChild(const MachineInstr &MI, const WebAssemblyFunctionInfo &MFI);
32 bool isCallIndirect(const MachineInstr &MI);
33 
34 } // end namespace WebAssembly
35 
36 /// Return the "bottom" block of a loop. This differs from
37 /// MachineLoop::getBottomBlock in that it works even if the loop is
38 /// discontiguous.
39 MachineBasicBlock *LoopBottom(const MachineLoop *Loop);
40 
41 } // end namespace llvm
42 
43 #endif
MachineBasicBlock * LoopBottom(const MachineLoop *Loop)
Return the "bottom" block of a loop.
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
bool isCopy(const MachineInstr &MI)
bool isTee(const MachineInstr &MI)
bool isArgument(const MachineInstr &MI)
IRTranslator LLVM IR MI
bool isCallIndirect(const MachineInstr &MI)
bool isChild(const MachineInstr &MI, const WebAssemblyFunctionInfo &MFI)
Test whether MI is a child of some other node in an expression tree.