diff options
author | James Y Knight <jyknight@google.com> | 2020-02-20 01:16:13 -0500 |
---|---|---|
committer | James Y Knight <jyknight@google.com> | 2020-05-07 18:17:07 -0400 |
commit | 7af9d386da2a2447ac044120ff23770ac0cedc3c (patch) | |
tree | 4fefeb8cd76abd431d15359972cc9dd9d37f8bd6 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 13062d0fb76913802f94314090b1a2b36bd480d9 (diff) | |
download | llvm-7af9d386da2a2447ac044120ff23770ac0cedc3c.zip llvm-7af9d386da2a2447ac044120ff23770ac0cedc3c.tar.gz llvm-7af9d386da2a2447ac044120ff23770ac0cedc3c.tar.bz2 |
Correctly modify the CFG in IfConverter, and then remove the
CorrectExtraCFGEdges function.
The latter was a workaround for "Various pieces of code" leaving bogus
extra CFG edges in place. Where by "various" it meant only
IfConverter::MergeBlocks, which failed to clear all of the successors
of dead blocks it emptied out. This wouldn't matter a whole lot,
except that the dead blocks remained listed as predecessors of
still-useful blocks, inhibiting optimizations.
This fix slightly changed two thumb tests, because the correct CFG
successors allowed for the "diamond" if-conversion pattern to be
detected, when it could only use "simple" before.
Additionally, the removal of a now-redundant call to analyzeBranch
(with AllowModify=true) in BranchFolder::OptimizeFunction caused a
later check for an empty block in BranchFolder::OptimizeBlock to
fail. Correct this by moving the call to analyzeBranch in
OptimizeBlock higher.
Differential Revision: https://reviews.llvm.org/D79527
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions