[llvm-dev] -Rpass-missed vs -Rpass-analysis
Friedman, Eli via llvm-dev
llvm-dev at lists.llvm.org
Tue Aug 15 10:56:50 PDT 2017
On 8/15/2017 6:43 AM, Vladimir Miloserdov via llvm-dev wrote:
>
> Hello,
>
> I am currently working on optimization remarks enhancement (e.g. in
> loop-vectorize pass). There are 3 options to enable such diagnostics:
> -Rpass, -Rpass-missed and -Rpass-analysis.
>
> From help:
>
> -Rpass-analysis=<value> Report transformation analysis from
> optimization passes whose name matches the given POSIX regular expression
>
> -Rpass-missed=<value> Report missed transformations by optimization
> passes whose name matches the given POSIX regular expression
>
> -Rpass=<value> Report transformations performed by
> optimization passes whose name matches the given POSIX regular expression
>
> The question is when to generate “missed” remark and when an
> “analysis” one? In my opinion we should generate “missed” remarks with
> a short explanation why optimization did not succeed and “analysis”
> with additional data on optimization process (e.g. “cost of vector
> instructions here is X, cost of scalar version is Y” and so on).
>
Not sure it's useful to emit the cost of each individual instruction
(any remark which includes LLVM IR instructions is going to be very
difficult to understand for anyone who isn't a compiler developer), but
the intuition is correct, I think.
> Also, this is taken from https://reviews.llvm.org/D3683:
> -Rpass-missed is used by optimizers to inform the user when they tried
> to apply an optimization but couldn't (or wouldn't).
> -Rpass-analysis is used by optimizers to report analysis results back
> to the user (e.g., why the transformation could not be applied).
>
> Now consider loop vectorization pass. We can’t vectorize a loop with a
> switching statement, so it will be informative to give a message like
> “loop not vectorized: loop contains switching statement”. But should
> this message refer to -Rpass-missed or -Rpass-analysis? In current
> version it goes to “analysis”, and if user is using -Rpass-missed
> instead it gives only “loop not vectorized”. What’s the point of doing
> it in that way? “Missed” remark becomes nearly useless for users.
>
That sounds like a bug.
-Eli
--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170815/7f697a0f/attachment-0001.html>
More information about the llvm-dev
mailing list