diff options
| author | Dan Gohman <dan433584@gmail.com> | 2016-10-24 19:49:43 +0000 |
|---|---|---|
| committer | Dan Gohman <dan433584@gmail.com> | 2016-10-24 19:49:43 +0000 |
| commit | 4fc4e42dea2547f40d3672ccf473fc2fbbdfc903 (patch) | |
| tree | ebcc8d0e10c97409e41a89e296db5aca2f0ce7fc /llvm/lib/Target/WebAssembly/WebAssemblyUtilities.h | |
| parent | c3e0ce8f8527d340c168d7361c1c59d8df544ecb (diff) | |
| download | bcm5719-llvm-4fc4e42dea2547f40d3672ccf473fc2fbbdfc903.tar.gz bcm5719-llvm-4fc4e42dea2547f40d3672ccf473fc2fbbdfc903.zip | |
[WebAssembly] Add an option to make get_local/set_local explicit.
This patch adds a pass, controlled by an option and off by default for
now, for making implicit get_local/set_local explicit. This simplifies
emitting wasm with MC.
Differential Revision: https://reviews.llvm.org/D25836
llvm-svn: 285009
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyUtilities.h')
| -rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyUtilities.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyUtilities.h b/llvm/lib/Target/WebAssembly/WebAssemblyUtilities.h new file mode 100644 index 00000000000..eb114403d14 --- /dev/null +++ b/llvm/lib/Target/WebAssembly/WebAssemblyUtilities.h @@ -0,0 +1,34 @@ +//===-- WebAssemblyUtilities - WebAssembly Utility Functions ---*- 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 declaration of the WebAssembly-specific +/// utility functions. +/// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYUTILITIES_H +#define LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYUTILITIES_H + +namespace llvm { + +class MachineInstr; +class WebAssemblyFunctionInfo; + +namespace WebAssembly { + +bool isArgument(const MachineInstr &MI); +bool isCopy(const MachineInstr &MI); +bool isTee(const MachineInstr &MI); +bool isChild(const MachineInstr &MI, const WebAssemblyFunctionInfo &MFI); + +} // end namespace WebAssembly +} // end namespace llvm + +#endif |

