[llvm-dev] Completeness of -print-after-all

Fedor Sergeev via llvm-dev llvm-dev at lists.llvm.org
Thu Nov 8 02:05:56 PST 2018


Markus,

Loop passes are kinda unique compared to func/module passes in that they
could destroy the loop they worked on. And there might be no loop to print
after that (btw, there is a known bug in new pass manager where it tries to
print deleted loop in this situation - nothing good happens!).

In your case loop unroll can fully uroll the loop, essentially removing the
Loop.

If you have suggestions on how to improve behavior in such cases I would be
happy to discuss this further.

regards,
Fedor

8 нояб. 2018 г. 12:38 пользователь "Markus Lavin via llvm-dev" <
llvm-dev at lists.llvm.org> написал:

Hi,

I recently worked on an issue where I realized that -print-after-all does
not
cover all passes run by the pass manager. E.g. it seems that loop passes are
not fully covered and I could find that loop transformations showed up in
the
dump of the next non-loop pass (which happened to be 'Combine redundant
instructions' and that was rather confusing).

Specifying both -print-before-all and -print-after-all and doing some
grepping
gives me the following where we see two back-to-back 'Before' dumps which
should not be possible.

*** IR Dump Before LCSSA Verifier ***
*** IR Dump After LCSSA Verifier ***
*** IR Dump Before Loop-Closed SSA Form Pass ***
*** IR Dump After Loop-Closed SSA Form Pass ***
*** IR Dump Before Unroll loops ***
*** IR Dump Before Combine redundant instructions ***
*** IR Dump After Combine redundant instructions ***

Maybe there are good reasons for making this hard to fix but to me it seems
like a rather severe deficiency so I wonder if this is widely known and if
there
are any plans to improve it?

-Markus

_______________________________________________
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/20181108/f15822f7/attachment.html>


More information about the llvm-dev mailing list