[PATCH] [MBP] Don't outline short optional branches
Daniel Jasper
djasper at google.com
Fri Mar 6 08:00:09 PST 2015
Hi chandlerc,
With the option -outline-optional-branches, LLVM will place optional branches out of line (more details on r231230).
With this patch, this is not done for short optional branches. An short optional branches is a branch is a single block with an instruction count below a certain threshold (defaulting to 3). Still everything is guarded under -outline-optional-branches).
Outlining a short branch can't significantly improve code locality. It can however decrease performance because of the additional jmp and in cases where the optional branch is hot. This fixes a compile time regression I have observed in a benchmark.
http://reviews.llvm.org/D8108
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: D8108.21359.patch
Type: text/x-patch
Size: 3326 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150306/14d824de/attachment.bin>
More information about the llvm-commits
mailing list