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

Cong Hou via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 18 11:51:38 PDT 2015


congh added a comment.

In http://reviews.llvm.org/D12513#248922, @hans wrote:

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


Thanks for the review! Yes, this part is not easy to understand but I also could not find a way to improve the overall readability.


================
Comment at: lib/CodeGen/IfConversion.cpp:1689
@@ -1688,3 +1688,3 @@
 
   std::vector<MachineBasicBlock *> Succs(FromBBI.BB->succ_begin(),
                                          FromBBI.BB->succ_end());
----------------
hans wrote:
> I know this is old code, but while you're here, maybe change this to a SmallVector and rename to FromSuccs?
Done. I found many uses of std::vector in this file. Do we need to change all of them to SmallVector?

================
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
 
----------------
hans wrote:
> Should 2<&1 be 2>&1?
Right.. corrected.


http://reviews.llvm.org/D12513





More information about the llvm-commits mailing list