================
@@ -34,23 +37,52 @@ 
INITIALIZE_PASS_DEPENDENCY(MachineDominanceFrontierWrapperPass)
 INITIALIZE_PASS_END(WebAssemblyExceptionInfoWrapperPass, DEBUG_TYPE,
                     "WebAssembly Exception Information", true, true)
 
-bool WebAssemblyExceptionInfoWrapperPass::runOnMachineFunction(
-    MachineFunction &MF) {
+static void computeWEI(WebAssemblyExceptionInfo &WEI, MachineFunction &MF,
+                       function_ref<MachineDominatorTree &()> GetMDT,
+                       function_ref<MachineDominanceFrontier &()> GetMDF) {
----------------
boomanaiden154 wrote:

We have 
https://github.com/llvm/llvm-project/blob/1654b66a6d797371564381ad4e109c994f4f764f/llvm/lib/Target/WebAssembly/WebAssemblyExceptionInfo.cpp#L42

so before this patch, we only computed analyses if we actually needed to. 
Passing around `function_ref`s preserves that behavior. If we pass around 
pointers, we compute the dependent analyses unconditionally, which isn't ideal.

https://github.com/llvm/llvm-project/pull/210246
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to