diff options
author | Dan Gohman <dan433584@gmail.com> | 2017-02-27 22:38:58 +0000 |
---|---|---|
committer | Dan Gohman <dan433584@gmail.com> | 2017-02-27 22:38:58 +0000 |
commit | f52ee17a09eabe216562ef57115d8976b9d7f70e (patch) | |
tree | 46b42ff063a865164f78674660bf3b253d66f065 /llvm/lib/Target/WebAssembly/WebAssemblyUtilities.h | |
parent | 2d5841fa7334ac972fc89c12e60e17edf0612b1a (diff) | |
download | llvm-f52ee17a09eabe216562ef57115d8976b9d7f70e.zip llvm-f52ee17a09eabe216562ef57115d8976b9d7f70e.tar.gz llvm-f52ee17a09eabe216562ef57115d8976b9d7f70e.tar.bz2 |
[WebAssembly] Split CFG-sorting into its own pass. NFC.
CFG sorting was already an independent algorithm from block/loop insertion;
this change makes it more convenient to debug.
llvm-svn: 296399
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyUtilities.h')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyUtilities.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyUtilities.h b/llvm/lib/Target/WebAssembly/WebAssemblyUtilities.h index cccc961..595491f 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyUtilities.h +++ b/llvm/lib/Target/WebAssembly/WebAssemblyUtilities.h @@ -18,7 +18,9 @@ namespace llvm { +class MachineBasicBlock; class MachineInstr; +class MachineLoop; class WebAssemblyFunctionInfo; namespace WebAssembly { @@ -30,6 +32,12 @@ bool isChild(const MachineInstr &MI, const WebAssemblyFunctionInfo &MFI); bool isCallIndirect(const MachineInstr &MI); } // end namespace WebAssembly + +/// Return the "bottom" block of a loop. This differs from +/// MachineLoop::getBottomBlock in that it works even if the loop is +/// discontiguous. +MachineBasicBlock *LoopBottom(const MachineLoop *Loop); + } // end namespace llvm #endif |