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

Xinliang David Li xinliangli at gmail.com
Wed Mar 4 00:04:44 PST 2015


The example mentioned has a diamond shape. Besides within the 'then' arm of
cond1 branch, there could be multiple consecutive 'if (cond_x) B_x' where
B_x blocks are cold. The heuristic in your patch seems to be too limiting.

David

On Tue, Mar 3, 2015 at 11:19 PM, Daniel Jasper <djasper at google.com> wrote:

> Yes. The reasoning is that in this case the entire branch (containing A, B
> and C) will already be outlined and we don't want to fragment this further.
> In initial benchmarks, this seemed to have a slight benefit over
> additionally outlining B. Lots of stuff we can investigate, though.
>
> On Wed, Mar 4, 2015 at 8:03 AM, Xinliang David Li <xinliangli at gmail.com>
> wrote:
>
>> If I read the change correctly,  'B' block in the following case can not
>> be outlined. Is it intended?
>>
>> David
>>
>> if (cond1) {
>>     A
>>     if (cond2) {
>>
>>          B
>>      }
>>     C
>>     ...
>> }
>> else {
>>    D
>> }
>>
>> On Tue, Mar 3, 2015 at 10:46 PM, Daniel Jasper <djasper at google.com>
>> wrote:
>>
>>> Re-add the test.
>>>
>>>
>>> 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/
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150304/7b81ab20/attachment.html>


More information about the llvm-commits mailing list