[PATCH] D156522: [LLVM] move verification of convergence control to a class template

Sameer Sahasrabuddhe via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 31 01:00:22 PDT 2023


sameerds marked 3 inline comments as done.
sameerds added inline comments.


================
Comment at: llvm/include/llvm/ADT/GenericConvergenceVerifier.h:34
+  void initialize(raw_ostream &OS,
+                  std::function<void(const Twine &Message)> FailureCB,
+                  const FunctionT &F) {
----------------
arsenm wrote:
> can this be function_ref? I'd expect this to have the failure context as an explicit argument
See the function `reportFailure()` where the failure context is passed as an ArrayRef<Printable>. Both verifiers use different variadic function templates that do the same thing: print the message, change the verifier state and then print a variable number of context arguments. This lambda is a call-back to do the first two things. `reportFailure()` calls this lambda and then prints the context objects passed to it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D156522



More information about the llvm-commits mailing list