summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/WebAssembly/WebAssemblyCFGSort.cpp
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2018-06-19 00:32:03 +0000
committerHeejin Ahn <aheejin@gmail.com>2018-06-19 00:32:03 +0000
commit817811caae9175e088243450ce3b6e006ff337fe (patch)
treea14914d5ee05bacf574179695124b49fac1b0584 /llvm/lib/Target/WebAssembly/WebAssemblyCFGSort.cpp
parent33c3fce592cda760250f65fe5713fe3b01935f59 (diff)
downloadbcm5719-llvm-817811caae9175e088243450ce3b6e006ff337fe.tar.gz
bcm5719-llvm-817811caae9175e088243450ce3b6e006ff337fe.zip
[WebAssembly] Add more utility functions
Summary: Added more utility functions that will be used in EH-related passes Also changed `LoopBottom` function to `getBottom` and uses templates to be able to handle other classes as well, which will be used in CFGSort later. Reviewers: dschuff Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D48262 llvm-svn: 335006
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyCFGSort.cpp')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyCFGSort.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyCFGSort.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyCFGSort.cpp
index bb1b8254984..267a51433cd 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyCFGSort.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyCFGSort.cpp
@@ -253,7 +253,7 @@ static void SortBlocks(MachineFunction &MF, const MachineLoopInfo &MLI,
assert(OnStack.count(MLI.getLoopFor(&MBB)) &&
"Blocks must be nested in their loops");
}
- while (OnStack.size() > 1 && &MBB == LoopBottom(OnStack.back()))
+ while (OnStack.size() > 1 && &MBB == WebAssembly::getBottom(OnStack.back()))
OnStack.pop_back();
}
assert(OnStack.pop_back_val() == nullptr &&
OpenPOWER on IntegriCloud