i.e. they cannot be unreachable from the entry (which usually indicate usage errors).
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Time | Test | |
---|---|---|
980 ms | linux > libarcher.parallel::parallel-nosuppression.c |
Event Timeline
Does this break any existing code?
llvm/include/llvm/Support/GenericDomTree.h | ||
---|---|---|
483 | Maybe assert each node separately and assertion message explaining what this means? | |
483–493 | I both NodeA and NodeB have to be non-null before the loop, and we unconditionally dereference NodeA at the return statement, then one of the three must be off: (1) the assertion, (2) the loop condition, (3) the return. |
llvm/include/llvm/Support/GenericDomTree.h | ||
---|---|---|
483–493 | Good catch. I have deleted the redundant check. check-llvm check-clang passed. |
One remaining thing: the function documentation needs to be updated:
If there is no such block then return nullptr.
This is obsolete, and it may be worth mentioning that A and B must have tree nodes.
Or actually, would it make sense to just make the function accept tree nodes instead of basic blocks?
Fixed.
Or actually, would it make sense to just make the function accept tree nodes instead of basic blocks?
There are 21 references of the function. Many don't have tree nodes around. Changing to tree nodes can inconvenience many call sites.
Maybe assert each node separately and assertion message explaining what this means?