[PATCH] D52345: [PowerPC] optimize conditional branch on CRSET/CRUNSET
    Hiroshi Inoue via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Sep 25 20:11:30 PDT 2018
    
    
  
inouehrs added inline comments.
================
Comment at: lib/Target/PowerPC/PPCPreEmitPeephole.cpp:109
+        auto RemoveMBB = [](MachineBasicBlock *MBB) {
+          for (auto Succ: MBB->successors())
+            MBB->removeSuccessor(Succ);
----------------
inouehrs wrote:
> nemanjai wrote:
> > Any one of these successors now might have become unreachable, right? Should this just be a static recursive function?
> > Seems that it would be nice if we could just run a pass that eliminates unreachable blocks after this pass.
> As long as I tested, I have never seen an unreachable block caused by this optimization. So I feel it is not warth paying too much cost for this.
> How about commiting this patch without unreachable block elimination and investigate last unreachable block elimination opportunity (not limited to those caused by this optimization) as a separate patch?
@nemanjai What do you think on this approach?
https://reviews.llvm.org/D52345
    
    
More information about the llvm-commits
mailing list