[llvm] [CodeGen] Port WasmEHPrepare to new pass manager (PR #74435)

via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 5 17:20:12 PST 2023


================
@@ -88,10 +89,12 @@
 
 using namespace llvm;
 
-#define DEBUG_TYPE "wasmehprepare"
+#define DEBUG_TYPE "wasm-eh-prepare"
 
 namespace {
-class WasmEHPrepare : public FunctionPass {
+class WasmEHPrepareImpl {
----------------
paperchalice wrote:

Legacy `WasmEHPrepare` need to inherit `FunctionPass`, new `WasmEHPreparePass` need to inherit `PassInfoMixin` and register the pass info in `PassRegistry.def`.

Some useful links:
https://llvm.org/devmtg/2014-10/Slides/Carruth-TheLLVMPassManagerPart2.pdf
https://discourse.llvm.org/t/solved-migrating-legacypm-passes-to-newpm/63073
https://discourse.llvm.org/t/porting-pass-to-new-passmanager/49866/7
https://discourse.llvm.org/t/doinitialization-finalization-equivalent-for-new-pass-manager/49888


https://github.com/llvm/llvm-project/pull/74435


More information about the llvm-commits mailing list