This generalizes the logic introduced in https://reviews.llvm.org/D80916 to other passes.
It's needed by https://reviews.llvm.org/D86442 to assert passes correctly report their status.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Thanks. I don't see anything wrong with this, but I think it needs some more eyes on it.
llvm/lib/Analysis/CallGraphSCCPass.cpp | ||
---|---|---|
470 | This will probably cause an unused variable warning in NDEBUG builds. |
llvm/include/llvm/IR/StructuralHash.h | ||
---|---|---|
29–30 | Style nit: I believe LLVM uses leading const where possible. | |
llvm/lib/Analysis/CallGraphSCCPass.cpp | ||
480 | There is a mismatch between #if checks here. Above only EXPENSIVE_CHECKS is checked, here !NDEBUG is checked as well. Aren't we guaranteed that !NDEBUG if EXPENSIVE_CHECKS is set? In any case, both should be consistent. | |
484 | Style nit: Typically llvm_unreachable() is used instead of assert(false). |
llvm/lib/IR/StructuralHash.cpp | ||
---|---|---|
72 | Probably not worth changing now.... many older functions are capitalized but they are in conflict with the lowerCase style for new functions |
llvm/lib/IR/StructuralHash.cpp | ||
---|---|---|
51 | Hi! (This happens for us in the unit test PassManager.CallGraphUpdater0 with expensive checks when we run in our downstream clone) |
llvm/lib/IR/StructuralHash.cpp | ||
---|---|---|
51 | I'd assume this should only be called for valid IR, which means there must be terminator? Unrelated, but could this just be something like for (auto &Succ : successors(BB)) {? |
llvm/lib/IR/StructuralHash.cpp | ||
---|---|---|
51 | I see. Thanks! (The testcase was originally not behaving well (it inserted a non-terminator after the terminator in a bb), but that was fixed in 3667d87. Unfortunately we have lost that fix downstream during some EXPENSIVE_CHECKS fiddling we've done and then ran into this problem.) No need to change the successor iteration then. Thanks again! |
Nit: ^