[PATCH] D78277: [SimpleLoopUnswitch] Update DefaultExit condition to check unreachable is not empty.
Chandler Carruth via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 5 21:33:42 PDT 2020
chandlerc accepted this revision.
chandlerc added a comment.
This revision is now accepted and ready to land.
LGTM with the addition of skipping debug info as Eli suggests.
================
Comment at: llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp:614
+ bool isUnreachable = isa<UnreachableInst>(TI);
+ return !isUnreachable || (isUnreachable && (&*BBToCheck.begin() != TI));
+ };
----------------
efriedma wrote:
> Need to skip debug info
I hadn't expected that to matter as the thing we care most about here are the empty-but-unreachable blocks *created* by this same pass (and those would never have debug info).
But I suppose you're right that we still need to skip debug info because then the frontend adding it could suddenly enable (pointless) unswitching.
Ugh, but good catch.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78277/new/
https://reviews.llvm.org/D78277
More information about the llvm-commits
mailing list