[LLVMdev] [llvm-commits] Flag to print vectorized loops

Sean Silva silvas at purdue.edu
Mon Nov 26 17:24:31 PST 2012


> In my opinion, what we really need is an interface that the frontend can use to get information from the backend optimizers. Then the frontend can display this information to users in an appropriate way. Furthermore, this information should be structured (we already have a YAML parser, so that might be a good choice), and should probably directly take a Value *, BasicBlock *, Function *, etc. so that the frontend can do the appropriate mapping for the user.

Another possibility is to use clang's diagnostics infrastructure. That
is, generalize the diagnostic infrastructure to the rest of LLVM. I'm
not sure what the tradeoff would be for that compared with your
suggestion. Actually, they might be orthogonal issues. In Matt
Beaumont-Gay's dev meeting talk about clang diagnostics, it appeared
that one of the issues he had to battle with was the lack of a
structured representation for diagnostics, which suggests that a
structured representation is indeed orthogonal.

So basically, this kind of optimization notice could be emitted as a
"note" through a DiagnosticsEngine stored in the LLVMContext. When
clang is calling into LLVM, it would pass down its DiagnosticsEngine
and so these diagnostics would be seamlessly integrated.

LLD is also eventually going to eventually grow into the need for a
proper diagnostics framework as well, which further strengthens the
idea to generalize the diagnostics infrastructure to be a general part
of LLVM.

-- Sean Silva

On Mon, Nov 26, 2012 at 6:46 PM, Hal Finkel <hfinkel at anl.gov> wrote:
> ----- Original Message -----
>> From: "Sebastian Pop" <spop at codeaurora.org>
>> To: "Nadav Rotem" <nrotem at apple.com>, llvm-commits at cs.uiuc.edu, llvmdev at cs.uiuc.edu
>> Sent: Monday, November 26, 2012 5:20:47 PM
>> Subject: [llvm-commits] Flag to print vectorized loops
>>
>> Hi,
>>
>> Nadav Rotem wrote:
>> >
>> > On Nov 26, 2012, at 1:46 PM, Sebastian Pop <spop at codeaurora.org>
>> > wrote:
>> > > It would be a quick and easy contribution to add a flag to print
>> > > on stdout the
>> > > loops being vectorized.
>> >
>> > Okay. I am not sure how chris feels about printing to stdout. We
>> > should bring it up on the mailing list.
>>
>> Both GCC and ICC have a flag that prints out a message when a loop
>> has been
>> vectorized.  Would the attached patch be ok to commit?
>
> Sebastian,
>
> In my opinion, what we really need is an interface that the frontend can use to get information from the backend optimizers. Then the frontend can display this information to users in an appropriate way. Furthermore, this information should be structured (we already have a YAML parser, so that might be a good choice), and should probably directly take a Value *, BasicBlock *, Function *, etc. so that the frontend can do the appropriate mapping for the user.
>
>  -Hal
>
>>
>> Thanks,
>> Sebastian
>> --
>> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
>> hosted by The Linux Foundation
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>
> --
> Hal Finkel
> Postdoctoral Appointee
> Leadership Computing Facility
> Argonne National Laboratory
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-dev mailing list