[WebAssembly] Misc. refactoring in CFGStackify (NFC)
authorHeejin Ahn <aheejin@gmail.com>
Mon, 28 Dec 2020 13:23:48 +0000 (05:23 -0800)
committerHeejin Ahn <aheejin@gmail.com>
Tue, 12 Jan 2021 08:36:27 +0000 (00:36 -0800)
commit1cc5235712f2ed847f0b593714446d440e0596ba
treea33d9944048deff6eec266321d28905491b56d5f
parent93ad0edf674125f19177054d8331a5e8910d3d98
[WebAssembly] Misc. refactoring in CFGStackify (NFC)

Updating `ScopeTops` is something we frequently do in CFGStackify, so
this factors it out as a function. This also makes a few utility
functions templated so that they are not dependent on input vector
types and simplifies function parameters.

Reviewed By: tlively

Differential Revision: https://reviews.llvm.org/D94046
llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp