diff options
author | Roman Lebedev <lebedev.ri@gmail.com> | 2021-07-23 00:13:46 +0300 |
---|---|---|
committer | Roman Lebedev <lebedev.ri@gmail.com> | 2021-07-23 00:36:59 +0300 |
commit | d7378259aad35f1092369b45ea7a2e388297293f (patch) | |
tree | 0187afd1c7715651b9a1eb70b03be4f41dc2df19 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 0d4f2de30317d3726d7d69a7e896b7d600bf5067 (diff) | |
download | llvm-d7378259aad35f1092369b45ea7a2e388297293f.zip llvm-d7378259aad35f1092369b45ea7a2e388297293f.tar.gz llvm-d7378259aad35f1092369b45ea7a2e388297293f.tar.bz2 |
[SimplifyCFG] SimplifyCondBranchToTwoReturns(): really only deal with different ret blocks
This function is called when some predecessor of an empty return block
ends with a conditional branch, with both successors being empty ret blocks.
Now, because of the way SimplifyCFG works, it might happen to simplify
one of the blocks in a way that makes a conditional branch
into an unconditional one, since it's destinations are now identical,
but it might not have actually simplified said conditional branch
into an unconditional one yet.
So, we have to check that ourselves first,
especially now that SimplifyCFG aggressively tail-merges
all ret and resume blocks.
Even if it was an unconditional branch already,
`SimplifyCFGOpt::simplifyReturn()` doesn't call `FoldReturnIntoUncondBranch()`
by default.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions