[PATCH] D62079: [MBP] Rotate should bring more fallthrough

Guozhi Wei via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 17 13:54:36 PDT 2019


Carrot created this revision.
Carrot added a reviewer: davidxl.
Herald added subscribers: llvm-commits, asbirlea, jsji, javed.absar, nhaehnle, jvesely, nemanjai.
Herald added a project: LLVM.

Current implementation of rotateLoop does rotate without carefully compare the number of exit fallthrough and top fallthrough, so it may create more taken branches, as demonstrated by the test case no_rotate.

This patch makes sure the new exit fallthrough is larger than top fallthrough before rotation.


Repository:
  rL LLVM

https://reviews.llvm.org/D62079

Files:
  lib/CodeGen/MachineBlockPlacement.cpp
  test/CodeGen/AArch64/cmpxchg-idioms.ll
  test/CodeGen/AMDGPU/si-annotate-cf.ll
  test/CodeGen/PowerPC/licm-remat.ll
  test/CodeGen/Thumb/consthoist-physical-addr.ll
  test/CodeGen/X86/block-placement.ll
  test/CodeGen/X86/code_placement_cold_loop_blocks.ll
  test/CodeGen/X86/code_placement_no_header_change.ll
  test/CodeGen/X86/loop-blocks.ll
  test/CodeGen/X86/no_rotate.ll
  test/DebugInfo/X86/PR37234.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62079.200092.patch
Type: text/x-patch
Size: 13568 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190517/0358df0d/attachment.bin>


More information about the llvm-commits mailing list