[llvm-dev] Loop Rotation in MachineBlockPlacement

Xinliang David Li via llvm-dev llvm-dev at lists.llvm.org
Wed Oct 4 13:21:25 PDT 2017


looks like a bug to me.

David

On Wed, Oct 4, 2017 at 1:08 PM, Xin Tong via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Hi.
>
>
> I have this nested loop. When loop at Depth3 is processed, BB#193 is the
> exiting block. And when loop at Depth2 is processed, the loop is rotated
> w.r.t BB#193 because PreferredLoopExit is not cleared. This does not seem
> right to me as BB#193 does not even exit loop at Depth2. Should not we clear PreferredLoopExit
> everytime we process a new loop ?
>
>
>
> BB#193: derived from LLVM BB %cleanup.i.i781
>
>     Live Ins: %RAX %RBP %RBX %RSI %R9 %R10 %R11 %R13 %R14 %R15
>
>     Predecessors according to CFG: BB#192
>
>         %RBX<def,tied1> = ADD64ri8 %RBX<kill,tied0>, 8,
> %EFLAGS<imp-def,dead>
>
>         %RBP<def,tied1> = ADD64ri8 %RBP<kill,tied0>, 8,
> %EFLAGS<imp-def,dead>
>
>         CMP64rr %RBX, %R15, %EFLAGS<imp-def>
>
>         JB_1 <BB#192>, %EFLAGS<imp-use>
>
>         JMP_1 <BB#174>
>
>     Successors according to CFG: BB#192(0x7fef9fcb / 0x80000000 = 99.95%)
> BB#174(0x00106035 / 0x80000000 = 0.05%)
>
>
>
> Loop at depth 2 containing: BB#191<header>,BB#192,BB#182,
> BB#193,BB#174,BB#175,BB#176,BB#177,BB#178,BB#179,BB#180,
> BB#181,BB#183,BB#187<exiting>,BB#184,BB#185,BB#186<exiting>,
> BB#188<exiting>,BB#189<exiting>,BB#190<latch>
>
> Loop at depth 3 containing: BB#192<header><exiting>,BB#193<latch><exiting>
>
>
>
> Thanks
>
> -Xin
>
> --
> Software Engineer - Compiler Toolchain
> Employee of Facebook Inc.
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171004/2805021d/attachment.html>


More information about the llvm-dev mailing list