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

Cong Hou via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 31 18:15:14 PDT 2015


congh created this revision.
congh added reviewers: MatzeB, qcolombet, davidxl.
congh added a subscriber: llvm-commits.

In if-conversion, there is a utility function MergeBlocks() that is used to merge blocks. However, when new edges are built in this function the edge weight is either not provided or not updated properly, leading to a modified CFG with incorrect edge weights. This patch corrects this issue. More information is provided in the comments.

http://reviews.llvm.org/D12513

Files:
  lib/CodeGen/IfConversion.cpp
  test/CodeGen/ARM/ifcvt-iter-indbr.ll
  test/CodeGen/Hexagon/ifcvt-edge-weight.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12513.33655.patch
Type: text/x-patch
Size: 5324 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150901/e6d54756/attachment.bin>


More information about the llvm-commits mailing list