[llvm-dev] Completeness of -print-after-all
Markus Lavin via llvm-dev
llvm-dev at lists.llvm.org
Thu Nov 8 03:45:35 PST 2018
Fedor,
Yes that is what happens in my case that the loop is fully unrolled and hence ‘removed’.
My objection though is that there is still IR that could be dumped (i.e. the function containing the loop that was removed or the entire module) and that is what I want to have dumped after each pass when I specify -print-after-all. Of course there may be certain implementation details that could make this hard to achieve but ideally I would like to have a reliable option that dumps the entire IR (complete enough to import into opt and run additional passes on) after each individual pass (module, function, loop or whatever).
Doesn’t that make sense?
Regards,
Markus
From: Fedor Sergeev <fedor.v.sergeev at gmail.com>
Sent: Thursday, November 8, 2018 11:06 AM
To: Markus Lavin <markus.lavin at ericsson.com>
Cc: llvm-dev at lists.llvm.org
Subject: Re: [llvm-dev] Completeness of -print-after-all
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<mailto: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<mailto: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/391919bb/attachment.html>
More information about the llvm-dev
mailing list