[PATCH] D111645: [FuncSpec] Don't run the solver if there's nothing to do

Snehasish Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 12 09:37:59 PDT 2021


snehasish added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/FunctionSpecialization.cpp:828
+  // the ssa_copy intrinsics that may have been introduced.
+  if (!TrackedFuncs.size()) {
+    removeSSACopy(M);
----------------
Consider replacing with `if(TrackedFuncs.empty())`. IMO its a little easier to read. 

Also I wonder if moving lines 822-831 before we define RunSCCPSolver on L793 makes it easier to read. I was confused for a bit before realizing that L793 is creating a functor. Wdyt?


================
Comment at: llvm/test/Transforms/FunctionSpecialization/function-specialization-nothing-todo.ll:19
+
+; Finally check the absensce and thus removal of these intrinsics:
+
----------------
typo: absence


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111645/new/

https://reviews.llvm.org/D111645



More information about the llvm-commits mailing list