[PATCH] D100231: [NewPM] Cleanup IR printing instrumentation

Arthur Eubanks via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 14 15:16:56 PDT 2021


aeubanks added a comment.

I'm not sure that having a helper method with 4 lambdas is any cleaner. Normal control flow in a function is easier to read and understand, and not really that much more code.



================
Comment at: llvm/lib/Passes/StandardInstrumentations.cpp:222
 
   if (any_isa<const Loop *>(IR)) {
     const Loop *L = any_cast<const Loop *>(IR);
----------------
jamieschmeiser wrote:
> This could be changed to an assert and then the llvm_unreachable can be removed.
I kinda prefer the symmetry.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100231



More information about the cfe-commits mailing list