[PATCH] D85818: [UnifyFunctionExitNodes] Fix Modified status for unreachable blocks
David Stenberg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 3 06:25:50 PDT 2020
dstenb marked 2 inline comments as done.
dstenb added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp:55
//
std::vector<BasicBlock*> ReturningBlocks;
std::vector<BasicBlock*> UnreachableBlocks;
----------------
bjope wrote:
> One idea (a bit larger refactoring) is to split this function by adding two new helpers, so the code in runOnFunction would look like:
>
> ```
> {
> bool Changed = false;
> Changed |= unifyUnreachableBlocks();
> Changed |= unifyReturnBlocks();
> return Changed;
> }
> ```
> That would be nice since there doesn't seem to really be any dependency between the handling of unreachable and return blocks. And you wouldn't need to care about Changed status from one analysis inside the other.
That seems worthwhile! I did that in the latest diff.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85818/new/
https://reviews.llvm.org/D85818
More information about the llvm-commits
mailing list