Branch operands are different from regular instructions. They can have a mix of boolean values and branch instructions. This makes sure that branches are treated as more of a special case and makes sure that the successor blocks are always in the same order, and that they do not include the conditional argument.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Analysis/IRSimilarityIdentifier.cpp | ||
---|---|---|
102 | This can use cast<>. Then you get an assertion on the wrong type for free. https://llvm.org/docs/ProgrammersManual.html#the-isa-cast-and-dyn-cast-templates | |
114 | I think this needs brackets around the isas otherwise the && will be evaluated first. | |
724–725 | I think you can use cast<> for both of these. | |
855 | could use a comment? | |
858 | Why are these asserts after the if? |
llvm/lib/Analysis/IRSimilarityIdentifier.cpp | ||
---|---|---|
858 | If the sizes of the block information between the two branch instructions do not match, then we don't need to worry about whether the information contained in them is correct. This checks consistency between the two data structures concerning the same branch. I think this could go before the if statements, but I also don't know if it matters the order. |
This can use cast<>. Then you get an assertion on the wrong type for free.
https://llvm.org/docs/ProgrammersManual.html#the-isa-cast-and-dyn-cast-templates