[PATCH] D12513: Update edge weights properly when merging blocks in if-conversion.

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 18 11:23:58 PDT 2015


hans accepted this revision.
hans added a comment.
This revision is now accepted and ready to land.

Looks ok to me. The code is pretty hard to follow, but I don't have any great ideas for making it easier.


================
Comment at: lib/CodeGen/IfConversion.cpp:1689
@@ -1688,3 +1688,3 @@
 
   std::vector<MachineBasicBlock *> Succs(FromBBI.BB->succ_begin(),
                                          FromBBI.BB->succ_end());
----------------
I know this is old code, but while you're here, maybe change this to a SmallVector and rename to FromSuccs?

================
Comment at: test/CodeGen/ARM/ifcvt-iter-indbr.ll:2
@@ -1,2 +1,3 @@
 ; RUN: llc < %s -mtriple thumbv7s-apple-darwin  -asm-verbose=false | FileCheck %s
+; RUN: llc < %s -mtriple thumbv7s-apple-darwin  -asm-verbose=false -print-machineinstrs=if-converter 2<&1 | FileCheck --check-prefix=CHECK-WEIGHT %s
 
----------------
Should 2<&1 be 2>&1?


http://reviews.llvm.org/D12513





More information about the llvm-commits mailing list