Currently SplitBlockPredecessors generates incorrect code in case if basic block we are going to split has a landingpad. Also seems like it is fairly common case among it's users to conditionally call either SplitBlockPredecessors or SplitLandingPadPredecessors. Because of this I think it is reasonable to add this condition directly into SplitBlockPredecessors.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Minor comments inline. Once these are addressed, I'm willing to give an LGTM. As we discussed offline, I plan on waiting another day or two to give other interested parties time to comment.
include/llvm/Transforms/Utils/BasicBlockUtils.h | ||
---|---|---|
205 ↗ | (On Diff #18704) | I'd suggest organizing the comment as: If BB does not contain a landingpad .... If BB does start with a landingpad ... |
208 ↗ | (On Diff #18704) | Given there is no longer a NumPreds argument, you can delete that part. |
lib/Transforms/Utils/BasicBlockUtils.cpp | ||
457 ↗ | (On Diff #18704) | Given this is just duplicated from the header, delete the comment here. |
480 ↗ | (On Diff #18704) | Not sure it makes sense to add the extra suffix here. I'd just drop this. |