[PATCH] D126455: [FuncSpec] Make the Function Specializer part of the IPSCCP pass.
    Florian Hahn via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Dec  5 02:17:48 PST 2022
    
    
  
fhahn added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/SCCP.cpp:150
 
+  bool MadeChanges = false;
+
----------------
move this to the the loop below, which uses it
================
Comment at: llvm/lib/Transforms/Utils/SCCPSolver.cpp:266
     TI->eraseFromParent();
-    DTU.applyUpdatesPermissive(Updates);
+    if (DTU)
+      DTU->applyUpdatesPermissive(Updates);
----------------
I think DomTreeUpdater provides a constructor that doesn't take a DT which could be used unconditionally instead of having all those `if (DTU)` checks spread out across various functions.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126455/new/
https://reviews.llvm.org/D126455
    
    
More information about the llvm-commits
mailing list