[PATCH] D110181: [InstCombine] Move InstCombineWorklist to Utils to allow reuse (NFC).

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 21 09:51:45 PDT 2021


spatel added a comment.

Thanks! We should have done this long ago. :)
See inline for a couple of minor points, but LGTM too.



================
Comment at: llvm/include/llvm/Transforms/Utils/InstructionWorklist.h:33
 
+  const char *DbgPrefix = "IC";
+
----------------
Is it necessary to have that prefix? That part is just noise to me when I'm scrolling through instcombine debug spew. No tests should be depending on matching that...


================
Comment at: llvm/include/llvm/Transforms/Utils/InstructionWorklist.h:21
 
 #define DEBUG_TYPE "instcombine"
 
----------------
fhahn wrote:
> lebedev.ri wrote:
> > Update
> I removed it here and moved the user includes after the `DEBUG_TYPE` definitions at the include site. Not sure if there's a better way to customize the DEBUG_TYPE string here.
Do we really need for the caller's DEBUG_TYPE to be set, or can we just define that here as "instruction-utils" or something like that? That's what it looks like in BasicBlockUtils.cpp (so might have to split this into a header and source file pair?).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110181



More information about the llvm-commits mailing list