Adve, Vikram Sadanand via llvm-dev
2018-Jan-19 21:27 UTC
[llvm-dev] : Does OpenMP hints bypass the vectorisation legality check in llvm
Xinmin,> Tom, your understanding is correct per OpenMP SIMD model. Our implementation behaves as you stated. > Which is not part of LLVM main trunk yet.Is that the implementation that is based on the intrinsics in the RFC you and Hal Finkel had sent out to the list? Or is it a different implementation (and if so, is there some plan to merge the two)? Thanks, --Vikram Adve // Interim Head, Department of Computer Science // Donald B. Gillies Professor of Computer Science // University of Illinois at Urbana-Champaign // Admin Assistant: Amanda Foley - ajfoley2 at illinois.edu // Google Hangouts: vikram.s.adve at gmail.com || Skype: vikramsadve // Research page: http://vikram.cs.illinois.edu <http://vikram.cs.illinois.edu/> On 1/19/18, 2:01 PM, "llvm-dev on behalf of via llvm-dev" <llvm-dev-bounces at lists.llvm.org on behalf of llvm-dev at lists.llvm.org> wrote: Date: Fri, 19 Jan 2018 17:54:05 +0000 From: "Tian, Xinmin via llvm-dev" <llvm-dev at lists.llvm.org> To: Tom Sun <ps702 at cam.ac.uk>, "llvm-dev at lists.llvm.org" <llvm-dev at lists.llvm.org> Subject: Re: [llvm-dev] Does OpenMP hints bypass the vectorisation legality check in llvm Message-ID: <E42C235343FF1744BA43DDCC4DF1F1BAB4589935 at ORSMSX115.amr.corp.intel.com> Content-Type: text/plain; charset="utf-8" Tom, your understanding is correct per OpenMP SIMD model. Our implementation behaves as you stated. Which is not part of LLVM main trunk yet. Xinmin From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] On Behalf Of Tom Sun via llvm-dev Sent: Friday, January 19, 2018 12:39 AM To: llvm-dev at lists.llvm.org Subject: [llvm-dev] Does OpenMP hints bypass the vectorisation legality check in llvm Hi all, I am currently looking into how "#pragma omp for simd" is actually recognized in llvm. To my knowledge, clang will parse it and set metadata in IR to indicate this force-vectorization hint and later optimization passes would read it and vectorize the marked loop. Therefore, the loop should be vectorized even the compiler think it might not be safe to do so? So my assumption is that such force-vectorization hints should bypass both the vectorization legality and cost model check. However, in LoopVectorize.cpp, I can't see how this is done. All loops will be sent to a legality check of LVL.canVectorize() and, if this condition does not fit, it return to false directly without actually reaching the vectorization stage. Is there anything wrong with my assumption made on the use of force-vectorization hints? Thanks in advance, T -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180119/94ac9dc6/attachment-0001.html>
Maybe Matching Threads
- Does OpenMP hints bypass the vectorisation legality check in llvm
- Does OpenMP hints bypass the vectorisation legality check in llvm
- MachineVerifier and undef
- [RFC] Polly Status and Integration
- RFC: [LV] any objections in moving isLegalMasked* check from Legal to CostModel? (Cleaning up LoopVectorizationLegality)