[PATCH] D67350: [IfCvt][ARM] Optimise diamond if-conversion for code size
Oliver Stannard (Linaro) via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 10 03:54:54 PDT 2019
ostannard marked an inline comment as done.
ostannard added inline comments.
================
Comment at: llvm/lib/CodeGen/IfConversion.cpp:309
+ // When if-converting a diamond, the branches at the ends of all the
+ // true block, false block and common predecessor will all be removed.
+ for (auto &I : make_range(TIE, TBBInfo.BB->end())) {
----------------
ostannard wrote:
> efriedma wrote:
> > Is this actually true, if the terminator isn't analyzable? We can form a "diamond" where TrueBB and FalseBB have an arbitrary terminator, like an INLINEASM_BR, as long as it's the same.
> Good point, non-analyzable terminators should be treated as common instructions, not branches which can be completely removed.
I think this also needs to take into account whether we are doing forked-diamond if conversion, in which case even analyzable branches will merged rather then removed.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67350/new/
https://reviews.llvm.org/D67350
More information about the llvm-commits
mailing list