[PATCH] D52345: [PowerPC] optimize conditional branch on CRSET/CRUNSET
Hiroshi Inoue via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 24 10:12:47 PDT 2018
inouehrs marked 2 inline comments as done.
inouehrs added a comment.
> I'm just curious, is there something that runs after this pass that will clean up unreachable blocks if any became unreachable? For example, if MBB1 is the only predecessor of MBB2 and MBB2 is removed as a successor to MBB1, will something remove MBB2 afterwards.
Actually, no pass can eliminate unreachable block from this optimization. So I added a simple unrechable block elimination and modify a testcase for this.
================
Comment at: lib/Target/PowerPC/PPCPreEmitPeephole.cpp:139
+ if (!SeenUse) {
+ // We need to check use of the CRBit in predecessors.
+ for (auto &SuccMBB : MBB.successors())
----------------
nemanjai wrote:
> Don't you mean `successors` in this comment?
Oops. Thank you for the good catch.
https://reviews.llvm.org/D52345
More information about the llvm-commits
mailing list