[PATCH] Add a flag to experiment with outlining optional branches.

Daniel Jasper djasper at google.com
Wed Feb 18 01:47:37 PST 2015


Hi chandlerc,

In a CFG with the edges A->B->C and A->C, B is an optional branch.

LLVM's default behavior is to lay the blocks out naturally, i.e. A, B, C, in order to improve code locality and fall throughs. However, if a function contains many of those optional branches only a few of which are taken, this leads to a lot of unnecessary icache misses. Moving B out of line can work around this.

http://reviews.llvm.org/D7719

Files:
  lib/CodeGen/MachineBlockPlacement.cpp
  test/CodeGen/X86/code_placement_outline_optional_branches.ll

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7719.20153.patch
Type: text/x-patch
Size: 4698 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150218/a345bdd5/attachment.bin>


More information about the llvm-commits mailing list