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? Thanks, Sebastian -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-add-flag-print-vectorized-loops.patch Type: text/x-diff Size: 2431 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121126/744c701a/attachment.patch>
Hi Sebastian, Thanks for looking at this. I don't think that printing to stdout is the right thing to do. I think that we need to go through the clang driver. Nadav On Nov 26, 2012, at 3:20 PM, Sebastian Pop <spop at codeaurora.org> wrote:> 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? > > Thanks, > Sebastian > -- > Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation > <0001-add-flag-print-vectorized-loops.patch>
Nadav Rotem wrote:> I don't think that printing to stdout is the right thing to do. I think that > we need to go through the clang driver.I'm not sure I understand exactly what you are suggesting: could you please give some more details? Do you mean that we should use clang's diagnostic infrastructure to report these messages? Thanks, Sebastian -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
----- 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
> 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
On Nov 26, 2012, at 3:46 PM, Hal Finkel <hfinkel at anl.gov> wrote:>> 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.I agree.> Furthermore, this information should be structured (we already have a YAML parser, so that might be a good choice),YAML is a great way to serialize these messages, and pass them to IDEs, etc. But I think that we should start discussing the interfaces.> and should probably directly take a Value *, BasicBlock *, Function *, etc. so that the frontend can do the appropriate mapping for the user. >+1 Thanks, Nadav -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121126/d311b6aa/attachment.html>