InstCombine's worklist can be re-used by other passes like
VectorCombine. Move it to llvm/Transform/Utils and rename it to
InstructionWorklist.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Yeah, it should probably be moved. I put up D110181 to move it to Utils and rename it to InstructionWorklist.
Fix include guard, remove DEBUG_TYPE from header, move it to before the individual includes.
llvm/include/llvm/Transforms/Utils/InstructionWorklist.h | ||
---|---|---|
20–21 | 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. |
Thanks! We should have done this long ago. :)
See inline for a couple of minor points, but LGTM too.
llvm/include/llvm/Transforms/Utils/InstructionWorklist.h | ||
---|---|---|
20–21 | 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?). | |
33 | 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... |
llvm/include/llvm/Transforms/Utils/InstructionWorklist.h | ||
---|---|---|
20–21 | I think the current patch as-is is fine. |
Hmm, it looks like this broke the build with explicit modules ( -DLLVM_ENABLE_MODULES=On). I'm currently checking to see what the options are for unbreaking the build.
These need updating